@posthog/cli 0.8.1 → 0.8.3
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 +12 -0
- package/README.md +53 -9
- package/lib/posthog-api-cli.mjs +5040 -2440
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# posthog-cli
|
|
2
2
|
|
|
3
|
+
## 0.8.3 — 2026-07-15
|
|
4
|
+
|
|
5
|
+
### Patch changes
|
|
6
|
+
|
|
7
|
+
- [97457ef9b4](https://github.com/PostHog/posthog/commit/97457ef9b493debd3975f12b8b6d1c4baaee2d93) Sourcemap upload concurrency can now be configured with `--concurrency` or `POSTHOG_CLI_SOURCEMAP_UPLOAD_CONCURRENCY`, while keeping the existing default of 10 uploads at a time. — Thanks @DebadityaHait!
|
|
8
|
+
|
|
9
|
+
## 0.8.2 — 2026-07-13
|
|
10
|
+
|
|
11
|
+
### Patch changes
|
|
12
|
+
|
|
13
|
+
- [e38163eaab](https://github.com/PostHog/posthog/commit/e38163eaab6d1120f3c87fc2c38f2772ee9cadf2) Fix concurrent release creation and multipart symbol uploads — Thanks @ablaszkiewicz!
|
|
14
|
+
|
|
3
15
|
## 0.8.1 — 2026-07-06
|
|
4
16
|
|
|
5
17
|
### 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
|
|
11
|
-
|
|
12
|
-
sourcemap
|
|
13
|
-
|
|
14
|
-
|
|
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>
|
|
18
|
-
--
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
@@ -44,6 +72,22 @@ Pass `--include-source` to bundle the referenced source files for richer context
|
|
|
44
72
|
|
|
45
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`.
|
|
46
74
|
|
|
75
|
+
## Configuring sourcemap upload concurrency
|
|
76
|
+
|
|
77
|
+
Sourcemap uploads run up to 10 file uploads at a time by default. Set a different positive value with `--concurrency` on `sourcemap upload` or `sourcemap process`:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
posthog-cli sourcemap process --directory ./dist --concurrency 32
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For build integrations such as `@posthog/nextjs-config`, set `POSTHOG_CLI_SOURCEMAP_UPLOAD_CONCURRENCY` in the build environment instead:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
POSTHOG_CLI_SOURCEMAP_UPLOAD_CONCURRENCY=32 npm run build
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The CLI flag takes precedence over the environment variable. Both require a value greater than zero. This setting applies only to plain sourcemap uploads; other CLI concurrency remains unchanged.
|
|
90
|
+
|
|
47
91
|
## Skipping uploads (dry run)
|
|
48
92
|
|
|
49
93
|
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.
|