LatentCode
Configuration
LatentCode reads JSON config from your home directory and from each project. Most people never edit it by hand — the config CLI covers the essentials — but here's what's available.
Where config lives
| Scope | Location |
|---|---|
| Global | ~/.config/latentcode/latentcode.jsonc |
| Project | latentcode.json (or .jsonc) in your project, and files up the tree |
| Project dir | .latentcode/ directories, walked up from your working directory |
Project config layers on top of global config. A minimal file looks like this:
jsonc
{
"$schema": "https://latentstack.dev/config.json",
"model": "anthropic/claude-sonnet-4-5",
"default_agent": "build"
}You usually don't need this
Connection settings (API key, gateway URL, default model) are managed by latentcode config set … — see the Getting started page. Edit the file directly only for advanced keys like custom commands, MCP servers, or keybindings.Keys you'll actually set
| Key | Purpose |
|---|---|
| model | Default model for new sessions (provider/model) |
| small_model | Faster model for lightweight tasks (titles, goal checks) |
| default_agent | Which agent starts by default (build / plan) |
| keybinds | Override any TUI keybinding |
| command | Define your own slash commands |
| skills | Extra skill folders to load |
| mcp | MCP servers to connect |
| plugin | Plugins to load |
| instructions | Extra instruction files the agent always reads |
| permission | Rules for what needs approval |
| compaction | Tune automatic context compaction |
Handy environment variables
All variables are prefixed LATENTCODE_. The ones worth knowing:
| Variable | Effect |
|---|---|
| LATENTCODE_CONFIG | Path to a specific config file to use |
| LATENTCODE_CONFIG_DIR | Override the config directory |
| LATENTCODE_DISABLE_PROJECT_CONFIG | Ignore project-level config |
| LATENTCODE_PURE | Run without any external plugins |
| LATENTCODE_DISABLE_AUTOUPDATE | Turn off automatic update checks |