Skip to content
Documentation

Get started

Make your first context-aware read.

Install on Windows, macOS or Linux. Connect your AI tool and verify what reaches your agent.

AvailableReviewed September 2026

Install the runtime

LeanCTX runs locally on Windows, macOS and Linux. Choose the environment where your AI tool runs, then connect it below.

Windows

PowerShell · x64

With the x64 Node.js LTS installed, open PowerShell and run:

$env:LEAN_CTX_NO_ONBOARD = "1"
npm.cmd install -g lean-ctx-bin
Remove-Item Env:LEAN_CTX_NO_ONBOARD
lean-ctx.cmd --version

The npm package downloads the native Windows binary. The .cmd launchers avoid PowerShell script-policy conflicts. For this installation, use lean-ctx.cmd in place of lean-ctx in the examples below. Automatic onboarding is skipped so you can choose your AI tool.

Prefer no Node.js? Install the Windows ZIP. Using WSL? Select Linux and install inside that distribution.

macOS

Bash / zsh · Apple Silicon & Intel

With Homebrew installed, run:

brew tap yvgude/lean-ctx
brew install lean-ctx
lean-ctx --version

Use a terminal in the same macOS environment as your AI tool. Restart existing terminals and editors if the command is not yet on their PATH.

Prefer no Homebrew? Use the standalone installer or release archive.

Linux

Bash / sh · x86_64 & ARM64

With curl and tar installed, download the installer, review it, then run it as your regular user:

curl -fsSL https://raw.githubusercontent.com/yvgude/lean-ctx/v3.10.2/install.sh -o leanctx-install.sh
LEAN_CTX_NO_ONBOARD=1 sh leanctx-install.sh --download
export PATH="$HOME/.local/bin:$PATH"
lean-ctx --version

The installer chooses the architecture and GNU or musl build, installs to ~/.local/bin and can update your shell profile. Automatic onboarding is skipped so you can choose your AI tool below.

No administrator access is needed for this user installation. For containers, offline setup or a specific version, use a release archive.

CLI examples below work in PowerShell, Bash and zsh. Compare platform support, paths and WSL setup.

Connect your AI tool

Open a terminal in the project you want LeanCTX to access. Use Set-Location "C:\work\my-project" in PowerShell or cd "$HOME/work/my-project" in Bash / zsh, replacing the example with your own directory.

Your AI tool still owns the conversation, model and task. Choose one command for your installed host:

lean-ctx wrap cursor
lean-ctx wrap claude
lean-ctx wrap codex

For VS Code:

lean-ctx wrap vscode

The wrapper configures the supported MCP and hook integration for the selected host and keeps a configuration snapshot for reversal. It changes that host’s configuration. Restart the host after setup.

For other detected tools, run the guided setup:

lean-ctx setup

Review its choices before applying them. Hook support, editor configuration and restart requirements vary by host. The optional request proxy is a separate integration, not a prerequisite for context reads.

On native Windows, MCP and host-specific hooks are distinct from Unix shell hooks: ordinary PowerShell commands are not automatically intercepted. For WSL or a remote agent, install and run setup in the environment where the agent executes. See platform differences.

Verify the connection

lean-ctx status
lean-ctx doctor

Then open your AI tool in the same project. Confirm that its MCP connection is running and ask:

Use LeanCTX to inspect this project. Find a function relevant to our task, read its signature, then read the implementation. Explain which details the signature left out.

The agent must actually call LeanCTX’s tools for these reads to pass through LeanCTX. Native reads outside the integration are not automatically covered.

Compare the two views

You can inspect the behavior yourself without a model call. Replace the example path with a file in your project.

lean-ctx read src/main.rs -m signatures
lean-ctx read src/main.rs -m full --fresh
lean-ctx gain

The first command emphasizes the API surface; the second requests the full view. Compare the actual content before relying on a compact representation. A fresh install may have little or no recorded usage.

Inspect your activity

To inspect the activity from your first reads, open lean-ctx dashboard in your project. Follow the printed authenticated URL and see the dashboard guide for the available views.

Build your own application

Use the SDK quickstart for an application or custom agent. The SDK is a separately versioned package with an explicit Engine compatibility contract; installing the newest CLI is not a substitute for that check.

Undo or troubleshoot setup

Use lean-ctx unwrap cursor, lean-ctx unwrap claude, lean-ctx unwrap codex or lean-ctx unwrap vscode for the corresponding wrapper snapshot. If tools do not appear, check the host’s MCP logs and troubleshooting before reinstalling.

Sources & versions5 references Reviewed
  • 01-setup-and-onboarding.mddocs/reference/01-setup-and-onboarding.mdReviewed checkout
  • install.shinstall.shReviewed checkout
  • postinstall.jspackages/lean-ctx-bin/postinstall.jsReviewed checkout
  • mod.rsrust/src/wrap/mod.rsReviewed checkout
  • mode.rsrust/src/tools/ctx_read/mode.rsReviewed checkout
Core checkout
0ce2207ee4
Installed runtime
3.10.2
SDK release
1.1.0

Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.

Versions & compatibility