@posthog/cli 0.6.0 → 0.6.1

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,9 +1,49 @@
1
1
  # posthog-cli
2
2
 
3
+ # 0.6.1
4
+
5
+ - chore: bump `cargo-dist` version
6
+
3
7
  # 0.6.0
4
8
 
5
9
  - Add experimental dSYM upload for iOS/macOS crash symbolication
6
10
 
11
+ # 0.5.30
12
+
13
+ - Add experimental dSYM upload for iOS/macOS crash symbolication
14
+
15
+ # 0.5.29
16
+
17
+ - chore: introduce env variable `POSTHOG_CLI_API_KEY` and `POSTHOG_CLI_PROJECT_ID` (backwards compatible)
18
+
19
+ # 0.5.28
20
+
21
+ - chore: introduce `--release-name` and `--release-version` options (backwards compatible)
22
+
23
+ # 0.5.27
24
+
25
+ - fix: only warns on release id mismatch errors
26
+
27
+ # 0.5.26
28
+
29
+ - feat: use env variables provided by github actions when available
30
+
31
+ # 0.5.24
32
+
33
+ - chore: add endpoints use case to cli auth flow
34
+
35
+ # 0.5.23
36
+
37
+ - feat: add experimental commands for endpoints management
38
+
39
+ # 0.5.22
40
+
41
+ - feat: add `--project` and `--version` to upload command to define release
42
+
43
+ # 0.5.20
44
+
45
+ - chore: add global `--rate-limit` option for Posthog client
46
+
7
47
  # 0.5.19
8
48
 
9
49
  - chore: upgrade cargo-dist to 0.30.3
package/README.md CHANGED
@@ -7,9 +7,10 @@ The command line interface for PostHog 🦔
7
7
  Usage: posthog-cli [OPTIONS] <COMMAND>
8
8
 
9
9
  Commands:
10
- login Interactively authenticate with PostHog, storing a personal API token locally. You can also use the environment variables `POSTHOG_CLI_TOKEN`, `POSTHOG_CLI_ENV_ID` and `POSTHOG_CLI_HOST`
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
11
  query Run a SQL query against any data you have in posthog. This is mostly for fun, and subject to change
12
12
  sourcemap Upload a directory of bundled chunks to PostHog
13
+ exp Contains a set of experimental commands
13
14
  help Print this message or the help of the given subcommand(s)
14
15
 
15
16
  Options:
@@ -23,5 +24,18 @@ Options:
23
24
  You can authenticate with PostHog interactively for using the CLI locally, but if you'd like to use it in a CI/CD pipeline, we recommend using these environment variables:
24
25
 
