> ## Documentation Index
> Fetch the complete documentation index at: https://forgekit-docs-mintlify-6354fa49.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Config commands

> Providers, cost, dashboards, brand, atlas, stack, and opt-in MCP integrations: config, cost, dash, brand, atlas, stack, report, tools, integrations.

The Config group covers providers, observability, the code graph, and stack detection.

## `forge config`

Provider setup — show / switch / add providers, set the default model.

```bash theme={null}
forge config               # show current config
forge config switch <provider>
forge config add <provider>
```

## `forge cost`

Real per-day spend via measured stage factors.

```bash theme={null}
forge cost                 # real per-day spend
forge cost --stages        # measured per-stage cost factors
```

<Note>
  Reports **measured stages only** — a stage with no events says "no data", never a
  default.
</Note>

## `forge dash`

Local dashboard over the ledger, metrics, and blast radius.

```bash theme={null}
forge dash                 # localhost-only, read-only (default port 4242)
```

## `forge brand`

Print the active brand token map.

```bash theme={null}
forge brand
```

The brand is stored as one token (`brand.json`); a rebrand is a single edit.

## `forge atlas`

Build / query the code graph.

```bash theme={null}
forge atlas build [path]   # walk the tree → .forge/atlas.json
forge atlas query "what calls Z"
forge atlas has <symbol>   # hallucinated-symbol check
```

The atlas is plain JSON — any tool reads it, no MCP required.

## `forge stack`

Detect this repo's real stack from its manifests.

```bash theme={null}
forge stack
```

Reads `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`,
`composer.json`, `pom.xml` / `build.gradle`, and `*.csproj`, and reports languages,
frameworks, package managers, and the repo's **actual** test commands — which feed the
substrate's verification checklist.

## `forge report` <sub>v0.19+</sub>

Generate a static HTML report of the repo's Forge state — the ledger, metrics, and blast
radius rendered to a self-contained file you can share or archive.

```bash theme={null}
forge report
```

## `forge tools` <sub>v0.19+</sub>

Select this repo's primary AI coding tool and wire the matching `.gitignore` entries, so
generated config and `.forge/` artifacts are ignored correctly for your setup.

```bash theme={null}
forge tools
```

## `forge integrations`

Opt-in third-party MCP servers (for example `context7`), managed non-destructively across
every tool Forge emits config for — Claude Code, Codex, Cursor, Gemini, Continue, and the
rest.

Third-party MCP servers are **not** installed by default. Nothing lands on disk until you
run `forge integrations add <name> --yes`.

```bash theme={null}
forge integrations                        # list opt-in servers with package + purpose
forge integrations add <name>             # dry-run: prints package, network, files it would touch
forge integrations add <name> --yes       # apply — write MCP config for every tool
forge integrations add <name> --yes --adopt   # also claim a same-name entry you already configured
forge integrations remove <name>          # reverse the add — deletes only forge-owned entries
```

### What `add` writes

`add --yes` writes the server into every tool's native MCP config from one canonical
spec:

* `.mcp.json` (Claude Code)
* `.cursor/mcp.json` (Cursor)
* `.gemini/settings.json` (Gemini)
* `.codex/config.toml` — as a `# forge:managed:<name>` block, refreshed by byte-compare
* `.continue/mcpServers/<name>.yaml` — one forge-marked YAML per managed server
* and the rest of the tools Forge emits config for

The installed set is recorded in `.forge/forge.config.json` under `mcp.integrations`, so
every subsequent `forge sync` re-emits the same servers. The stop-hook auto-sync
byte-compares the whole config file, so a hand-edit to that file is detected and
repaired.

### `--adopt` semantics

If a server with the same name already exists in one of the tool config files and Forge
did not put it there, `add` **does not overwrite it**. Instead it reports the file with an
`--adopt` hint. Re-run with `--adopt` to claim ownership — Forge records the entry under
`mcp.adopted` in `.forge/forge.config.json` and will manage it from then on.

Use `--adopt` when you configured a server by hand earlier and now want Forge to keep it
in sync across every tool.

### `remove`

`forge integrations remove <name>` reverses an add. It deletes only forge-owned entries,
blocks, and files — a same-name server the user configured (and never `--adopt`ed) is
left alone. Running `remove` twice is a no-op.

```bash theme={null}
forge integrations remove context7
```

### `.forge/forge.config.json`

Per-repo Forge state — the unified config that also holds `primaryTool`, `tools`, and
`profile` — records opt-in integrations under two keys:

```json theme={null}
{
  "mcp": {
    "integrations": ["context7"],
    "adopted": []
  }
}
```

Unknown keys round-trip through writes. A malformed file is not silently discarded:
reads warn once per process on stderr, and writers refuse to overwrite an unparseable
config instead of replacing it with defaults.
