@globant/coda-darwin-x64 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/assets/agents/coda-help.md +166 -0
  2. package/assets/agents/create-workflow.md +264 -0
  3. package/assets/agents/explore.md +26 -0
  4. package/assets/docs/agents.md +162 -0
  5. package/assets/docs/cli-reference.md +131 -0
  6. package/assets/docs/cli-vs-batch.md +58 -0
  7. package/assets/docs/config-json.md +314 -0
  8. package/assets/docs/config-reference.md +329 -0
  9. package/assets/docs/configuration.md +105 -0
  10. package/assets/docs/connect-provider.md +77 -0
  11. package/assets/docs/extensions.md +260 -0
  12. package/assets/docs/faq.md +152 -0
  13. package/assets/docs/glossary.md +41 -0
  14. package/assets/docs/guide-automate.md +135 -0
  15. package/assets/docs/guide-changes.md +101 -0
  16. package/assets/docs/guide-collaborate.md +119 -0
  17. package/assets/docs/guide-extend.md +120 -0
  18. package/assets/docs/guide-understand.md +95 -0
  19. package/assets/docs/hooks.md +704 -0
  20. package/assets/docs/how-it-works.md +73 -0
  21. package/assets/docs/index.md +62 -0
  22. package/assets/docs/installation.md +71 -0
  23. package/assets/docs/logging.md +123 -0
  24. package/assets/docs/overview.md +91 -0
  25. package/assets/docs/permissions.md +93 -0
  26. package/assets/docs/quickstart.md +104 -0
  27. package/assets/docs/sessions.md +139 -0
  28. package/assets/docs/shortcuts.md +61 -0
  29. package/assets/docs/tools-reference.md +81 -0
  30. package/assets/docs/workflows.md +146 -0
  31. package/assets/skills/create-extension/SKILL.md +293 -0
  32. package/assets/skills/create-hook/SKILL.md +442 -0
  33. package/assets/skills/create-skill/SKILL.md +180 -0
  34. package/assets/skills/plan/SKILL.md +25 -0
  35. package/coda +0 -0
  36. package/lib/keytar/build/Release/keytar.node +0 -0
  37. package/lib/keytar/lib/keytar.js +43 -0
  38. package/lib/opentui/assets/javascript/highlights.scm +205 -0
  39. package/lib/opentui/assets/javascript/tree-sitter-javascript.wasm +0 -0
  40. package/lib/opentui/assets/markdown/highlights.scm +150 -0
  41. package/lib/opentui/assets/markdown/injections.scm +27 -0
  42. package/lib/opentui/assets/markdown/tree-sitter-markdown.wasm +0 -0
  43. package/lib/opentui/assets/markdown_inline/highlights.scm +115 -0
  44. package/lib/opentui/assets/markdown_inline/tree-sitter-markdown_inline.wasm +0 -0
  45. package/lib/opentui/assets/typescript/highlights.scm +604 -0
  46. package/lib/opentui/assets/typescript/tree-sitter-typescript.wasm +0 -0
  47. package/lib/opentui/assets/zig/highlights.scm +284 -0
  48. package/lib/opentui/assets/zig/tree-sitter-zig.wasm +0 -0
  49. package/lib/opentui/libopentui.dylib +0 -0
  50. package/lib/opentui/parser.worker.js +4244 -0
  51. package/lib/opentui/tree-sitter-3jzf13jk.wasm +0 -0
  52. package/lib/ripgrep/COPYING +3 -0
  53. package/lib/ripgrep/LICENSE-MIT +21 -0
  54. package/lib/ripgrep/UNLICENSE +24 -0
  55. package/lib/ripgrep/rg +0 -0
  56. package/package.json +20 -0
