Monitoring CLI
cmon is production monitoring from the command line: what monitoring filed, the latest daily brief, whether a repository is running or paused, and the one write that matters operationally — pause and resume.
Install
npm install -g @coldtea/monitoring
cmon --versionNeeds Node 20.6 or newer. The package has no runtime dependencies. It installs two names for the same binary: coldtea-monitoring, and cmon for short.
Auth
Create an API key in the Coldtea app with a Monitoring scope, then:
export COLDTEA_API_KEY=coldtea_sk_...
cmon whoamimonitoring:read covers repositories, settings and the brief. monitoring:write covers pause and resume. cmon issues reads the task API, so it also needs tasks:read.
First run
cmon repos # what is monitored, and each repository's id
cmon brief # what the latest daily run did and filed
cmon issues --since 24h # what monitoring filed lately
cmon pause # migration week: stop new work
cmon resume # pick the schedule back upWith one repository monitored, --repo is never needed — commands default to it. With several, pass --repo <id> from cmon repos, or set COLDTEA_MONITORING_REPO.
Issues are tasks
Monitoring files its findings as tasks carrying the monitoring label, so cmon issues is the task listing with that label pinned — the same rows ctask list --label monitoring answers, with the same filters: --since, --state-type, extra --label values that combine as AND. Any id it prints opens with ctask get <id>.
Filtered pages can run short: a page may hold fewer rows than the limit and still have a next page, so follow meta.nextCursor, never row counts.
What the CLI deliberately does not do
Budgets, splits, working days, agents and provider connections are dashboard decisions. Per-user email subscriptions cannot be a CLI concern at all: an API key identifies the TeaHouse, not a person, so the CLI cannot know whose email to change.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Done. A paused repository, or issues existing, is state — still 0. |
| 2 | Couldn't do it: timeouts, 5xx, transport. Worth retrying unchanged. |
| 3 | A conflict a person must resolve. |
| 4 | Auth or configuration error. Retrying unchanged can only fail again. |
There is no exit 1 — that code means "the app under test is broken", which is QA's verdict to give, and nothing here can produce it.
Machine output
--json prints one JSON document on stdout in the API's own envelope, { "data": ..., "meta": { "requestId": ... } }; errors go to stderr in the same shape. Quote meta.requestId when reporting a problem.
Environment
| Variable | Meaning |
|---|---|
COLDTEA_API_KEY | The coldtea_sk_... key. Identifies your TeaHouse. |
COLDTEA_MONITORING_REPO | Default repository id, from cmon repos. |
COLDTEA_BASE_URL | API origin (default https://www.coldtea.ai). Https only; plain http works on loopback addresses. |
COLDTEA_ALLOW_INSECURE_HTTP | Set to 1 to allow plain http to a non-loopback host, knowing the key travels unencrypted. |
NO_COLOR | Disable color. |
Commands
Generated from the CLI's own command table, so this list cannot drift from the binary. cmon help <command> prints the full help.
cmon whoami
Show the TeaHouse and key in use.
cmon repos
List monitored repositories and their ids.
cmon enabled
Is monitoring running or paused, one line.
| Flag | Value |
|---|---|
--repo | string |
cmon settings
Show one repository's monitoring settings.
| Flag | Value |
|---|---|
--repo | string |
cmon pause
Stop new monitoring work until resume.
| Flag | Value |
|---|---|
--repo | string |
cmon resume
Pick the monitoring schedule back up.
| Flag | Value |
|---|---|
--repo | string |
cmon brief
Show the latest daily run and its brief.
| Flag | Value |
|---|---|
--repo | string |
cmon issues
List what monitoring filed (--since, --state-type).
| Flag | Value |
|---|---|
--cursor | string |
--label | string, repeatable |
--limit | string |
--since | string |
--state-type | string |
--team | string |