@crbonfree/cli
v0.2.4
Published
See the carbon footprint of your AI coding agents, and give them a shared memory across every tool.
Maintainers
Readme
npm install -g @crbonfree/cliGet started
1. Install (one command, no dashboard needed)
crbon installShows a short code and opens your browser to approve it. It works the same on laptops, servers, VMs, and containers. No key to copy-paste. Once approved, it provisions an API key, sets up an hourly sync on your OS scheduler, and runs the first sync.
Prefer a browser handoff on this same machine? crbon install --loopback
signs you in with the browser-callback flow instead: the browser returns the
sign-in directly to the CLI over localhost.
2. That's it
Your coding-agent usage flows to your dashboard, where you see the CO2e behind every model and agent:
https://dashboard.crbonfree.com/my-coding-agentsKeep coding. crbon captures each session locally and syncs on its own.
Memory for your agents
crbon install asks whether to turn memory on; crbon memory on and
crbon memory off change it later, and crbon status shows the answer. Once
on, sessions are indexed locally under ~/.crbon/memory.
When memory turns on, choose which coding agents receive its MCP tools. Run
crbon memory agents to change that choice later, or pass --agents with a
comma-separated list (for example, --agents claude,codex), all, or none.
Memory content stays on the machine unless semantic search and summaries are turned on with crbon memory semantic on (paid plan). Turning them on sends the text of every indexed session to Crbon's endpoint to build the search index, and session content whenever a summary is generated; Crbon forwards it to an AI provider through Vercel's AI Gateway and does not store it. With a folder list, semantic search turns on once memory holds no sessions from outside the list; crbon memory tidy shows the ones it finds, and crbon memory tidy --yes moves them to the memory trash without touching the agents' own files. crbon memory semantic off stops it.
crbon memory sync on (paid plan) uploads the prompts and agent replies from sessions in your chosen folders, including their inline commands and file edits, so you can view and search them in the dashboard. Home paths become ~ and known secrets are scrubbed first. Crbon stores and can read synced sessions; they are not end-to-end encrypted. Use crbon memory sync off to stop future uploads while keeping the cloud copy, or crbon memory sync delete --yes to delete it. Add --session <id> to delete just one session.
Agents reach memory through crbon-mcp with three tools:
search_content: find past sessions by textget_messages: read the messages around a hitget_memory_status: check whether memory is ready
crbon-mcp # the memory server your agents connect toExport one session as markdown (the default), JSON, or its original transcript. A session id comes from the memory tools' search results in your agent.
crbon memory export <session-id> --format json
crbon memory export <session-id> --format raw --out transcript.jsonlWhat it does
| | | |
|---|---|---|
| Measure | Local agent token usage becomes CO2e on your dashboard | crbon sync |
| Remember | Find past sessions by text with search_content, read messages around a hit with get_messages, and check readiness with get_memory_status | crbon-mcp |
| Capture | Structured records: prompts, responses, tool calls, file diffs, models, tokens, git state | automatic |
| Save tokens | Compressed output, bounded reads and searches, repeat-read caching, loop detection | Claude |
| Protect | Redaction, sensitive-folder exclusion, .env blocking, secret scrubbing | always on |
Works with
Claude Code · Codex · Gemini CLI · Cursor · OpenClaw
How it works
your agents -> captured locally (~/.crbon) -> crbon sync (hourly) -> CrbonFree backend -> dashboard: CO2e
-> local memory (~/.crbon/memory) -> crbon-mcp -> your agentsMemory is indexed under ~/.crbon/memory and stays local unless you turn on
semantic features or memory sync. Usage sync uploads structured session records
for emissions. The backend computes emissions and powers the dashboard.
Commands
| Command | What it does |
|---|---|
| crbon install | One-command onboarding: sign-in, API key, scheduler, first sync |
| crbon sync | Capture and upload new sessions now |
| crbon schedule | Manage the OS scheduler (install / uninstall / status) |
| crbon status | Show what's configured and what's synced |
| crbon config | Manage configuration (set) |
| crbon uninstall | Remove the scheduler, agent hooks, and API key before removing the package |
Installed alongside crbon and wired up automatically by crbon install:
crbon-mcp (memory server), crbon-sync (historical backfill),
crbon-{claude,codex,gemini,cursor,openclaw}-hooks (per-tool capture), and
crbon-proxy (API capture proxy).
Scheduling
crbon install sets up an hourly sync on your OS scheduler automatically. To
change the interval, run crbon schedule install --interval 30m (also 60m or
2h). crbon schedule status shows the scheduler state and the last sync
outcome. crbon schedule uninstall removes the schedule.
What gets registered, per OS:
- macOS: a launchd agent named
com.crbon.sync. - Linux: a systemd user timer named
crbon-sync.timer. - Windows: a Task Scheduler task named
crbon-sync.
Uninstall
Run
crbon uninstall. This removes the OS schedule, the agent hooks (Claude Code, Gemini CLI, Codex, Cursor), and the OpenClaw plugin, and revokes the API key. Local data in~/.crbonis kept; pass--purgeto delete it too. Pass--keep-keyto skip revoking the API key.Remove the package:
npm uninstall -g @crbonfree/cli
If you already removed the package without running crbon uninstall, remove
the schedule manually:
- Windows:
schtasks /Delete /TN "crbon-sync" /F - macOS:
launchctl bootout gui/$(id -u)/com.crbon.sync && rm ~/Library/LaunchAgents/com.crbon.sync.plist - Linux:
systemctl --user disable --now crbon-sync.timer && rm ~/.config/systemd/user/crbon-sync.{service,timer}
Configuration
State lives under ~/.crbon (config, session events, sync history, quarantined
uploads). Resolution order is environment variable, then config file, then default.
| Variable | Overrides |
|---|---|
| CRBON_SERVER_URL | Backend base URL (default https://api.crbonfree.com) |
| CRBON_API_KEY | API key (normally set by crbon install) |
| CRBON_FRONTEND_URL | Dashboard base URL (default https://dashboard.crbonfree.com) |
crbon config set server-url https://api.crbonfree.com
crbon config set api-key <your-key>
crbon config set sync-folders <folder>,<folder>Privacy
crbon is local-first. Sessions are captured on your machine and uploaded only
when you sync. Built-in controls redact configured values, exclude sensitive
folders, block unsafe .env reads, and scrub secrets from tool output before
anything leaves your machine.
Only chosen folders count. On a machine that is also used for personal work, name the project folders that belong to your organisation:
crbon config set sync-folders ~/work/acme,~/work/acme-toolsSessions outside those folders are never read in full, never uploaded and never
counted. Memory follows the same list: only those folders are archived, and the
memory tools show only their sessions. crbon install asks the same question right after sign-in;
crbon install --sync-folders <list> or --all-folders answers it ahead of
time. An empty list means everything counts, and crbon status shows the list.
