Monoscope CLI & Agents
The monoscope CLI is a first-class way to use Monoscope from the terminal —
search logs and traces, query metrics, manage monitors and dashboards,
discover what’s in your project, and triage issues. It’s designed to be
equally good for humans and LLM agents: every command emits a stable JSON
envelope, every error includes the server-side detail, and pure helpers reject
malformed input client-side instead of forwarding an opaque HTTP 400.
One-liner install:
curl -fsSL https://monoscope.tech/install.sh | bash
Why a CLI?
-
Scriptable observability — bake assertions into CI (
metrics query "..." --assert "< 0.01"), apply monitors from YAML (monitors apply monitors/), or rotate API keys with a Bash one-liner. - Incident response — discover services with one command, drill into a single trace with the next, summarise the surrounding window with the third. No tab-switching.
-
AI-native — Claude Code, Cursor, Cline, and any agent that runs Bash can use the CLI as their tool surface. Set
MONOSCOPE_AGENT_MODE=1and every output is parseable JSON.
Quick start
# 1. Install
curl -fsSL https://monoscope.tech/install.sh | bash
# 2. Authenticate (browser-based; use --token for CI)
monoscope auth login
# 3. Set a default project
monoscope config set project <your-project-uuid>
# 4. Try it
monoscope services list
monoscope facets resource.service.name --top 5
monoscope events search 'severity.text=="error"' --since 1h --limit 10
What’s inside this section
Install & Authenticate
Linux/macOS install script, interactive vs token login, environment variables.Command Reference
Every subcommand: events, metrics, services, facets, monitors, dashboards, issues, schema, and more.Agentic Pipelines
Stable JSON envelopes for every command, the discover → search → triage chain, and how to feed an LLM.Claude Code Skills
Drop-in skills that turn natural-language requests into Monoscope CLI invocations.See also
- API Reference — the same endpoints the CLI calls, if you’d rather use HTTP directly.
- SDKs — instrument your apps to send data into Monoscope.
- Dashboard Guides — the same workflows in the web UI.