Installation β
Prerequisites β
- Node.js >= 20
- git (any recent version)
- A supported language: TypeScript / JavaScript, Go, or C#
Install β
The npm package is @ctxo/cli (scoped, so it sits in a namespace alongside the language plugins like @ctxo/lang-typescript). The binary it installs is named ctxo β that is what you run.
Recommended for most users
Install once globally, then call ctxo from any project:
npm install -g @ctxo/cliVerify with ctxo --version. To upgrade later: ctxo update --global.
State always lives in each project's <repo>/.ctxo/ directory β there is no user-level or system-level config. The install method only changes how the binary is reached, not where data goes.
Other install paths β
| Path | When to use |
|---|---|
Global β npm install -g @ctxo/cli (Recommended) | You work in multiple repos and want ctxo β¦ available everywhere. |
Project devDependency β npm install -D @ctxo/cli (or run npx @ctxo/cli init, which adds it for you) | You want the version pinned per-project in package.json. Call via pnpm ctxo β¦, npm exec ctxo β¦, or use the bare ctxo from a project script. |
No install, ad-hoc β npx @ctxo/cli <subcommand> | CI, one-off experiments, or a repo where you do not want to touch dependencies. |
1. Initialize β
From the root of the repo you want to index:
ctxo initThis detects your languages, installs the right @ctxo/lang-* plugins, adds git hooks, and creates a starter .ctxo/config.yaml.
(If you have not installed globally and not yet added @ctxo/cli as a project dependency, use npx -y @ctxo/cli init here β it does the same thing.)
2. Verify β
ctxo doctorAll green? You are done.
If anything is red or yellow:
ctxo doctor --fixThis runs a dependency-ordered remediation pass (missing plugins, stale cache, broken hooks). Add --dry-run first if you want to preview.
Add a language later β
@ctxo/cli init auto-detects what your repo uses. To add more languages after the fact, install the plugin package directly:
pnpm add -D @ctxo/lang-typescript
# or: @ctxo/lang-go, @ctxo/lang-csharpnpm install -D @ctxo/lang-typescriptyarn add -D @ctxo/lang-typescriptAvailable plugins on npm: @ctxo/lang-typescript, @ctxo/lang-go, @ctxo/lang-csharp.
After install, re-index so the plugin takes effect:
ctxo indexNext steps β
- Quick Start - index your repo and make the first MCP call
- MCP Client Setup - wire Ctxo into your editor