Installation

ctx is a single binary. The quickest way to get it is npm, which avoids needing a Rust toolchain. Prebuilt binaries for macOS, Linux, and Windows are attached to every GitHub release.

Via npm (recommended)

npm install -g ctxai-cli
ctx --version

The npm package ships platform-specific binaries for macOS (x64 + arm64), Linux (x64 + arm64), and Windows (x64 + arm64). This is the same package the MCP examples use with npx -y ctxai-cli mcp.

Via cargo

cargo install ctxai-cli --locked

Requires Rust 1.85 or newer. --locked pins the dependency graph to the versions ctx was tested against.

Prebuilt binaries

Download a binary from the GitHub releases page. Each release includes a checksums.txt so you can verify the download.

All installation methods produce the same ctx binary. There is no separate runtime, daemon, or service — the MCP server runs as a child process of your AI client.

Quick smoke test

cd /path/to/your/project
ctx init
ctx doctor

ctx doctor verifies the index and reports anything out of date.