context-mode

Quickstart

Install context-mode on your agent CLI and route your first data-heavy command in a few minutes.

context-mode runs entirely on your machine — no account, no cloud. How you install depends on your host: marketplace hosts need a single command, while a few hosts install the npm package first. Pick yours below.

Install for your host

No global install — the marketplace plugin bundles everything:

/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode

Restart Claude Code. Full guide: Claude Code.

No global install — add it from the marketplace:

codex plugin marketplace add mksglu/context-mode

Codex gates plugin hooks behind feature flags, so add both to your Codex config and restart — without this, hooks never fire:

[features]
plugin_hooks = true
hooks = true

Full guide: Codex CLI.

The Cursor Marketplace listing is still awaiting Cursor team review. Until it is listed, install via the local-folder path (clone the repo, then symlink or robocopy it into ~/.cursor/plugins/local/context-mode) and restart Cursor. Full guide: Cursor.

Package hosts — Gemini CLI, VS Code / JetBrains Copilot, Qwen Code, Kimi Code, OpenCode, and KiloCode — install the package first (needs Node.js 22.5+ or Bun):

npm install -g context-mode

Then add your host's config — see Installation.

Verify the install

context-mode doctor

This checks language runtimes, the FTS5 knowledge base, and hook registration. In Claude Code and Cursor you can also run /context-mode:ctx-doctor, or type ctx doctor to your agent in chat.

Route your first command

Ask your agent to do something data-heavy — analyze a log, list issues, summarize a build. context-mode routes the raw output to a sandbox and returns only the answer. Then check what you saved: in Claude Code or Cursor run the /context-mode:ctx-stats slash command, or on any host just type ctx stats to your agent in chat and it calls the stats tool for you.

Prefer slash commands? In Claude Code and Cursor, /context-mode:ctx-doctor runs the same checks as context-mode doctor, and /context-mode:ctx-stats shows your session savings (there is no terminal stats command — stats live behind the slash command or the ctx stats chat trigger).

Next steps

On this page