| name | observability-clis |
| description | Query PostHog error tracking and Sentry issues from the command line. Use when asked what errors are happening, which errors are being missed or untriaged, for production error rates or impact by user, or whenever posthog-cli or sentry-cli is mentioned. |
Observability CLIs
Both tools have quirks that waste turns if rediscovered. Org and project slugs are
project-specific — check that project's CLAUDE.local.md.
PostHog
The binary is posthog-cli, installed via mise. The agent-first surface is
posthog-cli api:
posthog-cli api search <regex>
posthog-cli api info --json <tool>
posthog-cli api call --json <tool> '<json>'
For "what errors are happening" or "what is being missed", use
query-error-tracking-issues-list. It defaults to active issues, the last 7 days,
sorted by occurrences, with test accounts filtered out.
For impact rather than volume:
posthog-cli api call --json query-error-tracking-issues-list \
'{"dateRange":{"date_from":"-30d"},"orderBy":"users"}'
assignee: null across the board means nobody is triaging.
Sentry
sentry-cli uses a personal read token in ~/.sentryclirc.
The --org flag goes after the subcommand, not before:
sentry-cli projects --org <org> list
There is no issues-list subcommand. Query issues through the REST API with the same
token, read from the file inline so the literal stays out of shell history and
transcripts:
curl -H "Authorization: Bearer $(sed -n 's/^token=//p' ~/.sentryclirc)" \
"https://sentry.io/api/0/projects/<org>/<project>/issues/?statsPeriod=24h&query=is:unresolved&sort=freq&limit=15"
Useful query filters: is:unresolved, an endpoint path, N+1.
Parse responses with json.loads(..., strict=False). Bodies contain raw control
characters inside SQL strings and strict parsing fails on them.