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.
System requirements
- Prebuilt binary / npm: macOS (Intel or Apple Silicon), Linux (x86_64 or aarch64), or Windows (x86_64 or arm64). No runtime dependencies.
- Building from source: Rust 1.85 or newer plus a C toolchain (only needed when building from the repository).
- git: only
ctx changedandctx diffrequire a git repository. Everything else works on plain directories.
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 winget (Windows)
winget install halloffame12.CTX ctx --version
Published in the winget-pkgs community repository. Scoop is also available: scoop bucket add ctx https://github.com/halloffame12/scoop-ctx then scoop install ctx.
Build from source
git clone https://github.com/halloffame12/CTX.git cd CTX && cargo build --release ./target/release/ctx --version
Requires Rust 1.85 or newer plus a C toolchain. (There is no crates.io release — build from the repository to get the current version.)
Prebuilt binaries
Download a binary from the GitHub releases page. Each release includes a checksums.txt so you can verify the download:
curl -LO https://github.com/halloffame12/CTX/releases/download/v0.1.6/ctx-linux-x86_64 shasum -a 256 ctx-linux-x86_64 # compare against checksums.txt chmod +x ctx-linux-x86_64 sudo mv ctx-linux-x86_64 /usr/local/bin/ctx
ctx binary. There is no separate runtime, daemon, or service — the MCP server runs as a child process of your AI client.Upgrading
npm users: npm install -g ctxai-cli@latest. From source: git pull && cargo build --release. Check your version with ctx version.
Quick smoke test
cd /path/to/your/project ctx init ctx doctor
ctx doctor verifies the index and reports anything out of date.