Configuration
Customize how Forage indexes your project and runs its servers.
Config files
Forage uses two config files:
- Global config —
~/.forage/config.json— applies to all workspaces. Created automatically on first run. - Workspace config —
{workspace}/.forage/config.json— per-project overrides. Most fields arenullby default, meaning they inherit the global value.
The easiest way to edit these is through the Forage web UI at http://localhost:9988 → Settings. Forage automatically generates its API key on first run — do not edit the apiKey field manually.
Global config template with all available options:
{
"port": 9988,
"mcpPort": 9989,
"listenOnAllInterfaces": false,
"corsOrigins": "",
"apiKey": "<auto-generated>",
"ollama": {
"url": "http://localhost:11434",
"apiKey": "",
"model": "llama3",
"reasoningEffort": "medium",
"codingModel": "",
"codingUrl": "",
"codingApiKey": "",
"codingReasoningEffort": "medium",
"modelParams": {},
"codingModelParams": {}
},
"chat": {
"autoCompactAt": 75,
"keepFirstMessages": 2,
"keepLastMessages": 6
},
"snapshots": {
"heartbeatIntervalMinutes": 30
},
"annotations": {
"heartbeatIntervalMinutes": 0,
"batchSize": 5
},
"agentAutonomy": "supervised",
"workspacesDir": "",
"services": {
"watchFiles": true,
"mcpServer": true,
"startOnBoot": false
},
"proxy": {
"enabled": false,
"protocol": "http",
"host": "",
"port": 0,
"username": "",
"password": ""
},
"google": {
"clientId": "",
"clientSecret": ""
}
}
Options reference
Servers
| Option | Type | Default | Description |
|---|---|---|---|
port |
number | 9988 |
Port for the Forage web UI. |
mcpPort |
number | 9989 |
Port for the MCP server. Update your agent configs when changing this. |
listenOnAllInterfaces |
boolean | false |
Bind servers to 0.0.0.0 instead of 127.0.0.1. Required if you need to reach Forage from another machine on your network. |
corsOrigins |
string | "" |
Comma-separated list of allowed CORS origins. Leave blank to restrict to same-origin requests only. |
Ollama (AI models)
Forage uses a local Ollama server for all AI features. Configure the Chat Model (used by the Graph page AI chat and the ask MCP tool) and optionally a separate Coding Model (used by the Editor code assistant and the code_task MCP tool).
| Option | Type | Default | Description |
|---|---|---|---|
ollama.url | string | http://localhost:11434 | Ollama server URL for the Chat Model. |
ollama.apiKey | string | "" | API key for the Chat Model server (required if using a hosted Ollama-compatible endpoint). |
ollama.model | string | "llama3" | Ollama model name for the Chat Model. |
ollama.reasoningEffort | string | "medium" | Reasoning effort for gpt-oss models: "low", "medium", or "high". Ignored for other models. |
ollama.codingModel | string | "" | Model name for the Coding Model. Falls back to model if blank. |
ollama.codingUrl | string | "" | Server URL for the Coding Model. Falls back to url if blank. |
ollama.codingApiKey | string | "" | API key for the Coding Model server. Falls back to apiKey if blank. |
ollama.codingReasoningEffort | string | "medium" | Reasoning effort for the Coding Model. Falls back to reasoningEffort if blank. |
ollama.modelParams | object | {} | Extra Ollama options for the Chat Model (e.g. { "temperature": 0.7, "top_p": 0.9, "top_k": 40, "repeat_penalty": 1.1, "num_predict": 2048, "seed": 42 }). Leave empty to use model defaults. |
ollama.codingModelParams | object | {} | Extra Ollama options for the Coding Model. Independent of modelParams. |
Chat
| Option | Type | Default | Description |
|---|---|---|---|
chat.autoCompactAt | number | 75 | Percentage of context window used before Forage auto-compacts the chat history. |
chat.keepFirstMessages | number | 2 | Number of opening messages to preserve when compacting. |
chat.keepLastMessages | number | 6 | Number of most-recent messages to preserve when compacting. |
Snapshots & Annotations
| Option | Type | Default | Description |
|---|---|---|---|
snapshots.heartbeatIntervalMinutes | number | 30 | How often Forage automatically creates a snapshot (in minutes). Set to 0 to disable. |
annotations.heartbeatIntervalMinutes | number | 0 | How often Forage runs AI annotation of source files (in minutes). 0 = disabled (LLM calls have a cost). |
annotations.batchSize | number | 5 | Number of files annotated per annotation run. |
Agent & Services
| Option | Type | Default | Description |
|---|---|---|---|
agentAutonomy | string | "supervised" | "supervised" — the Editor's coding agent queues jobs and waits for your approval before writing to disk. "auto" — agent completes jobs end-to-end without pausing. |
workspacesDir | string | "" | Default directory suggested when cloning a new workspace. |
services.watchFiles | boolean | true | Watch workspace directories for file changes and update the graph incrementally. |
services.mcpServer | boolean | true | Run the MCP server alongside the web UI. |
services.startOnBoot | boolean | false | Register Forage as a system startup item. |
Proxy
| Option | Type | Default | Description |
|---|---|---|---|
proxy.enabled | boolean | false | Route outbound requests through a proxy. |
proxy.protocol | string | "http" | "http" or "https". |
proxy.host | string | "" | Proxy hostname or IP. |
proxy.port | number | 0 | Proxy port. |
proxy.username | string | "" | Proxy username (if required). |
proxy.password | string | "" | Proxy password (if required). |
Google (optional)
Required only if you want to export documentation to Google Docs. Obtain credentials from the Google Cloud Console.
| Option | Type | Default | Description |
|---|---|---|---|
google.clientId | string | "" | Google OAuth 2.0 Client ID. |
google.clientSecret | string | "" | Google OAuth 2.0 Client Secret. |
Workspace config
Each workspace can override a subset of the global config. A null value means "inherit from global".
{
"name": "my-project",
"ollama": null,
"testCommand": null,
"agentAutonomy": null,
"snapshots": null,
"annotations": null
}
| Option | Description |
|---|---|
name | Display name for this workspace in the Forage UI. |
ollama | Per-workspace Ollama override. Same shape as the global ollama object. null = inherit global. |
testCommand | Shell command to run after the coding agent applies changes (e.g. "npm test"). Output streams into the editor chat. null = skip. |
agentAutonomy | Per-workspace override for "supervised" / "auto". null = inherit global. |
snapshots | Per-workspace snapshot interval override. null = inherit global. |
annotations | Per-workspace annotation settings override. null = inherit global. |
Using a local AI model
For a fully air-gapped, zero-data-egress setup, configure Forage to use a local model via Ollama. Set the ollama.url to your Ollama server and choose a model:
{
"ollama": {
"url": "http://localhost:11434",
"model": "gpt-oss:120b",
"codingModel": "gpt-oss:32b"
}
}
.forageIgnore
You can also create a .forageIgnore file in your project root (same syntax as .gitignore) to exclude paths from indexing without editing the config file:
# Vendor code
vendor/
third_party/
# Generated files
*.pb.go
*.generated.ts
# Large data files
fixtures/
testdata/large/