25
26
  - `POSTHOG_CLI_HOST`: The PostHog host to connect to [default: https://us.posthog.com]
26
- - `POSTHOG_CLI_TOKEN`: [A posthog person API key.](https://posthog.com/docs/api#private-endpoint-authentication)
27
- - `POSTHOG_CLI_ENV_ID`: The ID number of the project/environment to connect to. E.g. the "2" in `https://us.posthog.com/project/2`
27
+ - `POSTHOG_CLI_API_KEY`: [A posthog personal API key.](https://posthog.com/docs/api#private-endpoint-authentication) (also accepts `POSTHOG_CLI_TOKEN` for backward compatibility)
28
+ - `POSTHOG_CLI_PROJECT_ID`: The ID number of the project/environment to connect to. E.g. the "2" in `https://us.posthog.com/project/2` (also accepts `POSTHOG_CLI_ENV_ID` for backward compatibility)
29
+
30
+ ### Personal API key scopes
31
+
32
+ Commands require different API scopes. Make sure to set these scopes on your personal API key:
33
+
34
+ | Command | Required Scopes |
35
+ | ----------------------------- | ------------------------------------------ |
36
+ | `query` | `query:read` |
37
+ | `sourcemap` | `error_tracking:write` |
38
+ | `exp endpoints list/get/pull` | `endpoint:read` |
39
+ | `exp endpoints push` | `endpoint:write`, `insight_variable:write` |
40
+ | `exp endpoints run` | `query:read` |
41
+ | `exp tasks` | `task:read` |
package/binary.js CHANGED
@@ -17,7 +17,7 @@ const {
17
17
  } = require("./package.json");
18
18
 
19
19
  const builderGlibcMajorVersion = glibcMinimum.major;
20
- const builderGlibcMInorVersion = glibcMinimum.series;
20
+ const builderGlibcMinorVersion = glibcMinimum.series;
21
21
 
22
22
  const getPlatform = () => {
23
23
  const rawOsType = os.type();
@@ -63,7 +63,7 @@ const getPlatform = () => {
63
63
  let libcMinorVersion = splitLibcVersion[1];
64
64
  if (
65
65
  libcMajorVersion != builderGlibcMajorVersion ||
66
- libcMinorVersion < builderGlibcMInorVersion
66
+ libcMinorVersion < builderGlibcMinorVersion
67
67
  ) {
68
68
  // We can't run the glibc binaries, but we can run the static musl ones
69
69
  // if they exist
@@ -7,14 +7,14 @@
7
7
  "posthog-cli": "run-posthog-cli.js"
8
8
  },
9
9
  "dependencies": {
10
- "axios": "^1.13.2",
10
+ "axios": "^1.13.5",
11
11
  "axios-proxy-builder": "^0.1.2",
12
12
  "console.table": "^0.10.0",
13
13
  "detect-libc": "^2.1.2",
14
- "rimraf": "^6.1.2"
14
+ "rimraf": "^6.1.3"
15
15
  },
16
16
  "devDependencies": {
17
- "prettier": "^3.7.4"
17
+ "prettier": "^3.8.1"
18
18
  },
19
19
  "engines": {
20
20
  "node": ">=14",
@@ -23,28 +23,16 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "@posthog/cli",
26
- "version": "0.6.0"
26
+ "version": "0.6.1"
27
27
  },
28
- "node_modules/@isaacs/balanced-match": {
28
+ "node_modules/@isaacs/cliui": {
29
29
  "engines": {
30
- "node": "20 || >=22"
31
- },
32
- "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
33
- "license": "MIT",
34
- "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
35
- "version": "4.0.1"
36
- },
37
- "node_modules/@isaacs/brace-expansion": {
38
- "dependencies": {
39
- "@isaacs/balanced-match": "^4.0.1"
30
+ "node": ">=18"
40
31
  },
41
- "engines": {
42
- "node": "20 || >=22"
43
- },
44
- "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
45
- "license": "MIT",
46
- "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
47
- "version": "5.0.0"
32
+ "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
33
+ "license": "BlueOak-1.0.0",
34
+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
35
+ "version": "9.0.0"
48
36
  },
49
37
  "node_modules/asynckit": {
50
38
  "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
@@ -54,14 +42,14 @@
54
42
  },
55
43
  "node_modules/axios": {
56
44
  "dependencies": {
57
- "follow-redirects": "^1.15.6",
58
- "form-data": "^4.0.4",
45
+ "follow-redirects": "^1.15.11",
46
+ "form-data": "^4.0.5",
59
47
  "proxy-from-env": "^1.1.0"
60
48
  },
61
- "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
49
+ "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
62
50
  "license": "MIT",
63
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
64
- "version": "1.13.2"
51
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
52
+ "version": "1.13.5"
65
53
  },
66
54
  "node_modules/axios-proxy-builder": {
67
55
  "dependencies": {
@@ -72,6 +60,30 @@
72
60
  "resolved": "https://registry.npmjs.org/axios-proxy-builder/-/axios-proxy-builder-0.1.2.tgz",
73
61
  "version": "0.1.2"
74
62
  },
63
+ "node_modules/balanced-match": {
64
+ "dependencies": {
65
+ "jackspeak": "^4.2.3"
66
+ },
67
+ "engines": {
68
+ "node": "20 || >=22"
69
+ },
70
+ "integrity": "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==",
71
+ "license": "MIT",
72
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.2.tgz",
73
+ "version": "4.0.2"
74
+ },
75
+ "node_modules/brace-expansion": {
76
+ "dependencies": {
77
+ "balanced-match": "^4.0.2"
78
+ },
79
+ "engines": {
80
+ "node": "20 || >=22"
81
+ },
82
+ "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
83
+ "license": "MIT",
84
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
85
+ "version": "5.0.2"
86
+ },
75
87
  "node_modules/call-bind-apply-helpers": {
76
88
  "dependencies": {
77
89
  "es-errors": "^1.3.0",
@@ -228,15 +240,15 @@
228
240
  "url": "https://github.com/sponsors/RubenVerborgh"
229
241
  }
230
242
  ],
231
- "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
243
+ "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
232
244
  "license": "MIT",
233
245
  "peerDependenciesMeta": {
234
246
  "debug": {
235
247
  "optional": true
236
248
  }
237
249
  },
238
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
239
- "version": "1.15.6"
250
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
251
+ "version": "1.15.11"
240
252
  },
241
253
  "node_modules/form-data": {
242
254
  "dependencies": {
@@ -249,10 +261,10 @@
249
261
  "engines": {
250
262
  "node": ">= 6"
251
263
  },
252
- "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
264
+ "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
253
265
  "license": "MIT",
254
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
255
- "version": "4.0.4"
266
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
267
+ "version": "4.0.5"
256
268
  },
257
269
  "node_modules/function-bind": {
258
270
  "funding": {
@@ -302,7 +314,7 @@
302
314
  },
303
315
  "node_modules/glob": {
304
316
  "dependencies": {
305
- "minimatch": "^10.1.1",
317
+ "minimatch": "^10.2.0",
306
318
  "minipass": "^7.1.2",
307
319
  "path-scurry": "^2.0.0"
308
320
  },
@@ -312,10 +324,10 @@
312
324
  "funding": {
313
325
  "url": "https://github.com/sponsors/isaacs"
314
326
  },
315
- "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==",
327
+ "integrity": "sha512-/g3B0mC+4x724v1TgtBlBtt2hPi/EWptsIAmXUx9Z2rvBYleQcsrmaOzd5LyL50jf/Soi83ZDJmw2+XqvH/EeA==",
316
328
  "license": "BlueOak-1.0.0",
317
- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz",
318
- "version": "13.0.0"
329
+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.3.tgz",
330
+ "version": "13.0.3"
319
331
  },
320
332
  "node_modules/gopd": {
321
333
  "engines": {
@@ -368,14 +380,29 @@
368
380
  "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
369
381
  "version": "2.0.2"
370
382
  },
383
+ "node_modules/jackspeak": {
384
+ "dependencies": {
385
+ "@isaacs/cliui": "^9.0.0"
386
+ },
387
+ "engines": {
388
+ "node": "20 || >=22"
389
+ },
390
+ "funding": {
391
+ "url": "https://github.com/sponsors/isaacs"
392
+ },
393
+ "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
394
+ "license": "BlueOak-1.0.0",
395
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
396
+ "version": "4.2.3"
397
+ },
371
398
  "node_modules/lru-cache": {
372
399
  "engines": {
373
400
  "node": "20 || >=22"
374
401
  },
375
- "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==",
402
+ "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==",
376
403
  "license": "BlueOak-1.0.0",
377
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz",
378
- "version": "11.2.4"
404
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz",
405
+ "version": "11.2.6"
379
406
  },
380
407
  "node_modules/math-intrinsics": {
381
408
  "engines": {
@@ -409,7 +436,7 @@
409
436
  },
410
437
  "node_modules/minimatch": {
411
438
  "dependencies": {
412
- "@isaacs/brace-expansion": "^5.0.0"
439
+ "brace-expansion": "^5.0.2"
413
440
  },
414
441
  "engines": {
415
442
  "node": "20 || >=22"
@@ -417,10 +444,10 @@
417
444
  "funding": {
418
445
  "url": "https://github.com/sponsors/isaacs"
419
446
  },
420
- "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
447
+ "integrity": "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==",
421
448
  "license": "BlueOak-1.0.0",
422
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
423
- "version": "10.1.1"
449
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.0.tgz",
450
+ "version": "10.2.0"
424
451
  },
425
452
  "node_modules/minipass": {
426
453
  "engines": {
@@ -464,10 +491,10 @@
464
491
  "funding": {
465
492
  "url": "https://github.com/prettier/prettier?sponsor=1"
466
493
  },
467
- "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
494
+ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==",
468
495
  "license": "MIT",
469
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz",
470
- "version": "3.7.4"
496
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz",
497
+ "version": "3.8.1"
471
498
  },
472
499
  "node_modules/proxy-from-env": {
473
500
  "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
@@ -480,7 +507,7 @@
480
507
  "rimraf": "dist/esm/bin.mjs"
481
508
  },
482
509
  "dependencies": {
483
- "glob": "^13.0.0",
510
+ "glob": "^13.0.3",
484
511
  "package-json-from-dist": "^1.0.1"
485
512
  },
486
513
  "engines": {
@@ -489,10 +516,10 @@
489
516
  "funding": {
490
517
  "url": "https://github.com/sponsors/isaacs"
491
518
  },
492
- "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
519
+ "integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==",
493
520
  "license": "BlueOak-1.0.0",
494
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
495
- "version": "6.1.2"
521
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz",
522
+ "version": "6.1.3"
496
523
  },
497
524
  "node_modules/tunnel": {
498
525
  "engines": {
@@ -515,5 +542,5 @@
515
542
  }
516
543
  },
517
544
  "requires": true,
518
- "version": "0.6.0"
545
+ "version": "0.6.1"
519
546
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.6.0",
2
+ "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.6.1",
3
3
  "bin": {
4
4
  "posthog-cli": "run-posthog-cli.js"
5
5
  },
@@ -9,15 +9,15 @@
9
9
  "Hugues <hugues@posthog.com>"
10
10
  ],
11
11
  "dependencies": {
12
- "axios": "^1.13.2",
12
+ "axios": "^1.13.5",
13
13
  "axios-proxy-builder": "^0.1.2",
14
14
  "console.table": "^0.10.0",
15
15
  "detect-libc": "^2.1.2",
16
- "rimraf": "^6.1.2"
16
+ "rimraf": "^6.1.3"
17
17
  },
18
18
  "description": "The command line interface for PostHog 🦔",
19
19
  "devDependencies": {
20
- "prettier": "^3.7.4"
20
+ "prettier": "^3.8.1"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=14",
@@ -116,7 +116,7 @@
116
116
  "zipExt": ".tar.gz"
117
117
  }
118
118
  },
119
- "version": "0.6.0",
119
+ "version": "0.6.1",
120
120
  "volta": {
121
121
  "node": "18.14.1",
122
122
  "npm": "9.5.0"