Skip to content

Configuration

CAP Pro's configuration lives in two places: per-project (.cap/config.json) and per-runtime (your AI runtime's settings file, e.g. ~/.claude/settings.json).

Per-project: .cap/config.json

json
{
  "memory": {
    "layout": "v6"
  },
  "featureMap": {
    "layout": "sharded"
  },
  "scan": {
    "ignore": [
      "**/node_modules/**",
      "**/dist/**",
      "**/.next/**",
      "**/coverage/**"
    ]
  },
  "monorepo": {
    "apps": ["apps/*"],
    "packages": ["packages/*"]
  }
}
KeyValuesDefault
memory.layout"v5", "v6""v5"
featureMap.layout"monolithic", "sharded"auto-detected
scan.ignorearray of globsreasonable defaults
monorepo.appsarray of globsauto-detected from nx.json, turbo.json, pnpm-workspace.yaml, package.json:workspaces
monorepo.packagesarray of globssame

Per-runtime: AI runtime settings

CAP Pro writes hooks and (optionally) a statusline into your AI runtime's settings file. The path depends on the runtime:

RuntimeSettings file (global)
Claude Code~/.claude/settings.json
OpenCode~/.config/opencode/opencode.json (or .jsonc)
Gemini CLI~/.gemini/settings.json
Codex~/.codex/config.toml
GitHub Copilot~/.copilot/copilot-instructions.md
Antigravity~/.gemini/antigravity/settings.json
Cursor~/.cursor/settings.json
Windsurf~/.windsurf/settings.json

CAP Pro never overwrites custom settings you have in those files. It uses markers (# CAP Agent Configuration — managed by code-as-plan installer) to identify CAP-Pro-managed blocks and only modifies those.

To remove all CAP Pro settings cleanly:

bash
npx cap-pro@latest --uninstall --global

Hooks

CAP Pro ships with a few hooks that run automatically:

HookTriggersPurpose
pre-tool-useBefore any tool callAuto-detect frontend sprint mode, suggest commands
session-startWhen a new session opensAuto-load the last snapshot, refresh memory
session-stopWhen a session endsAuto-write a checkpoint
tag-drift-checkPeriodicWarn when code-Feature-Map drift exceeds threshold

Hooks are runtime-specific — Claude Code, OpenCode, Gemini and Codex have stable hook systems; Copilot and Cursor don't expose pre/post-tool hooks the same way, so a few hooks degrade gracefully on those runtimes.

Environment variables

VarPurpose
CLAUDE_CONFIG_DIROverride Claude Code config dir
GEMINI_CONFIG_DIROverride Gemini config dir
CODEX_HOMEOverride Codex config dir
COPILOT_CONFIG_DIROverride Copilot config dir
OPENCODE_CONFIG_DIROverride OpenCode config dir
OPENCODE_CONFIGPath to OpenCode config file
ANTIGRAVITY_CONFIG_DIROverride Antigravity config dir
CURSOR_CONFIG_DIROverride Cursor config dir
WINDSURF_CONFIG_DIROverride Windsurf config dir
CONTEXT7_API_KEYHigher rate limits for npx ctx7@latest
CAP_TEST_MODEUsed by CAP Pro's test suite

The --config-dir CLI flag takes priority over all of these.

.gitignore recommendations

/cap:init writes these to your .gitignore:

gitignore
# CAP Pro
.cap/SESSION.json
.cap/stack-docs/
.cap/migrations/*/backup/

The other .cap/ artefacts — FEATURE-MAP.md, features/ (sharded), .cap/memory/, .cap/snapshots/should be committed to git. They are part of the project.

Released under the MIT License.