Skip to main content

Onboarding commands

cogniscape init

Save your customer key to the machine-level config.
string
required
Your Cogniscape customer key. Find it in the Cogniscape dashboard under Settings → API Keys.
What it does:
1

Creates ~/.cogniscape/config.json

Saves the customer key at the machine level — shared across all projects on this machine.
2

Installs Claude Code hooks

Merges Cogniscape hooks into ~/.claude/settings.json automatically.
3

Installs Cursor hooks (if detected)

If ~/.cursor/ exists, merges hooks into ~/.cursor/hooks.json automatically.
Running cogniscape init again overwrites the existing key (idempotent).
The install script runs cogniscape init automatically when you pass your customer key. You only need to run this manually if you installed the binary without a key or want to change keys.

cogniscape update-key

Update the customer key for the current project.
Fails with an error if the machine has not been initialized with cogniscape init first.

cogniscape setup-hooks

Install Claude Code hooks manually.
Merges Cogniscape hooks into ~/.claude/settings.json, preserving any existing third-party hooks. Creates a backup at ~/.claude/settings.cogniscape-backup.json before modifying. Idempotent — will not duplicate hooks already present.
cogniscape init runs this automatically. Use cogniscape setup-hooks directly only if you need to repair or re-install hooks without changing your customer key.
Claude Code hooks installed: Cursor hooks installed (in ~/.cursor/hooks.json, auto-detected when ~/.cursor/ exists):

cogniscape mcp update

Scan your machine for all AI tools with Cogniscape MCP configurations and update them to the latest format.
Detects and updates configurations in Claude Code, Cursor, Codex, and OpenCode. Migrates legacy URLs and incompatible formats automatically.
Claude Desktop is configured through the claude.ai web account (Add custom connector, Streamable HTTP) and inherited by the Desktop and mobile apps. The CLI does not manage Claude Desktop config.

cogniscape uninstall

Remove hooks and the binary.
Removes Cogniscape hooks from ~/.claude/settings.json and ~/.cursor/hooks.json, then deletes the binary. Idempotent. On Windows, the binary cannot be self-deleted while running — a message will indicate the path for manual removal.

cogniscape version


Authentication

All commands that call the API require a customer key, resolved in this order:
  1. --customer-key flag
  2. COGNISCAPE_CUSTOMER_KEY environment variable
  3. ~/.cogniscape/config.json (machine-level, set by cogniscape init)
  4. Error if none of the above is set
The key is sent as the X-Cogniscape-Customer-Key HTTP header on all requests.

Local files