On this page
Measure & evaluate
Your local LeanCTX Cockpit.
Open the Cockpit, see what your agents read, decide what needs attention and prove what LeanCTX delivered.
Open the Cockpit
Run this from the project you want to inspect:
lean-ctx cockpit
LeanCTX starts its local server, normally at http://localhost:3333, and opens the Cockpit in your browser. If a Cockpit is already running, the command opens that one instead of starting a second. Use the Browser URL printed in the terminal: it carries the access token. Keep that URL private. Ctrl+C in that terminal stops the Cockpit.
The same command works in PowerShell, Bash and zsh on Windows, macOS and Linux. If you installed through npm on Windows and PowerShell blocks the script shim, use lean-ctx.cmd cockpit. Installation paths for each system are in Platforms & paths.
lean-ctx dashboard is the same command. Other commands open the matching view:
| Command | Opens |
|---|---|
lean-ctx cockpit |
The Cockpit start page |
lean-ctx gain --web |
Savings |
lean-ctx gain --live |
Live context activity |
lean-ctx gain |
The savings summary in the terminal |
The Cockpit is the only LeanCTX interface; the earlier built-in dashboard has been replaced.
Install the Cockpit once
Official LeanCTX builds use the Cockpit as a signed runtime package. It is free for everyone and proprietary. If lean-ctx cockpit reports that the Cockpit is not installed, install it:
lean-ctx cockpit install
The package is verified before it is activated. It runs only on 127.0.0.1, is started and stopped by the Engine, and reads your data through the Engine on this machine. Source builds of the open-source Engine do not include the Cockpit.
To start it without opening a browser, or on another port:
lean-ctx cockpit --no-open --port=3334 --project="."
Use an absolute project path when launching from another directory. --open=none is the same as --no-open; neither disables the server or authentication.
Find the right view
| Area | Views | What you decide there |
|---|---|---|
| Overview | Cockpit, Inbox, Improvements | What needs attention now, with the evidence for each finding |
| Usage | Savings, Spend, Ledger, Report | What LeanCTX saved, what your agents spent, and every recorded call |
| Control | Security, Context, Sources, Agents, Proof | How content is protected, what your agents read, which sources are connected, and the delivery evidence |
| Knowledge | Memory, Packages, Cloud & devices | What your agents learned, which knowledge packages you share, and which devices sync |
| Admin | Account, Settings, Diagnostics | Plan and sign-in, preferences, and whether the setup is complete |
The project switcher at the top left limits the views to one project or shows every project on this device. Views marked Pro need a Pro plan; everything else, including every protection switch and the full evidence, stays free. Pro features are checked by the Engine against your signed plan on every use, not by the page.
Empty views can mean no relevant activity was captured yet, a different project is selected, or an integration is missing. An empty view is not a measured zero. Diagnostics names the setup step that is missing.
Inspect one real operation
- Open the Cockpit for your project and choose Context.
- In another terminal or your connected AI tool, make a read such as
lean-ctx read README.md -m signatures. - Watch the read appear with its compression and protection details. Recover the full source if the shorter result does not answer the question.
- Use observability to interpret counts and compare equivalent tasks.
Open inside your editor
lean-ctx cockpit --vscode
--open=vscode is equivalent. Supported editors include VS Code, Cursor, VSCodium and Windsurf; the LeanCTX editor extension opens the native tab. If that handoff is unavailable, the command prints instructions instead of opening an external browser.
Export a report
lean-ctx cockpit --export --output=leanctx-report.html
This writes a standalone HTML report, not a live Cockpit. Add --open to open the file. Review project names, paths and measurements before sharing it.
Configure access deliberately
Authentication is on by default, including on loopback. Follow the printed URL; do not disable authentication to fix an expired browser token.
| Setting | Effect |
|---|---|
--host=127.0.0.1, --port=3333 |
Explicit local bind and port; LEAN_CTX_HOST and LEAN_CTX_PORT can override the defaults. |
--base-path=/cockpit |
Mount behind a reverse-proxy subpath. |
LEAN_CTX_HTTP_TOKEN |
A fixed access token, stable across restarts; --auth-token=... takes precedence. Prefer the environment to keep it out of shell history. |
LEAN_CTX_SCRAPE_TOKEN |
Read-only token accepted only for GET /metrics, not for the Cockpit. |
LEAN_CTX_DASHBOARD_OPEN |
Default reveal mode: browser, none or vscode; command flags take precedence. |
--no-auth / --auth=false |
Disable the access token. Cross-origin and host checks stay on, but they do not authenticate other clients on your network. |
Keep the default local binding for personal use. A non-loopback bind changes who can reach the Cockpit; a reverse proxy or container needs its own access control and TLS. The Cockpit is not the MCP HTTP server.
Troubleshoot the connection
- “The Cockpit is not installed”: run
lean-ctx cockpit install, thenlean-ctx cockpitagain. - Port already in use: reuse the running Cockpit or choose
--port=3334. Do not stop an unrelated process to free the default port. - Unauthorized: reopen the URL printed by the running instance; an old browser tab can hold an expired token.
- Wrong project or empty views: pick the project in the switcher or start with
--project=..., then check index status. - Remote or headless machine: use
--no-openand reach the machine over an authenticated connection.
Use lean-ctx cockpit --help on your installed version as the operational reference.
Sources & versions
- mod.rsrust/src/cli/dispatch/network/mod.rsReviewed checkout
- cockpit.rsrust/src/core/intelligence_runtime/cockpit.rsReviewed checkout
- cockpit.rsrust/src/dashboard/cockpit.rsReviewed checkout
- lib.rsee/intelligence/crates/cockpit/src/lib.rsReviewed checkout
- Core checkout
1897b31c2d- Reviewed 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