Skip to content

Settings & environment variables

Layered settings

Priority low → high (later wins):

LayerPathPurpose
user$FORGEAX_CONFIG_DIR/settings.json or ~/.forgeax/settings.jsonGlobal prefs
project<cwd>/.forgeax/settings.jsonTeam-shared (committable)
local<cwd>/.forgeax/settings.local.jsonMachine-private (auto-gitignored on write)

Merge semantics: deep-merge objects, union+dedupe arrays, overwrite scalars.

Example

~/.forgeax/settings.json:

json
{
  "model": "claude-opus-4-8",
  "permissions": {
    "defaultMode": "default",
    "allow": ["Read", "Bash(git *)"],
    "ask": ["Bash(git push*)"],
    "deny": ["Bash(rm *)", "Write(/etc/*)"]
  },
  "sandbox": {
    "enabled": false
  }
}

Directory layout

text
~/.forgeax/                 # or $FORGEAX_CONFIG_DIR
  settings.json
  skills/
  commands/
  mcp.json

<project>/.forgeax/
  settings.json             # committable
  settings.local.json       # local
  skills/
  commands/
  mcp.json
  sessions/                 # WAL
  memory/                   # auto-memory

Environment variables

VariableRole
ANTHROPIC_API_KEY / ANTHROPIC_BASE_URLAnthropic Messages credentials & endpoint
OPENAI_API_KEY / OPENAI_BASE_URLOpenAI-compatible family (set FORGEAX_PROVIDER_API=openai-compat)
FORGEAX_PROVIDER_APIForce provider backend id (openai-compat, anthropic-messages, gemini, …)
FORGEAX_MODELDefault model (overridable by --model)
FORGEAX_CONFIG_DIRGlobal config root (default ~/.forgeax)
FORGEAX_MEMORY_DIRAuto-memory directory
FORGEAX_SANDBOXEnable OS Bash sandbox
FORGEAX_SEARCH_URLweb_search backend
BRAVE_API_KEYOptional search backend
FORGEAX_NO_TUIDisable Ink TUI
FORGEAX_MCP_ALLOW_WRITESAllow mutating tools in mcp-serve
FORGEAX_CORE_SOCKFallback sock path for --serve

Hosts (e.g. Studio) that use a proxy gateway should translate that config into these neutral variables before injecting them. The CLI itself is not tied to a specific proxy product name.

Model selection

bash
forgeax --model claude-opus-4-8
forgeax --model gpt-4.1                 # name prefix infers openai-compat
export FORGEAX_PROVIDER_API=openai-compat   # when protocol cannot be inferred from the model name

Next

Apache-2.0 · Open source