# Posthog CLI

> Upload sourcemaps and symbol files to PostHog error tracking with posthog-cli. Use in release/build steps that must make stack traces readable. Not for analytics queries or app instrumentation.

- Skill: `timschoch/posthog-cli` (Agent Skill)
- Install (CLI): `npx skillmds@latest add timschoch/posthog-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/timschoch/posthog-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: timschoch (https://skillmd.com/u/timschoch)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/timschoch/posthog-cli

---


# PostHog CLI

PostHog ships `@posthog/cli` (binary: `posthog-cli`). Use it instead of hand-written API calls.

- Upload sourcemaps for error tracking: `posthog-cli sourcemap upload`
- Discover more: `posthog-cli --help`

Auth via `POSTHOG_CLI_TOKEN` (or the repo's configured env). Check the repo's build scripts — sourcemap upload is usually part of the release step.

