Skip to content
Current section: Monitor

Set Up Monitor

Part of Monitor. Start here to configure the product.

In the app, Monitor opens on its Setup tab until a machine pushes: five steps covering which agents and folders are counted (turned into the monitor.toml below), connecting this machine, an optional budget, inviting your team and what arrived. After the first push, Overview opens first and Setup moves to the last tab, ready for the next machine.

Install the CLI. Local reports need neither a cedr.dev account nor an MCP connection. Before the first collection, choose which folders to exclude and which agents to include.

For local-only collection, create ~/.config/cedr/monitor.toml with:

version = 1
projects = "none"
exclude = ["~/clients/private/**"]
auto = false

Replace the example exclusion with your own paths. projects controls uploaded project labels; it is not a substitute for exclude, which prevents collection of matching working directories. Leave the organization unset and do not schedule or run uploads for local-only use.

You can set harnesses = ["claude", "codex"] to collect only those agents; an empty list collects every supported agent found. Configure exclusions before running cedr monitor sources too, because it collects local usage.

Agent What Monitor reads
Claude Code Session logs, and plan limits from its status line
Codex Session logs (archived ones too), and plan limits from Codex itself
Gemini CLI Chat logs
Copilot CLI Session totals when a session ends
opencode Its local database, including the cost it reports
Muse Code Session logs, and plan limits from its usage command
Antigravity Conversation databases
Cursor Not yet: Cursor keeps no local token log

cedr monitor sources shows what it found for each agent on this machine, and why an agent has no data.

  1. If you want to upload usage, merge these settings into ~/.config/cedr/monitor.toml, preserving your exclusions and selected agents:

    version = 1
    org = "org-1a2b3c4d5e6f" # your organization ID, shown in the app
    projects = "name" # name, hash or none: how projects are named in the app
    exclude = ["~/clients/private/**"] # folders never counted
    auto = false
  2. Save an API key to ~/.config/cedr/api-key and run chmod 600 on it (or set CEDR_API_KEY).

  3. Run cedr monitor push --start all to send the history already on this machine (what your plan keeps), or cedr monitor push --start now to send only usage from now on. Later pushes, scheduled ones and --full included, keep that choice; run push --start again to change it. Moving the start earlier sends the older usage once; moving it later stops sending older usage but does not remove what the app already has. A push without a choice sends the history.

  4. If you want recurring uploads, run cedr monitor schedule to push every hour (a user timer on Linux, a launch agent on macOS, a scheduled task on Windows; --remove takes it away). With auto = true, Claude Code’s status line also pushes every 30 minutes while you work.

cedr monitor sources shows the first and last usage it found for each agent, so you can decide before the first push. projects = "hash" replaces project names with identifiers; projects = "none" omits project labels. Both still send usage counts.

Choose hourly scheduling and status-line uploads separately. Keep auto = false unless you want Claude Code’s status line to trigger uploads too. To stop recurring uploads, run cedr monitor schedule --remove and set auto = false.

The Ask your agent menu at the top right of the Monitor page in the app has Analyse my usage (explains where tokens and spend go, and how to cut them) and Troubleshoot missing data, beside Set up this machine and Roll out to my team. Each copies a prompt filled in with your organization’s settings; see Ask Your Agent in the App.

Removing Monitor from a machine stops collection and uploads: the hourly schedule, monitor.toml, the local usage store and, if Route does not need it, Claude Code’s status line. Your agents’ own logs stay, and usage already sent stays in the app. In the app, Ask your agent has Remove Monitor from this machine:

Remove Cedr Monitor from this machine.
Before deleting anything, list every file, setting, registration and scheduled job you would remove, with its path, and wait for my approval on each one. Skip anything I want to keep. Back up every configuration file you will change or delete into a new folder ~/cedr-backup-<YYYY-MM-DD>/ first, keeping its path. Never touch my organization's data in the cedr.dev app. Finish by telling me what you removed, where the backups are and what is left.
1. List what Monitor set up: the hourly timer (cedr monitor schedule installs it), ~/.config/cedr/monitor.toml, the local usage store ~/.local/state/cedr/monitor.sqlite with monitor-push.json and monitor-auto beside it, and Claude Code's status line in ~/.claude/settings.json.
2. Remove the timer with cedr monitor schedule --remove.
3. Back up and delete ~/.config/cedr/monitor.toml. Then run cedr monitor reset, which deletes the local usage store (the agents' own logs stay), and delete monitor-push.json and monitor-auto from ~/.local/state/cedr/.
4. Ask me whether I use Cedr Route: it reads Claude Code plan usage through the same status line. If I do not, and the status line is exactly cedr route statusline, remove the statusLine setting; if it wraps another command (cedr route statusline -- <command>), put back just that command.
5. Keep the cedr CLI.

By hand: run cedr monitor schedule --remove, back up and delete ~/.config/cedr/monitor.toml, run cedr monitor reset, delete ~/.local/state/cedr/monitor-push.json and monitor-auto, and remove or unwrap the cedr route statusline status line if Route does not use it.

Continue with Read Usage and Plan Limits, then Dashboard, Budgets and Alerts.