@posthog/cli 0.7.34 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # posthog-cli
2
2
 
3
+ ## 0.8.2 — 2026-07-13
4
+
5
+ ### Patch changes
6
+
7
+ - [e38163eaab](https://github.com/PostHog/posthog/commit/e38163eaab6d1120f3c87fc2c38f2772ee9cadf2) Fix concurrent release creation and multipart symbol uploads — Thanks @ablaszkiewicz!
8
+
9
+ ## 0.8.1 — 2026-07-06
10
+
11
+ ### Patch changes
12
+
13
+ - [d57bdcce6d](https://github.com/PostHog/posthog/commit/d57bdcce6dc77adde629de5ffbbad10a6a99b850) Capture CLI errors with PostHog telemetry — Thanks @hpouillot!
14
+
15
+ ## 0.8.0 — 2026-07-03
16
+
17
+ ### Minor changes
18
+
19
+ - [066d914497](https://github.com/PostHog/posthog/commit/066d9144970955eaf366ff2a8be818460c6ad759) `symbol-sets upload` now also accepts Apple `.dSYM` bundles, packaging them through the same path as `dsym upload` (uppercase UUID chunk_ids, `AppleDsym` container). A single `posthog-cli symbol-sets upload --directory <dir>` run uploads both Linux ELF debug symbols and macOS dSYMs, so native symbol uploads no longer need a different command per platform. The dSYM branch shells out to `dwarfdump` (Xcode, macOS-only); when it is unavailable the bundle is reported and skipped while ELF symbols in the same directory still upload. The standalone `dsym upload` command is unchanged. — Thanks @cat-ph!
20
+
3
21
  ## 0.7.34 — 2026-06-30
4
22
 
5
23
  ### Patch changes
package/README.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # The Posthog CLI
2
2
 
3
+ The command line interface for PostHog. Exposes PostHog's MCP tool catalog through a shell-friendly interface, handles debug symbol uploads for error tracking, and more. For full documentation, see [our CLI docs](https://posthog.com/docs/cli).
4
+
5
+ ## Installation
6
+
7
+ Install the PostHog CLI with our wizard by running this command:
8
+
9
+ ```bash
10
+ npx -y @posthog/wizard@latest cli add
11
+ ```
12
+
13
+ If you'd rather not use our wizard, you can install the CLI by running:
14
+
15
+ ```bash
16
+ npm install -g @posthog/cli@latest
17
+ ```
18
+
19
+ Note: if you are installing the CLI for use with a coding agent, you should follow our [setup for agents](https://posthog.com/docs/cli#setup-for-agents) instructions.
20
+
21
+ ## Usage
22
+
3
23
  ```bash
4
24
  > posthog-cli --help
5
25
  The command line interface for PostHog 🦔
@@ -7,17 +27,25 @@ The command line interface for PostHog 🦔
7
27
  Usage: posthog-cli [OPTIONS] <COMMAND>
8
28
 
9
29
  Commands:
10
- login Interactively authenticate with PostHog, storing a personal API token locally. You can also use the environment variables `POSTHOG_CLI_API_KEY`, `POSTHOG_CLI_PROJECT_ID` and `POSTHOG_CLI_HOST`
11
- query Run a SQL query against any data you have in posthog. This is mostly for fun, and subject to change
12
- sourcemap Upload a directory of bundled chunks to PostHog
13
- exp Contains a set of experimental commands
14
- help Print this message or the help of the given subcommand(s)
30
+ login Interactively authenticate with PostHog, storing a personal API token locally. You can also use the environment variables `POSTHOG_CLI_API_KEY` and `POSTHOG_CLI_PROJECT_ID`
31
+ exp Experimental commands, not quite ready for prime time
32
+ sourcemap Upload a directory of bundled chunks to PostHog
33
+ dsym Upload Apple dSYM debug symbol files to PostHog
34
+ hermes Upload hermes sourcemaps to PostHog
35
+ proguard Upload proguard mapping files to PostHog
36
+ symbol-sets Upload, download, and manage symbol sets
37
+ api Agent-first PostHog API tools
38
+ help Print this message or the help of the given subcommand(s)
15
39
 
16
40
  Options:
17
- --host <HOST> The PostHog host to connect to [default: https://us.posthog.com]
18
- --dry-run Skip artifact processing and upload without contacting PostHog or requiring credentials
19
- -h, --help Print help
20
- -V, --version Print version
41
+ --host <HOST> The PostHog host to connect to
42
+ --no-fail Disable non-zero exit codes on errors. Use with caution
43
+ --skip-ssl-verification Skip SSL certificate verification when talking to the PostHog API. Use only with self-signed certificates
44
+ --rate-limit <RATE_LIMIT> Set the number of requests per minute for the Posthog API Client [env: POSTHOG_CLIENT_RATE_LIMIT=]
45
+ --dotenv-file <PATH> Load PostHog credentials from this dotenv-style file when not present in the process environment. Prefer this over the `--env-file` alias: the npm package runs the binary through a `node` wrapper, and Node's own built-in `--env-file` flag intercepts that spelling
46
+ --dry-run[=<DRY_RUN>] Skip artifact processing and upload (sourcemap, dSYM, hermes, proguard) without contacting PostHog or requiring credentials. Intended for CI gates that bundle to catch regressions but must not (or cannot) upload. Not for release builds. Pass it before the subcommand (`posthog-cli --dry-run hermes upload ...`) or set `POSTHOG_CLI_DRY_RUN`. This is distinct from the `exp endpoints` `--dry-run`, which previews endpoint changes [env: POSTHOG_CLI_DRY_RUN=] [default: false] [possible values: true, false]
47
+ -h, --help Print help
48
+ -V, --version Print version
21
49
  ```
22
50
 
23
51
  ## Env-based Authentication
@@ -32,6 +60,18 @@ These variables can also be loaded from a dotenv-style file via `--dotenv-file <
32
60
 
33
61
  Full precedence: CLI args → process env → `--dotenv-file` → `~/.posthog/credentials.json` (from `posthog-cli login`).
34
62
 
63
+ ## Uploading native debug symbols
64
+
65
+ `posthog-cli symbol-sets upload --directory <dir>` scans a directory for native debug symbols and uploads them so PostHog can symbolicate native stack frames.
66
+ A single command handles both desktop/server formats:
67
+
68
+ - **Linux (ELF):** executables, shared libraries, and `objcopy --only-keep-debug` companions that carry a GNU build id. This branch is cross-platform.
69
+ - **macOS (Apple `.dSYM`):** dSYM bundles are packaged through the same path as `posthog-cli dsym upload`. That path shells out to `dwarfdump` (bundled with Xcode), so it only runs on macOS — if `dwarfdump` is missing, the bundle is reported and skipped while any ELF symbols in the same directory still upload.
70
+
71
+ Pass `--include-source` to bundle the referenced source files for richer context around frames.
72
+
73
+ The standalone `posthog-cli dsym upload` command is unchanged and still recommended for dSYM-only Xcode build phases, where it also reads release and version metadata from each bundle's `Info.plist`.
74
+
35
75
  ## Skipping uploads (dry run)
36
76
 
37
77
  Pass `--dry-run` before the subcommand (`posthog-cli --dry-run hermes upload ...`), or set `POSTHOG_CLI_DRY_RUN=true`, to turn the upload commands — `sourcemap`, `dsym`, `hermes`, and `proguard` — into a no-op.
@@ -51,6 +91,8 @@ Commands require different API scopes. Make sure to set these scopes on your per
51
91
  | ----------------------------- | ------------------------------------------ |
52
92
  | `query` | `query:read` |
53
93
  | `sourcemap` | `error_tracking:write` |
94
+ | `symbol-sets` | `error_tracking:write` |
95
+ | `dsym` | `error_tracking:write` |
54
96
  | `exp endpoints list/get/pull` | `endpoint:read` |
55
97
  | `exp endpoints push` | `endpoint:write`, `insight_variable:write` |
56
98
  | `exp endpoints run` | `query:read` |