Reference

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 --version

Needs 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 whoami

monitoring: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 up

With 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

CodeMeaning
0Done. A paused repository, or issues existing, is state — still 0.
2Couldn't do it: timeouts, 5xx, transport. Worth retrying unchanged.
3A conflict a person must resolve.
4Auth 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

VariableMeaning
COLDTEA_API_KEYThe coldtea_sk_... key. Identifies your TeaHouse.
COLDTEA_MONITORING_REPODefault repository id, from cmon repos.
COLDTEA_BASE_URLAPI origin (default https://www.coldtea.ai). Https only; plain http works on loopback addresses.
COLDTEA_ALLOW_INSECURE_HTTPSet to 1 to allow plain http to a non-loopback host, knowing the key travels unencrypted.
NO_COLORDisable 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.

FlagValue
--repostring

cmon settings

Show one repository's monitoring settings.

FlagValue
--repostring

cmon pause

Stop new monitoring work until resume.

FlagValue
--repostring

cmon resume

Pick the monitoring schedule back up.

FlagValue
--repostring

cmon brief

Show the latest daily run and its brief.

FlagValue
--repostring

cmon issues

List what monitoring filed (--since, --state-type).

FlagValue
--cursorstring
--labelstring, repeatable
--limitstring
--sincestring
--state-typestring
--teamstring

On this page