@posthog/cli
Advanced tools
+2
-2
@@ -20,3 +20,3 @@ const { Package } = require("./binary-install"); | ||
| const builderGlibcMajorVersion = glibcMinimum.major; | ||
| const builderGlibcMInorVersion = glibcMinimum.series; | ||
| const builderGlibcMinorVersion = glibcMinimum.series; | ||
@@ -67,3 +67,3 @@ const getPlatform = () => { | ||
| libcMajorVersion != builderGlibcMajorVersion || | ||
| libcMinorVersion < builderGlibcMInorVersion | ||
| libcMinorVersion < builderGlibcMinorVersion | ||
| ) { | ||
@@ -70,0 +70,0 @@ // We can't run the glibc binaries, but we can run the static musl ones |
+40
-0
| # posthog-cli | ||
| # 0.6.1 | ||
| - chore: bump `cargo-dist` version | ||
| # 0.6.0 | ||
@@ -7,2 +11,38 @@ | ||
| # 0.5.30 | ||
| - Add experimental dSYM upload for iOS/macOS crash symbolication | ||
| # 0.5.29 | ||
| - chore: introduce env variable `POSTHOG_CLI_API_KEY` and `POSTHOG_CLI_PROJECT_ID` (backwards compatible) | ||
| # 0.5.28 | ||
| - chore: introduce `--release-name` and `--release-version` options (backwards compatible) | ||
| # 0.5.27 | ||
| - fix: only warns on release id mismatch errors | ||
| # 0.5.26 | ||
| - feat: use env variables provided by github actions when available | ||
| # 0.5.24 | ||
| - chore: add endpoints use case to cli auth flow | ||
| # 0.5.23 | ||
| - feat: add experimental commands for endpoints management | ||
| # 0.5.22 | ||
| - feat: add `--project` and `--version` to upload command to define release | ||
| # 0.5.20 | ||
| - chore: add global `--rate-limit` option for Posthog client | ||
| # 0.5.19 | ||
@@ -9,0 +49,0 @@ |
+79
-52
@@ -10,10 +10,10 @@ { | ||
| "dependencies": { | ||
| "axios": "^1.13.2", | ||
| "axios": "^1.13.5", | ||
| "axios-proxy-builder": "^0.1.2", | ||
| "console.table": "^0.10.0", | ||
| "detect-libc": "^2.1.2", | ||
| "rimraf": "^6.1.2" | ||
| "rimraf": "^6.1.3" | ||
| }, | ||
| "devDependencies": { | ||
| "prettier": "^3.7.4" | ||
| "prettier": "^3.8.1" | ||
| }, | ||
@@ -27,25 +27,13 @@ "engines": { | ||
| "name": "@posthog/cli", | ||
| "version": "0.6.0" | ||
| "version": "0.6.1" | ||
| }, | ||
| "node_modules/@isaacs/balanced-match": { | ||
| "node_modules/@isaacs/cliui": { | ||
| "engines": { | ||
| "node": "20 || >=22" | ||
| "node": ">=18" | ||
| }, | ||
| "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", | ||
| "version": "4.0.1" | ||
| "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", | ||
| "version": "9.0.0" | ||
| }, | ||
| "node_modules/@isaacs/brace-expansion": { | ||
| "dependencies": { | ||
| "@isaacs/balanced-match": "^4.0.1" | ||
| }, | ||
| "engines": { | ||
| "node": "20 || >=22" | ||
| }, | ||
| "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", | ||
| "version": "5.0.0" | ||
| }, | ||
| "node_modules/asynckit": { | ||
@@ -59,10 +47,10 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", | ||
| "dependencies": { | ||
| "follow-redirects": "^1.15.6", | ||
| "form-data": "^4.0.4", | ||
| "follow-redirects": "^1.15.11", | ||
| "form-data": "^4.0.5", | ||
| "proxy-from-env": "^1.1.0" | ||
| }, | ||
| "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", | ||
| "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", | ||
| "version": "1.13.2" | ||
| "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", | ||
| "version": "1.13.5" | ||
| }, | ||
@@ -78,2 +66,26 @@ "node_modules/axios-proxy-builder": { | ||
| }, | ||
| "node_modules/balanced-match": { | ||
| "dependencies": { | ||
| "jackspeak": "^4.2.3" | ||
| }, | ||
| "engines": { | ||
| "node": "20 || >=22" | ||
| }, | ||
| "integrity": "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.2.tgz", | ||
| "version": "4.0.2" | ||
| }, | ||
| "node_modules/brace-expansion": { | ||
| "dependencies": { | ||
| "balanced-match": "^4.0.2" | ||
| }, | ||
| "engines": { | ||
| "node": "20 || >=22" | ||
| }, | ||
| "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", | ||
| "version": "5.0.2" | ||
| }, | ||
| "node_modules/call-bind-apply-helpers": { | ||
@@ -235,3 +247,3 @@ "dependencies": { | ||
| ], | ||
| "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", | ||
| "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", | ||
| "license": "MIT", | ||
@@ -243,4 +255,4 @@ "peerDependenciesMeta": { | ||
| }, | ||
| "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", | ||
| "version": "1.15.6" | ||
| "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", | ||
| "version": "1.15.11" | ||
| }, | ||
@@ -258,6 +270,6 @@ "node_modules/form-data": { | ||
| }, | ||
| "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", | ||
| "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", | ||
| "version": "4.0.4" | ||
| "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", | ||
| "version": "4.0.5" | ||
| }, | ||
@@ -312,3 +324,3 @@ "node_modules/function-bind": { | ||
| "dependencies": { | ||
| "minimatch": "^10.1.1", | ||
| "minimatch": "^10.2.0", | ||
| "minipass": "^7.1.2", | ||
@@ -323,6 +335,6 @@ "path-scurry": "^2.0.0" | ||
| }, | ||
| "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", | ||
| "integrity": "sha512-/g3B0mC+4x724v1TgtBlBtt2hPi/EWptsIAmXUx9Z2rvBYleQcsrmaOzd5LyL50jf/Soi83ZDJmw2+XqvH/EeA==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", | ||
| "version": "13.0.0" | ||
| "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.3.tgz", | ||
| "version": "13.0.3" | ||
| }, | ||
@@ -380,2 +392,17 @@ "node_modules/gopd": { | ||
| }, | ||
| "node_modules/jackspeak": { | ||
| "dependencies": { | ||
| "@isaacs/cliui": "^9.0.0" | ||
| }, | ||
| "engines": { | ||
| "node": "20 || >=22" | ||
| }, | ||
| "funding": { | ||
| "url": "https://github.com/sponsors/isaacs" | ||
| }, | ||
| "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", | ||
| "version": "4.2.3" | ||
| }, | ||
| "node_modules/lru-cache": { | ||
@@ -385,6 +412,6 @@ "engines": { | ||
| }, | ||
| "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", | ||
| "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", | ||
| "version": "11.2.4" | ||
| "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", | ||
| "version": "11.2.6" | ||
| }, | ||
@@ -423,3 +450,3 @@ "node_modules/math-intrinsics": { | ||
| "dependencies": { | ||
| "@isaacs/brace-expansion": "^5.0.0" | ||
| "brace-expansion": "^5.0.2" | ||
| }, | ||
@@ -432,6 +459,6 @@ "engines": { | ||
| }, | ||
| "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", | ||
| "integrity": "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", | ||
| "version": "10.1.1" | ||
| "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.0.tgz", | ||
| "version": "10.2.0" | ||
| }, | ||
@@ -480,6 +507,6 @@ "node_modules/minipass": { | ||
| }, | ||
| "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", | ||
| "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", | ||
| "license": "MIT", | ||
| "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", | ||
| "version": "3.7.4" | ||
| "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", | ||
| "version": "3.8.1" | ||
| }, | ||
@@ -497,3 +524,3 @@ "node_modules/proxy-from-env": { | ||
| "dependencies": { | ||
| "glob": "^13.0.0", | ||
| "glob": "^13.0.3", | ||
| "package-json-from-dist": "^1.0.1" | ||
@@ -507,6 +534,6 @@ }, | ||
| }, | ||
| "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", | ||
| "integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==", | ||
| "license": "BlueOak-1.0.0", | ||
| "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", | ||
| "version": "6.1.2" | ||
| "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz", | ||
| "version": "6.1.3" | ||
| }, | ||
@@ -534,3 +561,3 @@ "node_modules/tunnel": { | ||
| "requires": true, | ||
| "version": "0.6.0" | ||
| "version": "0.6.1" | ||
| } |
+5
-5
| { | ||
| "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.6.0", | ||
| "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.6.1", | ||
| "bin": { | ||
@@ -12,11 +12,11 @@ "posthog-cli": "run-posthog-cli.js" | ||
| "dependencies": { | ||
| "axios": "^1.13.2", | ||
| "axios": "^1.13.5", | ||
| "axios-proxy-builder": "^0.1.2", | ||
| "console.table": "^0.10.0", | ||
| "detect-libc": "^2.1.2", | ||
| "rimraf": "^6.1.2" | ||
| "rimraf": "^6.1.3" | ||
| }, | ||
| "description": "The command line interface for PostHog 🦔", | ||
| "devDependencies": { | ||
| "prettier": "^3.7.4" | ||
| "prettier": "^3.8.1" | ||
| }, | ||
@@ -120,3 +120,3 @@ "engines": { | ||
| }, | ||
| "version": "0.6.0", | ||
| "version": "0.6.1", | ||
| "volta": { | ||
@@ -123,0 +123,0 @@ "node": "18.14.1", |
+17
-3
@@ -10,5 +10,6 @@ # The Posthog CLI | ||
| Commands: | ||
| 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` | ||
| 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` | ||
| query Run a SQL query against any data you have in posthog. This is mostly for fun, and subject to change | ||
| sourcemap Upload a directory of bundled chunks to PostHog | ||
| exp Contains a set of experimental commands | ||
| help Print this message or the help of the given subcommand(s) | ||
@@ -27,3 +28,16 @@ | ||
| - `POSTHOG_CLI_HOST`: The PostHog host to connect to [default: https://us.posthog.com] | ||
| - `POSTHOG_CLI_TOKEN`: [A posthog person API key.](https://posthog.com/docs/api#private-endpoint-authentication) | ||
| - `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` | ||
| - `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) | ||
| - `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) | ||
| ### Personal API key scopes | ||
| Commands require different API scopes. Make sure to set these scopes on your personal API key: | ||
| | Command | Required Scopes | | ||
| | ----------------------------- | ------------------------------------------ | | ||
| | `query` | `query:read` | | ||
| | `sourcemap` | `error_tracking:write` | | ||
| | `exp endpoints list/get/pull` | `endpoint:read` | | ||
| | `exp endpoints push` | `endpoint:write`, `insight_variable:write` | | ||
| | `exp endpoints run` | `query:read` | | ||
| | `exp tasks` | `task:read` | |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
39573
6.99%852
3.27%42
50%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated