> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Use Error Tracking from PostHog CLI The [PostHog CLI](/docs/cli.md) is how error tracking gets what it needs from your build. Stack traces arrive minified or stripped, so the CLI uploads the debug symbols that turn them back into real file names, functions, and line numbers – and tags each upload with the release that produced it. This is a build-time and CI surface rather than a place you read issues. You triage and resolve issues in the [web app](/docs/error-tracking/surfaces/web-app.md) or over [MCP](/docs/error-tracking/surfaces/mcp.md). ## Before you start 1. **Set up Error Tracking** – [install exception capture in your app](/docs/error-tracking/installation.md) so exceptions reach PostHog. 2. **Install the CLI** – [install and authenticate `posthog-cli`](/docs/cli.md) with a personal API key. ## What you can do here - **Upload source maps** – inject and upload JavaScript source maps so minified frames resolve to your real code. See [Upload source maps with the CLI](/docs/error-tracking/upload-source-maps/cli.md). - **Upload native debug symbols** – Apple dSYM, Hermes for React Native, and Proguard/R8 mappings for Android, so native and mobile crashes symbolicate too. See [Android mappings](/docs/error-tracking/upload-mappings/android.md). - **Manage symbol sets** – list and download the symbol sets already uploaded to your project. - **Tag releases** – uploads made with `posthog-cli sourcemap upload` automatically create [release](/docs/error-tracking/releases.md) information, so you can tie an exception back to the deploy that introduced it. Uploads need a personal API key with the `error_tracking:write` scope. See the [CLI docs](/docs/cli.md) for installation and authentication. ## Run it in CI Symbol upload belongs in your build pipeline, so every deploy ships readable stack traces. There's a ready-made [GitHub Action](/docs/error-tracking/upload-source-maps/github-actions.md), and framework integrations for [Next.js](/docs/error-tracking/upload-source-maps/nextjs.md) and [Nuxt](/docs/error-tracking/upload-source-maps/nuxt.md) handle the upload step for you. ## Related - [PostHog CLI](/docs/cli.md) – installation, authentication, and the full command reference - [Stack traces](/docs/error-tracking/stack-traces.md) – how symbolication works and why uploads matter - [Releases](/docs/error-tracking/releases.md) – tying exceptions to the deploy that caused them ### Still have questions? Ask PostHog AI ### Was this page useful? HelpfulCould be better