apitally-cli
Installation
SKILL.md
Apitally CLI
The Apitally CLI retrieves API metrics and request log data from Apitally and optionally stores it in a local DuckDB database for investigation with SQL. Two main data sources:
- Metrics — pre-aggregated data (request counts, error rates, response time percentiles, throughput). Retention: 30 days at 1-minute intervals, 13 months at 30-minute intervals.
- Request logs — individual API requests with method, URL, status code, response time, consumer, headers, payloads, exceptions, traces, and more. Retention: 15 days.
Run commands with npx (no install needed):
npx @apitally/cli <command> [--api-key <key>]
A team-scoped API key is required to use the CLI. The auth command saves an API key to ~/.apitally/auth.json, which is then used by all subsequent commands unless overridden by the --api-key flag. If any command exits with code 3 (auth error), ask the user to run npx @apitally/cli auth to authenticate, then continue.
All commands output NDJSON to stdout by default. With --db, data is written to a DuckDB database instead (~/.apitally/data.duckdb by default), enabling SQL queries via the sql command.