@ohos-ports/posthog-cli 0.18.10-beta.0 → 0.19.1-beta.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/README.md CHANGED
@@ -75,7 +75,7 @@ Options:
75
75
  --no-fail Disable non-zero exit codes on errors. Use with caution
76
76
  --skip-ssl-verification Skip SSL certificate verification when talking to the PostHog API. Use only with self-signed certificates
77
77
  --rate-limit <RATE_LIMIT> Set the number of requests per minute for the Posthog API Client [env: POSTHOG_CLIENT_RATE_LIMIT=]
78
- --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. Also settable as `POSTHOG_CLI_DOTENV_FILE`, for callers that control the environment but not the command line (e.g. an Xcode build phase invoking the iOS SDK's upload-symbols.sh) [env: POSTHOG_CLI_DOTENV_FILE=]
78
+ --dotenv-file <PATH> Load PostHog credentials from this dotenv-style file when not present in the process environment. Also settable as `POSTHOG_CLI_DOTENV_FILE`, for callers that control the environment but not the command line (e.g. an Xcode build phase invoking the iOS SDK's upload-symbols.sh) [env: POSTHOG_CLI_DOTENV_FILE=]
79
79
  --dry-run[=<DRY_RUN>] Skip artifact processing and upload (sourcemap, dSYM, hermes, proguard, release) 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]
80
80
  -h, --help Print help
81
81
  -V, --version Print version
@@ -102,7 +102,15 @@ A single command handles both desktop/server formats:
102
102
  - **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.
103
103
  - **macOS (Mach-O executables):** binaries that embed their own DWARF upload directly, keyed by their `LC_UUID`; universal (fat) binaries upload one symbol set per architecture slice. This branch is cross-platform. It exists mainly for Go, which never produces a dSYM (`dsymutil` reports "no debug symbols in executable") — but note Go compresses the embedded DWARF by default, which symbolication can't read yet, so build with `-ldflags=-compressdwarf=false`. C/Swift/Rust executables normally carry no embedded DWARF; upload their dSYMs instead.
104
104
 
105
- Pass `--include-source` to bundle the referenced source files for richer context around frames.
105
+ Pass `--include-source` to bundle referenced source files for context around frames.
106
+ For Flutter `.symbols` files, add `--source-root <app-directory>` to include only source files inside your app directory:
107
+
108
+ ```bash
109
+ posthog-cli symbol-sets upload --directory ./build/debug-info --include-source --source-root ./lib
110
+ ```
111
+
112
+ This option limits uploaded source files, not the debug symbols scanned under `--directory`.
113
+ Upload from the build machine while those source files are still available.
106
114
 
107
115
  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`.
108
116
 
@@ -136,8 +144,10 @@ Only the id goes to stdout, so `RELEASE_ID=$(posthog-cli release resolve)` works
136
144
  Pass `--json` to get the whole release, including its hash id and the version that git or CI metadata filled in.
137
145
 
138
146
  Both `--release-name` and `--release-version` are read from git or CI metadata when you leave them out.
139
- When neither the flags nor that metadata identify a release, the command prints nothing (or `null` with `--json`) and exits `0`, so a build can carry on without one.
140
- A failed lookup exits non-zero instead.
147
+ When the release name or version is missing and git or CI metadata cannot supply it, the command prints nothing (or `null` with `--json`) and exits `0`, so a build can carry on without a release.
148
+ Sourcemap processing still uploads symbols in this case, but it cannot associate them with a release.
149
+ Pass both `--release-name` and `--release-version` if the build has no git metadata and you need that association.
150
+ A failed lookup of a complete release exits non-zero instead.
141
151
 
142
152
  Add `--build` to give a build number its own release: it is packed into the version, so `--release-version 1.4.0 --build 42` resolves to a different release than `--release-version 1.4.0` alone.
143
153
 
@@ -192,6 +202,20 @@ posthog-cli api agents-md install
192
202
 
193
203
  Destructive tools require `--confirm` when executed. Use `--dry-run` before mutations.
194
204
 
205
+ ### Concurrent agents and project targeting
206
+
207
+ Give each API call its own target with `--project-id` and optionally `--organization-id`:
208
+
209
+ ```bash
210
+ posthog-cli api call --project-id 123 --json feature-flag-get-all '{"limit":5}'
211
+ posthog-cli api call --project-id 456 --json feature-flag-get-all '{"limit":5}'
212
+ posthog-cli api call --organization-id 00000000-0000-0000-0000-000000000001 --json projects-get '{}'
213
+ ```
214
+
215
+ These calls can run concurrently with the same API key, including against projects in different organizations. The key must already grant access to both targets. A project-only target derives its organization from the project. An organization-only target never falls back to a project in another organization; pass a project ID for project-scoped tools.
216
+
217
+ Explicit target flags replace both inherited target defaults, so an organization override does not inherit the project from your saved login, and a project override does not inherit another organization. Targets apply to one invocation and do not update your saved login or website selection. Repeat the flags on each call, or set `POSTHOG_CLI_PROJECT_ID` and `POSTHOG_CLI_ORGANIZATION_ID` separately in each agent's environment. The API bundle also accepts `POSTHOG_PROJECT_ID` and `POSTHOG_ORGANIZATION_ID`, which take precedence over the `POSTHOG_CLI_*` aliases. Switch tools do not persist a selection across CLI invocations.
218
+
195
219
  `posthog-cli api --agent-help` prints the full agent-facing guide — the same exec tool reference the PostHog MCP server serves, rewritten for CLI invocation — so agents can load it into context before interacting with PostHog APIs.
196
220
 
197
221
  ### Agent steering instructions