Documentation

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 are null by default, meaning they inherit the global value.

The easiest way to edit these is through the Forage web UI at http://localhost:9988Settings. Forage automatically generates its API key on first run — do not edit the apiKey field manually.

Global config template with all available options:

~/.forage/config.json
{
  "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

OptionTypeDefaultDescription
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).

OptionTypeDefaultDescription
ollama.urlstringhttp://localhost:11434Ollama server URL for the Chat Model.
ollama.apiKeystring""API key for the Chat Model server (required if using a hosted Ollama-compatible endpoint).
ollama.modelstring"llama3"Ollama model name for the Chat Model.
ollama.reasoningEffortstring"medium"Reasoning effort for gpt-oss models: "low", "medium", or "high". Ignored for other models.
ollama.codingModelstring""Model name for the Coding Model. Falls back to model if blank.
ollama.codingUrlstring""Server URL for the Coding Model. Falls back to url if blank.
ollama.codingApiKeystring""API key for the Coding Model server. Falls back to apiKey if blank.
ollama.codingReasoningEffortstring"medium"Reasoning effort for the Coding Model. Falls back to reasoningEffort if blank.
ollama.modelParamsobject{}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.codingModelParamsobject{}Extra Ollama options for the Coding Model. Independent of modelParams.

Chat

OptionTypeDefaultDescription
chat.autoCompactAtnumber75Percentage of context window used before Forage auto-compacts the chat history.
chat.keepFirstMessagesnumber2Number of opening messages to preserve when compacting.
chat.keepLastMessagesnumber6Number of most-recent messages to preserve when compacting.

Snapshots & Annotations

OptionTypeDefaultDescription
snapshots.heartbeatIntervalMinutesnumber30How often Forage automatically creates a snapshot (in minutes). Set to 0 to disable.
annotations.heartbeatIntervalMinutesnumber0How often Forage runs AI annotation of source files (in minutes). 0 = disabled (LLM calls have a cost).
annotations.batchSizenumber5Number of files annotated per annotation run.

Agent & Services

OptionTypeDefaultDescription
agentAutonomystring"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.
workspacesDirstring""Default directory suggested when cloning a new workspace.
services.watchFilesbooleantrueWatch workspace directories for file changes and update the graph incrementally.
services.mcpServerbooleantrueRun the MCP server alongside the web UI.
services.startOnBootbooleanfalseRegister Forage as a system startup item.

Proxy

OptionTypeDefaultDescription
proxy.enabledbooleanfalseRoute outbound requests through a proxy.
proxy.protocolstring"http""http" or "https".
proxy.hoststring""Proxy hostname or IP.
proxy.portnumber0Proxy port.
proxy.usernamestring""Proxy username (if required).
proxy.passwordstring""Proxy password (if required).

Google (optional)

Required only if you want to export documentation to Google Docs. Obtain credentials from the Google Cloud Console.

OptionTypeDefaultDescription
google.clientIdstring""Google OAuth 2.0 Client ID.
google.clientSecretstring""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".

{workspace}/.forage/config.json
{
  "name": "my-project",
  "ollama": null,
  "testCommand": null,
  "agentAutonomy": null,
  "snapshots": null,
  "annotations": null
}
OptionDescription
nameDisplay name for this workspace in the Forage UI.
ollamaPer-workspace Ollama override. Same shape as the global ollama object. null = inherit global.
testCommandShell command to run after the coding agent applies changes (e.g. "npm test"). Output streams into the editor chat. null = skip.
agentAutonomyPer-workspace override for "supervised" / "auto". null = inherit global.
snapshotsPer-workspace snapshot interval override. null = inherit global.
annotationsPer-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:

~/.forage/config.json — Ollama example
{
  "ollama": {
    "url": "http://localhost:11434",
    "model": "gpt-oss:120b",
    "codingModel": "gpt-oss:32b"
  }
}
With a local Ollama server, and with the exception of the remote Forage licensing server, Forage operates with zero outbound network connections. See the Security page for the full data flow.

.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:

.forageIgnore
# Vendor code
vendor/
third_party/

# Generated files
*.pb.go
*.generated.ts

# Large data files
fixtures/
testdata/large/