Config file
anchor reads config.json from ~/.anchor, or from $ANCHOR_HOME when that’s set. The file is
optional. Keys are case-insensitive, and comments and trailing commas are allowed.
{ // Which model to use, and how to reach it. "provider": { "model": "claude-sonnet-5", "name": "anthropic", "endpoint": null, "apiKeyEnv": "ANTHROPIC_API_KEY", "contextWindow": 200000, "effort": "high" }, // Named servers; use their models as "work/<model>". "providers": { "work": { "endpoint": "https://litellm.example.com/v1", "apiKeyEnv": "LITELLM_API_KEY" } }, // MCP servers available in every project. "mcpServers": { "files": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] } }, // Colors. "theme": "default", "colors": { "accent": "bold magenta" }, // Ring the terminal bell when anchor needs you. "bell": true, // Where the full screen puts the prompt: "bottom" or "top". "dock": "bottom", // Download new releases and install them the next time anchor starts. "autoUpdate": true, // How many recently read files to check for changes around each tool call. "trackedFiles": 50}provider
Section titled “provider”| Key | Type | Description |
|---|---|---|
model |
string | The model name, or <provider>/<model> for a named provider. --model overrides it. |
name |
string | anthropic or openai. Inferred from the model name when omitted; openai for unknown names. |
endpoint |
string | The API base URL, for OpenAI-compatible servers other than OpenAI and xAI. |
apiKeyEnv |
string | The environment variable that holds the API key. When it’s unset, a key saved for it by anchor setup is read from the OS keychain or ~/.anchor/credentials. |
contextWindow |
number | The model’s context window in tokens. |
effort |
string | How hard the model thinks: none, low, medium, high or xhigh. Unset leaves it to the model. --effort overrides it. See Reasoning effort. |
A model name anchor doesn’t recognize needs both endpoint and apiKeyEnv. Recognized prefixes and
their defaults:
| Prefix | name |
endpoint |
apiKeyEnv |
contextWindow |
|---|---|---|---|---|
claude- |
anthropic |
Anthropic’s API | ANTHROPIC_API_KEY |
200,000 |
grok- |
openai |
https://api.x.ai/v1 |
XAI_API_KEY |
256,000 for grok-4*, else 128,000 |
gpt-, o1, o3, o4 |
openai |
OpenAI’s API | OPENAI_API_KEY |
128,000 |
Any other model defaults to a 128,000-token window.
Reasoning effort
Section titled “Reasoning effort”effort sets how much the model thinks before it answers, using the parameter each provider takes:
- Anthropic models get adaptive thinking (
thinking.type: adaptive) with the level asoutput_config.effort. The model decides how much to think, up to that level. Thinking counts against the output cap, so anchor raises the cap from 16,000 to 64,000 tokens when an effort is set.noneturns thinking off; models that always think refuse that, so leaveeffortunset for them. - OpenAI-compatible servers get
reasoning_effort. Which levels a model accepts depends on the model, and a server that doesn’t support the parameter refuses the request.
With an effort set, anchor asks for the thinking summarized and
shows it as it streams. Without effort, nothing is sent and the
model’s own default applies. --effort and
/effort change it for one run or session. Sub-agents use the
main agent’s effort. The setup wizard keeps effort when it replaces the rest of provider.
providers
Section titled “providers”An object mapping a name to an API server, such as a LiteLLM proxy. A model written <name>/<model>
is sent to that server as <model> (everything after the first /). This works in
provider.model, --model, /model and a sub-agent’s model:. provider.name, endpoint and
apiKeyEnv don’t apply to these models; provider.contextWindow still overrides the window.
| Key | Type | Description |
|---|---|---|
endpoint |
string | The API base URL. Required. |
type |
string | openai (chat completions, the default) or anthropic (messages). |
apiKeyEnv |
string | The environment variable that holds the API key, or whose key anchor setup saved. Omit it if the server needs no key. |
headers |
object | Extra request headers. ${NAME} in a value is replaced with the environment variable. |
contextWindow |
number | The context window for this server’s models. Defaults by model name: a name containing claude- gets 200,000 and one containing grok-4 gets 256,000, so Bedrock ids like anthropic.claude-sonnet-5 work. |
mcpServers
Section titled “mcpServers”An object mapping a server name to its configuration. The same shape is used in a project’s
.mcp.json, under a top-level mcpServers key.
stdio servers
Section titled “stdio servers”| Key | Type | Description |
|---|---|---|
command |
string | The program to start. Required. |
args |
array of strings | Its arguments. |
env |
object | Extra environment variables. |
cwd |
string | Working directory, relative to the project. Defaults to the project root. |
HTTP servers
Section titled “HTTP servers”| Key | Type | Description |
|---|---|---|
url |
string | The server’s URL. Required. |
type |
string | http, sse or streamable-http. Optional: a server with a url and no command is HTTP. |
headers |
object | Extra request headers. They are never sent to another origin on a redirect. |
oauth |
object | Optional OAuth overrides; see below. |
Only needed when a server doesn’t support dynamic client registration.
| Key | Type | Description |
|---|---|---|
clientId |
string | A pre-registered client id. |
clientSecret |
string | Its secret. Use ${VAR} rather than the literal. |
scopes |
array of strings | Scopes to request. |
callbackPort |
number | The local port for the sign-in redirect. Default 33418. |
Environment variables
Section titled “Environment variables”${NAME} in command, args, env values, cwd, url, headers values and clientSecret is
replaced with the environment variable’s value, or an empty string when it isn’t set.
theme and colors
Section titled “theme and colors”theme names a built-in theme or one of your own, and colors changes
single roles on top of it. The
setup wizard saves theme for you. --theme and
/theme override it. NO_COLOR still turns color off entirely.
| Theme | Description |
|---|---|
default |
anchor’s usual colors. |
bright |
The bright variants and no dim text, for dark terminals whose normal colors are too dark. |
light |
For light backgrounds: no yellow or bright colors, which wash out on white. Warnings are magenta. |
mono |
No colors, only bold, dim and underline. |
rust |
Warm oranges and rust reds around white text, for dark backgrounds. |
Themes use the terminal’s own 16 colors, so they follow its palette and read on light and dark
backgrounds alike; light is for palettes where yellow is hard to read on white. rust is the
exception: the 16 have no orange, so it uses the 256-color palette, which most terminals support.
A color in colors is one or more of these words, separated by spaces:
black, red, green, yellow, blue, magenta, cyan, white, gray, bright-red,
bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white,
bold, dim, italic, underline, a 256-color
number from 0 to 255 (208 is orange), a hex color such as #ff6a1f, or none for plain text.
on makes the color after it the background: "sand on #2a201b".
Hex colors are drawn as the closest 256-color on terminals that don’t show 24-bit color; see
Hex colors on other terminals.
{ "theme": "bright", "colors": { "accent": "bold magenta", "comment": "gray italic", "border": "238" }}| Role | Used for |
|---|---|
text |
Plain text and the screen behind it, such as "#eadfd4 on #1c1512". Full screen only; unset, it’s the terminal’s own. |
accent |
The prompt caret, the title, the spinner and the picker’s choice. |
tool |
A tool call’s name. |
agent |
A sub-agent’s tag. |
success |
Passed checks, added lines in a diff. |
warning |
Notices, approval questions. |
error |
Errors, removed lines in a diff. |
muted |
Tool arguments, token counts, hints, table and quote borders. |
border |
The line above the prompt and the status line. |
heading |
Markdown headings. |
link |
Markdown links. |
selection |
The chosen suggestion and search matches, such as "on #3a2a22". Unset, they’re the accent and reversed colors. |
code |
Inline code, and code blocks in a language anchor can’t highlight. |
codeblock |
The background of a whole code block, to the edge of the screen, such as "on #261c18". Full screen only. |
comment, string, constant, keyword, function, type |
Syntax highlighting in code blocks. |
An unknown theme, role or color word is reported when anchor starts, and the rest still applies. So is anything in a theme file that can’t be read.
The full-screen REPL rings the terminal bell when a turn ends or an approval or question is
waiting, if you haven’t pressed a key or scrolled for 10 seconds. If you’re watching, it stays
quiet. How a bell shows up is up to the terminal: a sound, a flash, or a mark on the tab or
window. "bell": false turns it off.
Where the full-screen REPL puts the prompt and status line. "bottom", the default, puts them
under the conversation. "top" puts them at the top of the screen, with the conversation under
them and suggestions opening below the prompt. /dock
switches for a session. An unknown value is reported when anchor starts, and the bottom is used.
autoUpdate
Section titled “autoUpdate”An interactive session checks for a new release once a day. If anchor was installed with an
install script or from a release archive, it downloads the release into ~/.anchor/update,
checks it against the release’s SHA256SUMS, and installs it the next time anchor starts. If
Homebrew, Scoop or winget installed it, or anchor can’t write to the folder it’s in, anchor only
tells you the release is out. -p and --json never check. "autoUpdate": false turns it off.
trackedFiles
Section titled “trackedFiles”Before and after each tool call, anchor checks whether files the model has read changed on disk,
so it can tell the model its copy is out of date. It checks the 50 files read most recently, with
one size-and-time lookup each. On a slow network share those lookups add up, so lower the number
there; raise it for long sessions on a local disk. "trackedFiles": 0 turns the checks off.
Whatever the number, anchor never overwrites a file that changed after the model read it: a write compares the file with what the model read and is refused if they differ.