reference
Configuration.
Two layers: global defaults at ~/.anthracode/config.json, project overrides at .anthracode/config.json or anthracode.config.ts.
Resolution order
- Built-in defaults.
~/.anthracode/config.json(global)..anthracode/config.json(project).anthracode.config.ts(project, typed).- Command-line flags.
Later layers shallow-merge over earlier ones. Lists are replaced, not concatenated.
Typed config
~/anthracode.config.ts
import { defineConfig } from "anthracode-ai";
export default defineConfig({
model: "claude-opus-4-7",
memory: {
enabled: true,
dir: ".anthracode/memory",
sections: ["user", "project", "shared", "scratch"],
},
tasks: {
enabled: true,
dir: ".anthracode/tasks",
},
mcp: {
supabase: { url: "https://mcp.supabase.com/mcp" },
stripe: { url: "https://mcp.stripe.com" },
},
permissions: {
"Bash(rm *)": "ask",
"Edit": "allow",
},
});Permission gates
Per-tool, per-pattern allow / ask / deny rules. Useful for keeping the agent away from anything destructive without prompting.
~/anthracode.config.ts
permissions: {
"Bash(npm publish*)": "deny",
"Bash(git push --force*)": "ask",
"Bash(git*)": "allow",
"Edit": "allow",
}Provider keys
Provider API keys live in the OS keychain when possible (anthracode auth login) or in environment variables as a fallback. They are not read from config.json.
~/.env (fallback)
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=...