For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

cq install wires cq into a coding-agent host: it registers the cq MCP server (or, for hosts without MCP, a CLI mapping), installs the shared cq skill, and adds an always-loaded instruction so the agent knows to consult cq before starting work.

Re-running is idempotent, so it is safe to run again after an upgrade.

Before you start

Install the cq CLI first — via Homebrew, Scoop, or a GitHub release. See the CLI README for the options. The CLI must be on your PATH, because the installer writes its resolved path into each host's configuration.

Quick start

cq install --target <host>
Agent
Target

Claude

claude

Codex

codex

Copilot

copilot

Cursor

cursor

OpenCode

opencode

Pi

pi

Windsurf

windsurf

Install into several hosts at once by repeating --target:

cq install --target cursor --target opencode
Flag
Effect

--dry-run

Print the changes that would be made, without writing anything.

--uninstall

Remove cq from the selected hosts.

What cq install sets up

For every host except Claude Code, the installer manages three things:

  • The shared skill at ~/.agents/skills/cq/SKILL.md. All non-Claude hosts read the skill from this shared location, so installing several hosts writes it once.

  • An MCP server entry pointing at cq mcp. Pi is the exception: it has no native MCP support, so cq is wired in through a CLI mapping instead.

  • An always-loaded instruction (an AGENTS.md block, a rule file, or an instructions file, depending on the host) telling the agent to load the cq skill before starting work.

Claude Code manages its own plugins, so cq install --target claude shells out to the Claude plugin marketplace rather than writing files.

--uninstall reverses the MCP entry and the instruction, but intentionally leaves the shared skill in place, since other installed hosts may still rely on it.

Connect to a remote cq server

With no remote configured, knowledge stays local on the machine running the agent. To sync knowledge to a shared or hosted store, point the agent at a remote server with two environment variables:

Variable
Purpose

CQ_ADDR

Remote API URL. Use https://cq.exchange for the hosted service, http://localhost:3000 for a local server, or your own server's URL if self-hosting.

CQ_API_KEY

API key for write operations (propose, confirm, flag). Optional for read-only use (query, status). Generated in the server's dashboard.

See Remote storage for choosing between the hosted service and running your own server.

The installer never writes these values. cq install sets up the server entry, skill, and instructions, but it never writes CQ_ADDR or CQ_API_KEY. You add them yourself, to the entry the installer already created for your host — see the per-host Point at a remote server snippet in the next section. Keep the command and args the installer wrote; add only the environment block. In the examples, /opt/homebrew/bin/cq stands in for the path the installer detected — leave whatever path is already in your config.

Per-host setup

Pick your host for the exact files cq install manages and how to point it at a remote server. Paths are shown for macOS and Linux; see Windows for Windows locations.

Installed through Claude Code's own plugin marketplace. cq install --target claude runs:

The claude CLI must be on your PATH. cq does not write Claude config files directly; the plugin is managed by Claude Code.

Point at a remote server — add a top-level env block to ~/.claude/settings.json:

Windows

Install the CLI via Scoop:

Then run cq install --target <host> exactly as on macOS and Linux. Windows config locations differ from the paths shown above; for example, the VS Code user mcp.json is at %APPDATA%\Code\User\mcp.json.

Advanced: install environment variables

These variables tune the installer itself and are not needed for a normal install.

Variable
Used by
Default
Purpose

OPENCODE_CONFIG_DIR

cq install --target opencode

~/.config/opencode

Install into a non-default OpenCode config directory.

CQ_INSTALL_BINARY

cq install (all targets)

Auto-detected via the running binary

Override the cq path written into host config (for development and testing).

Last updated