Coralogix CLI
$ cx Official Med RiskCoralogix CLI (cx) queries logs, spans, and PromQL metrics using DataPrime (cx logs, cx spans, cx metrics, cx dataprime), manages alerts and SLOs, and exposes cx schema for agent discovery. Features both -o json and compact -o toon output plus --url and --label scoping.
brew install cx cx includes cx schema self-description and -o toon compact serialization tailored for LLM agents, cutting telemetry log token consumption compared to verbose JSON MCP payloads.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Purpose-built for coding agents with -o json, token-saving -o toon, cx schema JSON introspection, and non-interactive flags (--url, --label).
- Supports
-o jsonand LLM-optimized-o toonoutput formats - Exposes
cx schemato dump the full command tree programmatically
Scoped Coralogix API keys and regional --url / --label targeting prevent cross-environment mistakes, though alert/SLO mutations lack --dry-run.
- Explicit
--urland--labelflags scope target regions - Supports separate
alerts enable/alerts disabletoggles
Available directly via Homebrew (brew install cx) and cross-platform release binaries.
- Single-binary install via
brew install cx
Unifies DataPrime logs, spans, PromQL metrics, alert management, and SLO inspection with minimal context overhead.
- Cross-pillar telemetry querying (
logs,spans,metrics,alerts,slos)
Official Coralogix repository (coralogix/cx-cli) under Apache-2.0 license.
- First-party
coralogix/cx-clirepository
Backed by cx schema runtime introspection, official agent skill guides, and Coralogix CLI docs.
- Official docs and
cx schemaself-describing command tree
Security, Auth & Guardrails
Stores regional profiles in ~/.cx/ or reads Coralogix API key environment variables (CORALOGIX_API_KEY) and --url / --label overrides.
Apache-2.0 open-source CLI; requires a Coralogix account and scoped API key.
# Coralogix CLI (cx) Agent Rules - Always include `| limit <N>` in DataPrime queries and use `-o toon` or `-o json`. - Run `cx schema` to verify exact command arguments before mutating `cx alerts` or `cx slos`. - Pass `--label` / `--url` or `CORALOGIX_API_KEY` explicitly to target the right Coralogix region.
Agent-Ready Command Recipes
Safe Read-Only Queries
cx dataprime query "source logs | filter \$l.applicationname == 'api' | limit 20" -o toon
Executes a bounded DataPrime log query and renders token-efficient -o toon output for agent analysis.
cx alerts list -o json
Retrieves Coralogix alert definitions in structured JSON without mutating alert state.
Controlled Writes & Previews
cx alerts disable <alert-id> -o json
Pauses a noisy alert rule while returning the updated JSON state.
Strengths for Agents
- + Native
-o toonformat dramatically reduces token usage when reading large log and span queries. - +
cx schemagives agents machine-readable discovery of every subcommand and flag.
Caveats & Pitfalls
- ! Unbounded DataPrime queries without
limitcan still return large payloads. - ! Write subcommands (
cx alerts create,cx alerts delete,cx slos) do not provide a universal--dry-run.