@@ -0,0 +1,131 @@
1
+ # Commands & Flags
2
+
3
+ Reference for the slash commands available in the interactive TUI, plus the shell flags you pass when launching CODA from the terminal. Type `/help` inside CODA at any time to see the current list (extensions may add more).
4
+
5
+ ## Session management
6
+
7
+ | Command | What it does |
8
+ | --- | --- |
9
+ | `/sessions` | Browse, resume, rename, and delete saved sessions |
10
+ | `/new` | Start a fresh session (old one is saved) |
11
+ | `/exit` (alias `/quit`) | Exit CODA; prints `coda --session-id <id>` so you can resume later |
12
+ | `/clear` | Permanently wipe the current session's message history (the session itself stays) |
13
+
14
+ ## Files and changes
15
+
16
+ | Command | What it does |
17
+ | --- | --- |
18
+ | `/timeline` (alias `/rewind`) | Open the timeline picker to view and restore checkpoints from this session |
19
+ | `/init` | Analyze the project and generate an `AGENTS.md` file |
20
+ | `/project` | Switch the active Glob.AI OS project (Glob.AI OS OAuth only) |
21
+
22
+ ## Configuration
23
+
24
+ | Command | What it does |
25
+ | --- | --- |
26
+ | `/providers` | Connect, add, update, or remove providers (the setup wizard; same as `--reconfigure`; restart required) |
27
+ | `/switch-profile` (alias `/sp`) | Switch the active provider profile among the ones you've already configured. With no argument it opens the profile picker; `/switch-profile <profile-id>` selects one directly. The change is saved as `activeProfile` and applies on the next launch |
28
+ | `/switch-model` (alias `/sm`) | Open the model picker. `/switch-model <provider/model>` applies for this session; `/switch-model save <provider/model>` also saves it as the default for new sessions |
29
+ | `/login` | Authenticate with Glob.AI OS via browser (OAuth PKCE) when `auth` is configured |
30
+ | `/effort [<level>]` | Set the model's thinking (reasoning) effort — `low`, `medium`, `high`, `xhigh`, `max`. With no level, pick from the levels the current model supports; some models don't support effort at all |
31
+ | `/logout` | Sign out of your Glob.AI OS session |
32
+ | `/settings` | Open the settings panel: UI theme, bash approval, compaction |
33
+ | `/auth-status` (alias `/whoami`) | Show the current authentication status |
34
+
35
+ ## Tools and extensions
36
+
37
+ | Command | What it does |
38
+ | --- | --- |
39
+ | `/mcp` | Open the MCP manager — add a server, edit `mcp.json`, list servers, view tools, reload |
40
+ | `/mcp status` | Show each server's connection status |
41
+ | `/mcp list-tools [server]` | List the tools a server exposes |
42
+ | `/mcp enable <server>` / `/mcp disable <server>` | Toggle a server for this session |
43
+ | `/skills` | Open the skills manager (no args), or use a subcommand |
44
+ | `/skills list` | List skills and their enabled state |
45
+ | `/skills enable <name>` / `/skills disable <name>` | Toggle a skill |
46
+ | `/skills add <url> [project\|global]` | Install a skill from GitHub |
47
+ | `/skills refresh` | Re-scan the skill directories |
48
+ | `/extensions` | Manage loaded extensions (`list`, `guide`) |
49
+ | `/plugin` | Install, enable, disable, and list plugins |
50
+ | `/reload-plugins` | Reload plugins after you change them on disk |
51
+ | `/agents` | Open the Agents overlay — browse definitions and active runs |
52
+ | `/agents overview` (or `/agents runs`) | Show recent runs and the agent library in chat |
53
+ | `/agents library` | List reusable agent definitions only |
54
+ | `/agents status` | Print whether agents are currently enabled |
55
+ | `/agents enable [global|project]` | Turn agents on (optionally scoped) |
56
+ | `/agents disable [global|project]` | Turn agents off (optionally scoped) |
57
+ | `/agents run [--foreground] <name> <task>` | Start a named agent with the given task (background by default) |
58
+ | `/agents stop <id>` | Cancel a run (a unique ID prefix is enough) |
59
+ | `/agents open <id>` | Inspect a specific run’s details and recent activity |
60
+ | `/agents transcript <id>` | Switch to the child session’s transcript |
61
+ | `/workflows` | Open the workflow dashboard (live run → phase → agent tree and history) |
62
+ | `/workflows stop [runId]` | Stop a workflow run; omit the id to stop all in-flight runs |
63
+
64
+ ## Context
65
+
66
+ | Command | What it does |
67
+ | --- | --- |
68
+ | `/compact` | Manually condense conversation history to free up context |
69
+ | `/upgrade` | Check for a newer version and open the update dialog |
70
+ | `/help` | Print the full list of available commands |
71
+
72
+ ## Shell flags (run before opening CODA)
73
+
74
+ | Flag | What it does |
75
+ | --- | --- |
76
+ | `coda --help` / `-h` | Print CLI usage and exit |
77
+ | `coda --version` / `-v` | Print the installed version |
78
+ | `coda --reconfigure` | Open the provider setup wizard (interactive terminal only) |
79
+ | `coda --lastsession` | Resume the most recent session for this project |
80
+ | `coda --session-id <id>` / `-s` | Resume (or create) a specific session |
81
+ | `coda -p "prompt"` / `--prompt` | Run in batch (headless) mode |
82
+ | `coda --prompt-file <path>` / `-pf` | Read the headless prompt from a file |
83
+ | `coda --output text\|json` | Output format for headless runs (`json` emits structured events) |
84
+ | `coda --auto-approve all\|none` | Headless approval handling (use `all` in CI) |
85
+ | `coda --tools <list>` / `-t` | Limit which tools are available for the run |
86
+ | `coda --timeout <ms>` | Abort a headless run after the given time |
87
+ | `coda --checkpoints[=true\|false]` | Force checkpoints on or off for this run |
88
+ | `coda --bash-security <level>` | Set the bash approval level for this run |
89
+ | `coda --model <name>` / `-m` | Use a specific model for this run |
90
+ | `coda -e <path>` | Load an extra extension file for this run |
91
+ | `coda --mcp-config <path>` | Point at a specific `mcp.json` for this run |
92
+ | `coda --system-prompt <text>` | Replace the built-in base system prompt for this run |
93
+ | `coda --append-system-prompt <text>` | Append extra instructions after the normal system prompt |
94
+ | `coda --cwd <dir>` | Override the working directory for this run |
95
+ | `coda --coda-home <dir>` | Use an alternate config/data home (equivalent to `CODA_HOME` env var) |
96
+ | `coda --profile <id>` | Select a persisted profile for this run (read-only) |
97
+ | `coda --provider <name>` | Ephemeral provider for a headless run (`glob-ai \| openai-compat \| ollama`) |
98
+ | `coda --instance <id>` | Glob.AI OS instance for a headless run (e.g. `saas-europe`) |
99
+ | `coda --base-url <url>` | Base URL for `openai-compat` / `ollama` runs |
100
+ | `coda --api-key <key>` | Ephemeral API key for this run (never persisted) |
101
+
102
+ ## Subcommands (run as `coda <command>`)
103
+
104
+ Beyond launching a session, `coda` exposes a few standalone subcommands:
105
+
106
+ | Command | What it does |
107
+ | --- | --- |
108
+ | `coda install` | Add the coda binary directory to `PATH` (macOS/Linux: updates shell rc files; Windows: updates user Path env var) |
109
+ | `coda upgrade` | Download and install the platform-native CODA binary from the release feed |
110
+ | `coda logs` | Open the log viewer (or stream when piped); supports filters and `--follow` |
111
+ | `coda logs export` | Write a redacted support bundle to `~/.coda/exports/` — see [View & Share Logs](#logging) |
112
+ | `coda plugin install <source>` | Install a plugin from npm, a Git URL, or a local path. Flags: `--scope global\|project` (default `global`; `project` also records it in `<project>/.coda/plugins.json`), `--name <folder>` (pick a subfolder in a monorepo repo), `--copy` (copy-based install for local paths). Note: a `plugin-id@marketplace-id` argument is **not** supported |
113
+ | `coda marketplace install <source>` | Register a plugin marketplace catalog. Flags: `--id <id>`, `--display-name <name>`, `--root-path <path>` |
114
+ | `coda checkpoints-demo` | Smoke-test the checkpoint subsystem against a throwaway project |
115
+ | `coda logs-demo` | Self-test the logging pipeline end to end |
116
+
117
+ ## Notes and examples
118
+
119
+ - **Slash commands work only inside the interactive TUI.** Shell flags and subcommands work from your terminal.
120
+ - **`--auto-approve` defaults to `all` in headless runs** so scripts don't hang; pass `--auto-approve none` to refuse anything that would need approval and abort.
121
+ - **`--checkpoints` only records snapshots in headless mode** — there's no `/timeline` picker to restore from without the TUI.
122
+
123
+ A typical headless invocation pulling several flags together:
124
+
125
+ ```bash
126
+ coda -p "Run the test suite and summarize failures" \
127
+ --auto-approve all \
128
+ --output json \
129
+ --tools read,glob,grep,bash \
130
+ --timeout 600000
131
+ ```
@@ -0,0 +1,58 @@
1
+ # Interactive vs Headless
2
+
3
+ You run CODA from your terminal with the `coda` command, which works in two modes. **Interactive** mode opens a full-screen terminal UI (TUI) for back-and-forth work; **headless** (batch) mode runs one prompt and exits, with no UI. Choosing the right one for the job makes a big difference.
4
+
5
+ ## Which one to use
6
+
7
+ | | Interactive (TUI) | Headless (Batch) |
8
+ | --- | --- | --- |
9
+ | **How you run it** | `coda` | `coda -p "prompt"` |
10
+ | **Interface** | Full-screen TUI | No UI — stdout only |
11
+ | **Best for** | Day-to-day development | Scripts and CI |
12
+ | **Interaction** | Multi-turn conversation | Single prompt, then exits |
13
+ | **Approval dialogs** | You approve each command | Defaults to `--auto-approve all`; pass `--auto-approve none` to block any unapproved action |
14
+ | **Checkpoints** | On by default | Disabled by default; enable with `--checkpoints`, but `/timeline` rollback requires the TUI |
15
+
16
+ ## Interactive (TUI)
17
+
18
+ The interactive TUI is how most people use CODA. Open it in your project, start a conversation, and work iteratively. You can review every change before it happens, ask follow-up questions, and navigate the session history.
19
+
20
+ ```bash
21
+ cd my-project
22
+ coda
23
+ ```
24
+
25
+ Use slash commands to control the session: `/sessions`, `/timeline`, `/settings`, `/compact`, and more. See the [Commands & Flags reference](#cli-reference) for the full list.
26
+
27
+ ## Batch (Headless)
28
+
29
+ Batch mode is for automation. Pass a prompt, CODA runs it, and exits with a non-zero code if something goes wrong — which makes it easy to use in scripts.
30
+
31
+ ```bash
32
+ coda -p "Run the test suite and report failures" --auto-approve all
33
+ ```
34
+
35
+ Batch runs a **single turn** — one prompt in, one result out — then exits. There's no follow-up conversation, no interactive review, and no `/timeline` to roll back from. Because there's no one to answer an approval prompt, the `ask_user` tool is removed and bash auto-approval defaults to `all`. Use `--output json` to get machine-readable events, and check the exit code in your script.
36
+
37
+ **Alternative prompt sources** — instead of `-p`, you can also pass a file (`--prompt-file PATH` / `-pf`) or pipe stdin into `coda`. All three are mutually exclusive.
38
+
39
+ **Key batch flags:**
40
+
41
+ | Flag | What it does |
42
+ | --- | --- |
43
+ | `--auto-approve none` | Refuse any action that needs approval (fail fast; useful for safety checks) |
44
+ | `--timeout MS` | Abort the run after the given milliseconds and exit non-zero |
45
+ | `--tools LIST` | Limit which tools are available (e.g. `read,glob,grep`) |
46
+ | `--bash-security LVL` | Override the bash auto-approve tier for this run |
47
+ | `-s / --session-id ID` | Resume an existing session in headless mode |
48
+ | `--lastsession` | Resume the most recent session in headless mode |
49
+ | `--checkpoints` | Enable checkpoint creation (no TUI restore, but useful for diff workflows) |
50
+
51
+ See [Automate with Batch Mode](#guide-automate) for full examples.
52
+
53
+ ## How to choose
54
+
55
+ - **Reach for interactive** when you want to review changes as they happen, ask follow-ups, or work iteratively on something non-trivial. This is the default for day-to-day coding.
56
+ - **Reach for headless** when the task is well-defined and you don't need to watch it: a CI step, a scripted chore across repos, or an unattended analysis you'll read later.
57
+
58
+ A good rule of thumb: if you'd want to press **Esc** and redirect partway through, use interactive. If you'd be comfortable walking away, headless is fine.
@@ -0,0 +1,314 @@
1
+ # config.json — A Complete Example
2
+
3
+ This page is a **comprehensive, annotated `config.json`** — every block CODA understands, in one place, so you can see how to change a setting by hand. Most people never edit this file directly: `/settings`, `/providers`, `/effort`, and the setup wizard write it for you. But when you want to script a setup, review what a teammate committed, or change something there's no UI for, this is the reference.
4
+
5
+ For a field-by-field table of the most common keys, see [Configuration Reference](#config-reference). For *how* settings cascade and where the files live, see [Configuration](#configuration).
6
+
7
+ ## Where this file lives
8
+
9
+ | File | Scope |
10
+ | --- | --- |
11
+ | `~/.coda/config.json` | Your user-global settings (apply in every project) |
12
+ | `<project>/.coda/config.json` | Project overrides (commit to share with the team) |
13
+ | `<project>/coda.config.ts` | TypeScript config — takes priority over JSON if present |
14
+
15
+ Settings cascade in priority order: **CLI flags → project config → global config → built-in defaults**. A project file only needs the keys it wants to override; everything else falls back to your global file and then to defaults.
16
+
17
+ > **Every block below is optional.** A real `config.json` only contains the keys you actually set — most commonly `activeProfile` and a `profiles` map (the wizard writes these). The example here is intentionally exhaustive so you can copy the one block you need.
18
+
19
+ ## The complete example
20
+
21
+ ```jsonc
22
+ {
23
+ // ── Active provider: activeProfile + profiles ──────────────────────────
24
+ // This is the ONLY provider config CODA writes to disk. "activeProfile" names
25
+ // the profile currently in use; "profiles" is the map of switchable targets.
26
+ // Both are managed by /providers and /switch-profile — you rarely hand-edit
27
+ // them. Each profile's "provider" is one of: "glob-ai" | "openai-compat" | "ollama".
28
+ "activeProfile": "geai-oauth",
29
+ "profiles": {
30
+ // Glob.AI OS via OAuth (browser login). Tokens live in the OS keyring, so
31
+ // no key is stored here. "instance" is a preset ("clients" | "corp" |
32
+ // "saas-europe") or a custom id (a custom id also needs its own "baseUrl").
33
+ "geai-oauth": {
34
+ "provider": "glob-ai",
35
+ "label": "Glob.AI OS (OAuth)",
36
+ "instance": "saas-europe",
37
+ "auth": { "method": "oauth" },
38
+ "model": "anthropic/claude-opus-4-8",
39
+ // Optional per-tier models for the agents "fast"/"smart"/"deep" shortcuts:
40
+ "fastModel": "anthropic/claude-haiku-4",
41
+ "smartModel": "anthropic/claude-sonnet-4",
42
+ "deepModel": "anthropic/claude-opus-4-8"
43
+ },
44
+ // Any OpenAI-compatible HTTP API. Key is resolved from ~/.coda/.secrets via secretRef.
45
+ "my-compat": {
46
+ "provider": "openai-compat",
47
+ "label": "My OpenAI-compat server",
48
+ "baseUrl": "https://api.example.com/v1",
49
+ "auth": { "method": "apikey", "secretRef": "MY_API_KEY" },
50
+ "model": "my-model"
51
+ },
52
+ // Local Ollama. Keyless; baseUrl optional (defaults to http://127.0.0.1:11434/v1).
53
+ "local-ollama": {
54
+ "provider": "ollama",
55
+ "label": "Local Ollama",
56
+ "baseUrl": "http://127.0.0.1:11434/v1",
57
+ "auth": { "method": "none" },
58
+ "model": "llama3.1"
59
+ }
60
+ },
61
+
62
+ // UI theme: "classic" or "modern".
63
+ "theme": "classic",
64
+
65
+ // Max agent-loop steps per turn (each step is one model request that may run
66
+ // tools). Default 300. Raise for very long autonomous runs; lower to cap cost.
67
+ "maxSteps": 300,
68
+
69
+ // Background update check: true (check + notify), false (off), or "notify".
70
+ "autoupdate": "notify",
71
+
72
+ // Error-recovery posture: "balanced" (default), "conservative", "aggressive".
73
+ "errorHandling": { "posture": "balanced" },
74
+
75
+ // NOTE: The top-level "provider" (string) and "providers" (map) keys are
76
+ // NOT written here anymore. They are a legacy RUNTIME-ONLY layer that CODA
77
+ // derives from the active profile at launch and never persists to disk. You
78
+ // don't add them by hand; the profiles above are the source of truth. See
79
+ // "The legacy providers map" below if you're maintaining an old config.
80
+
81
+ // ── Authentication preferences (Glob.AI OS) ─────────────────────────────────
82
+ "auth": {
83
+ // Prefer OAuth access tokens or a static API key.
84
+ "methodPreference": "access_token",
85
+ "callbackTimeout": 300,
86
+ "tokenRefreshThreshold": 300
87
+ },
88
+
89
+ // ── Bash tool approvals ───────────────────────────────────────────────
90
+ // autoApproveLevel: which risk tier runs WITHOUT asking. "safe" < "low" <
91
+ // "medium" < "high". Truly destructive commands are never auto-approved.
92
+ // shellMode: "auto" | "bash" | "powershell" | "wsl" (or an explicit path).
93
+ "bash": {
94
+ "autoApproveLevel": "low",
95
+ "shellMode": "auto"
96
+ },
97
+
98
+ // ── Reasoning (thinking) effort ───────────────────────────────────────
99
+ // effort: "low" | "medium" | "high" | "xhigh" | "max". Per-model support
100
+ // varies. Change live with /effort.
101
+ "reasoning": {
102
+ "enabled": true, // Default: false
103
+ "effort": "medium"
104
+ },
105
+
106
+ // ── Compaction (auto context trimming) ────────────────────────────────
107
+ "compaction": {
108
+ "enabled": true,
109
+ "threshold": 0.75,
110
+ "retainFraction": 0.3
111
+ },
112
+
113
+ // ── Fallback provider/model on failure ────────────────────────────────
114
+ "fallback": {
115
+ "enabled": true, // Default: false
116
+ "provider": "geai-apikey",
117
+ "model": "anthropic/claude-sonnet-4"
118
+ },
119
+
120
+ // ── Agents / sub-agents ───────────────────────────────────────────────
121
+ "agents": {
122
+ "enabled": true,
123
+ "maxConcurrent": 6,
124
+ // "defaultModel" is LEGACY: kept for older configs. Delegated runs now use
125
+ // your main session model unless an agent definition sets its own "model".
126
+ "defaultModel": "anthropic/claude-sonnet-4",
127
+ // Tier overrides used by the "fast"/"smart"/"deep" agent shortcuts:
128
+ "fastModel": "anthropic/claude-haiku-4",
129
+ "smartModel": "anthropic/claude-sonnet-4",
130
+ "deepModel": "anthropic/claude-opus-4-8",
131
+ // Bundled or discovered agents to hide from run_agent until re-enabled.
132
+ "disabledDefinitions": []
133
+ },
134
+
135
+ // ── Built-in tools ────────────────────────────────────────────────────
136
+ "tools": {
137
+ "glob": { "enabled": true, "max_results": 100 },
138
+ "grep": {
139
+ "enabled": true,
140
+ "backend": "ripgrep" // or "fastgrep"
141
+ // "index_path": "/abs/path/to/.coda/fgr" // fastgrep only
142
+ }
143
+ },
144
+
145
+ // ── Vision (examine_images) ───────────────────────────────────────────
146
+ // A LiteLLM-style model id. Set useMainAgentModel:true to reuse the chat model.
147
+ "vision": {
148
+ "model": "openai/gpt-5.4"
149
+ },
150
+
151
+ // ── Web search tool ───────────────────────────────────────────────────
152
+ "webSearch": {
153
+ "provider": "brave", // "exa" | "brave" | "serper"
154
+ "apiKey": "${BRAVE_API_KEY}"
155
+ },
156
+
157
+ // ── Extra extensions to load ──────────────────────────────────────────
158
+ // Paths to extension modules (in addition to auto-discovered .coda/extensions).
159
+ "extensions": ["./.coda/extensions/my-tool.ts"],
160
+
161
+ // ── Skills tuning ─────────────────────────────────────────────────────
162
+ "skills": {
163
+ "descriptionMaxChars": 200,
164
+ "warnThreshold": 100
165
+ },
166
+
167
+ // ── Checkpoints (file snapshots / undo) ───────────────────────────────
168
+ "checkpoints": {
169
+ "enabled": true,
170
+ "diskSoftCapMb": 2048,
171
+ "diskHardCapMb": 5120,
172
+ "maxWorktreeFiles": 100000
173
+ },
174
+
175
+ // ── Session auto-rename ───────────────────────────────────────────────
176
+ "session": {
177
+ "autoRenameEnabled": true,
178
+ "autoRenameTimeoutMs": 5000,
179
+ "autoRenameMaxRetries": 3
180
+ },
181
+
182
+ // ── Composer (input area) behavior while CODA is busy ─────────────────
183
+ "composer": {
184
+ "whileBusy": { "delivery": "queue" }, // "queue" | "steer"
185
+ "queueSteer": { "enabled": true, "defaultMode": "later" } // defaultMode: "next" | "later"
186
+ },
187
+
188
+ // ── MCP servers (inline) ──────────────────────────────────────────────
189
+ // Optional. You can also declare these in ~/.coda/mcp.json or
190
+ // <project>/.coda/mcp.json (all tiers are merged). stdio uses command+args;
191
+ // http uses url. See #tools-reference.
192
+ "mcp": {
193
+ "servers": {
194
+ "github": {
195
+ "transport": "stdio",
196
+ "command": "npx",
197
+ "args": ["-y", "@modelcontextprotocol/server-github"],
198
+ "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
199
+ }
200
+ }
201
+ },
202
+
203
+ // ── Editor / IDE integration (ACP) ────────────────────────────────────
204
+ "acp": { "enabled": true },
205
+
206
+ // ── Logging ───────────────────────────────────────────────────────────
207
+ "logging": {
208
+ "level": "info",
209
+ "levels": { "core.agent": "debug" },
210
+ "redact": {
211
+ "denyKeys": ["x-internal-token"],
212
+ "keySubstrings": ["secret"],
213
+ "valuePatterns": ["sk-[A-Za-z0-9]+"]
214
+ },
215
+ "rawViewer": { "enabled": false }
216
+ },
217
+
218
+ // ── Telemetry (OpenTelemetry export) ──────────────────────────────────
219
+ "telemetry": {
220
+ "enabled": false,
221
+ "exporter": "otlp",
222
+ "otlpProtocol": "http", // "http" | "grpc"
223
+ "otlpHost": "http://localhost:4318", // collector; omit to use the build default
224
+ "otlpUseTls": false, // true for HTTPS/gRPC TLS
225
+ "serviceName": "coda", // custom service name in traces
226
+ "tracesEnabled": true,
227
+ "metricsEnabled": true
228
+ }
229
+ }
230
+ ```
231
+
232
+ > **`.json` vs `.jsonc`.** The comments above are for explanation. CODA's `config.json` is parsed leniently, but if your editor flags comments as invalid JSON, strip them — the keys and values are what matter.
233
+
234
+ ## Secrets: keep keys out of the file
235
+
236
+ Never paste raw API keys into `config.json`. Store them in `~/.coda/.secrets` (dotenv format). API-key profiles reference a secret by **name** via `auth.secretRef`; other blocks (like `webSearch`) use `${VAR}` interpolation:
237
+
238
+ ```bash
239
+ # ~/.coda/.secrets
240
+ MY_API_KEY=sk-...
241
+ BRAVE_API_KEY=...
242
+ ```
243
+
244
+ ```jsonc
245
+ // ~/.coda/config.json
246
+ {
247
+ "activeProfile": "my-compat",
248
+ "profiles": {
249
+ "my-compat": {
250
+ "provider": "openai-compat",
251
+ "label": "My server",
252
+ "baseUrl": "https://api.example.com/v1",
253
+ "auth": { "method": "apikey", "secretRef": "MY_API_KEY" }
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ The `.secrets` file is never committed and its values are scrubbed from logs before anything is written to disk.
260
+
261
+ ## Common edits, by goal
262
+
263
+ | You want to… | Edit |
264
+ | --- | --- |
265
+ | Switch the active model | `profiles.<id>.model` (or `/model` live) |
266
+ | Add a provider | A new entry under `profiles` (use `/providers`); API-key ones reference a `secretRef` in `.secrets` |
267
+ | Switch which provider is active | `activeProfile` (or `/switch-profile` / `/sp` live) |
268
+ | Switch OAuth ↔ API key | the profile's `auth` block (`{ "method": "oauth" }` vs `{ "method": "apikey", "secretRef": "VAR" }`) |
269
+ | Let bash run more without asking | `bash.autoApproveLevel` (e.g. `"high"`) — see [Permissions & Approvals](#permissions) |
270
+ | Change thinking effort | `reasoning.effort` (or `/effort` live) |
271
+ | Cap or widen parallel agents | `agents.maxConcurrent` (1–10) |
272
+ | Turn off a noisy bundled agent | add its name to `agents.disabledDefinitions` |
273
+ | Use the faster search engine | `tools.grep.backend: "fastgrep"` |
274
+ | Add an MCP server | `mcp.servers` here, or `~/.coda/mcp.json` — see [Tools Reference](#tools-reference) |
275
+ | Quiet or verbose logs | `logging.level` / `logging.levels` |
276
+ | Disable update checks | `autoupdate: false` |
277
+
278
+ ## Environment variables
279
+
280
+ A couple of settings are controlled by env vars instead of (or on top of) the file:
281
+
282
+ | Variable | Default | Description |
283
+ | --- | --- | --- |
284
+ | `LOG_LEVEL` | `info` | Log verbosity. A bare token sets the global floor; `service:level` overrides per service (e.g. `info,core.agent:debug`). Overrides `logging.*`. |
285
+ | `CODA_HOME` | `~/.coda` | Alternative home for config, secrets, sessions, logs, and checkpoints. |
286
+
287
+ ## The legacy `providers` map
288
+
289
+ Older configs (and the runtime, internally) use a top-level **`provider`** string plus a **`providers`** map keyed by provider *type* (`geai`, `openai-compat`, `ollama`, `openai`, `anthropic`, `google`, `groq`, `openrouter`, `azure`, `vertex`). **CODA no longer writes these to disk** — at launch it derives an equivalent runtime map from your active profile. You don't need to add them by hand.
290
+
291
+ If you're maintaining a config that still uses the old shape, it continues to work, but migrate to `activeProfile` + `profiles` (run `/providers`) when you can. A legacy entry looks like:
292
+
293
+ ```jsonc
294
+ {
295
+ "provider": "geai-apikey",
296
+ "model": "anthropic/claude-opus-4-8",
297
+ "providers": {
298
+ "geai-apikey": {
299
+ "type": "geai",
300
+ "baseUrl": "https://api.geai.globant.com",
301
+ "apiKey": "${GEAI_API_KEY}"
302
+ }
303
+ }
304
+ }
305
+ ```
306
+
307
+ Each entry accepts per-tier model overrides (`fastModel`, `smartModel`, `deepModel`) and a `models` map for capability overrides. See [Configuration Reference](#config-reference) › **providers (runtime client map)** for the full per-type field list.
308
+
309
+ ## See also
310
+
311
+ - [Configuration](#configuration) — how config works from the UI and how layers cascade.
312
+ - [Configuration Reference](#config-reference) — the field-by-field table.
313
+ - [Connect a Provider](#connect-provider) — setting up providers through the wizard.
314
+ - [Permissions & Approvals](#permissions) — the bash approval levels in detail.