Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(cli): show upload option defaults in help (#64222)

Manoel Aranda Neto36812957e0b6
diff --git a/cli/.sampo/changesets/pompous-earl-vellamo.md b/cli/.sampo/changesets/pompous-earl-vellamo.md
new file mode 100644
index 000000000000..21e733e7e584
--- /dev/null
+++ b/cli/.sampo/changesets/pompous-earl-vellamo.md
@@ -0,0 +1,5 @@
+---
+cargo/posthog-cli: patch
+---
+
+Show default values in upload help
diff --git a/cli/CONTRIBUTING.md b/cli/CONTRIBUTING.md
index 76cc7d9f3b8a..064fad01cf3c 100644
--- a/cli/CONTRIBUTING.md
+++ b/cli/CONTRIBUTING.md
@@ -1,55 +1,6 @@
-## Releases
+## Releasing
-Releases are prepared with [Sampo](https://github.com/bruits/sampo) changesets and published by the `Release CLI`
-workflow's [`cargo-dist`](https://github.com/axodotdev/cargo-dist) jobs.
-
-When making a releasable CLI change, add a changeset from the `./cli` directory:
-
-```bash
-sampo add --package cargo/posthog-cli --bump patch --message "Describe the CLI change"
-```
-
-Use `minor` or `major` instead of `patch` when appropriate. Commit the generated file under
-`cli/.sampo/changesets/` with your pull request.
-
-After the pull request merges to `master`, the `Release CLI` workflow:
-
-1. Checks for pending CLI changesets
-2. Waits for approval in the GitHub `Release SDK` environment
-3. Runs `sampo release` from `./cli`
-4. Updates `cli/Cargo.toml`, `cli/Cargo.lock`, and `cli/CHANGELOG.md`
-5. Commits the release bump to `master`
-6. Runs cargo-dist against the release bump commit
-7. Creates the `posthog-cli/vX.Y.Z` GitHub release, refreshes `posthog-cli-latest` for stable releases, and publishes the npm package
-
-Do not run `sampo publish`; cargo-dist owns publishing for `posthog-cli`.
-
-If you need to cut a release by hand, merge a CLI changeset to `master` and let `Release CLI` run from there.
-Do not push `posthog-cli/vX.Y.Z` tags manually; cargo-dist tag-push releases are disabled.
-If cargo-dist fails after `Release CLI` commits the release bump, rerun the failed jobs from the same workflow run.
-
-The release workflow also builds `services/mcp` into `cli/lib/posthog-api-cli.mjs` before cargo-dist packages artifacts.
-This keeps `posthog-cli api` aligned with the generated MCP tool catalog at release time.
-To reproduce that release bundle locally, run:
-
-```bash
-pnpm --dir services/mcp run build:cli:release
-```
-
-To smoke-test the packaged CLI before cutting a release, build the same cargo-dist archive and installer locally,
-then run both the unpacked archive and the generated shell installer from a temporary home directory:
-
-```bash
-flox activate -- bash -c 'cargo install cargo-dist --version 0.32.0 --locked'
-DIST_BIN="$HOME/.cargo/bin/dist" flox activate -- bash -c './cli/scripts/smoke-release-artifact.sh'
-```
-
-If you are testing uncommitted local changes, set `CLI_RELEASE_SMOKE_ALLOW_DIRTY=1` for the second command.
-The smoke test verifies that the archive includes `lib/posthog-api-cli.mjs`, that `posthog-cli api --agent-help` works from the unpacked artifact, and that the generated shell installer produces a working `posthog-cli api` install without relying on a PostHog repo checkout.
-It serves `target/distrib` on `127.0.0.1:8765` while testing the installer; set `CLI_RELEASE_SMOKE_PORT` if that port is already in use.
-It does not replace any `posthog-cli` already on your `PATH`; to manually test the built artifact, run `target/distrib/posthog-cli-$(rustc -vV | sed -n 's/^host: //p')/posthog-cli api --agent-help`.
-
-We release semi-regularly, as new features are added. If a release breaks your CI or workflow, please open an issue on GitHub, and tag one or all of the crate authors
+See [RELEASING.md](./RELEASING.md) for the full release process.
## Running a local build
diff --git a/cli/RELEASING.md b/cli/RELEASING.md
new file mode 100644
index 000000000000..7febd0a82522
--- /dev/null
+++ b/cli/RELEASING.md
@@ -0,0 +1,52 @@
+## Releases
+
+Releases are prepared with [Sampo](https://github.com/bruits/sampo) changesets and published by the `Release CLI`
+workflow's [`cargo-dist`](https://github.com/axodotdev/cargo-dist) jobs.
+
+When making a releasable CLI change, add a changeset from the `./cli` directory:
+
+```bash
+sampo add --package cargo/posthog-cli --bump patch --message "Describe the CLI change"
+```
+
+Use `minor` or `major` instead of `patch` when appropriate. Commit the generated file under
+`cli/.sampo/changesets/` with your pull request.
+
+After the pull request merges to `master`, the `Release CLI` workflow:
+
+1. Checks for pending CLI changesets
+2. Waits for approval in the GitHub `Release SDK` environment
+3. Runs `sampo release` from `./cli`
+4. Updates `cli/Cargo.toml`, `cli/Cargo.lock`, and `cli/CHANGELOG.md`
+5. Commits the release bump to `master`
+6. Runs cargo-dist against the release bump commit
+7. Creates the `posthog-cli/vX.Y.Z` GitHub release, refreshes `posthog-cli-latest` for stable releases, and publishes the npm package
+
+Do not run `sampo publish`; cargo-dist owns publishing for `posthog-cli`.
+
+If you need to cut a release by hand, merge a CLI changeset to `master` and let `Release CLI` run from there.
+Do not push `posthog-cli/vX.Y.Z` tags manually; cargo-dist tag-push releases are disabled.
+If cargo-dist fails after `Release CLI` commits the release bump, rerun the failed jobs from the same workflow run.
+
+The release workflow also builds `services/mcp` into `cli/lib/posthog-api-cli.mjs` before cargo-dist packages artifacts.
+This keeps `posthog-cli api` aligned with the generated MCP tool catalog at release time.
+To reproduce that release bundle locally, run:
+
+```bash
+pnpm --dir services/mcp run build:cli:release
+```
+
+To smoke-test the packaged CLI before cutting a release, build the same cargo-dist archive and installer locally,
+then run both the unpacked archive and the generated shell installer from a temporary home directory:
+
+```bash
+flox activate -- bash -c 'cargo install cargo-dist --version 0.32.0 --locked'
+DIST_BIN="$HOME/.cargo/bin/dist" flox activate -- bash -c './cli/scripts/smoke-release-artifact.sh'
+```
+
+If you are testing uncommitted local changes, set `CLI_RELEASE_SMOKE_ALLOW_DIRTY=1` for the second command.
+The smoke test verifies that the archive includes `lib/posthog-api-cli.mjs`, that `posthog-cli api --agent-help` works from the unpacked artifact, and that the generated shell installer produces a working `posthog-cli api` install without relying on a PostHog repo checkout.
+It serves `target/distrib` on `127.0.0.1:8765` while testing the installer; set `CLI_RELEASE_SMOKE_PORT` if that port is already in use.
+It does not replace any `posthog-cli` already on your `PATH`; to manually test the built artifact, run `target/distrib/posthog-cli-$(rustc -vV | sed -n 's/^host: //p')/posthog-cli api --agent-help`.
+
+We release semi-regularly, as new features are added. If a release breaks your CI or workflow, please open an issue on GitHub, and tag one or all of the crate authors
diff --git a/cli/src/dsym/upload.rs b/cli/src/dsym/upload.rs
index 9bd3c3000183..6a8e3fac1a94 100644
--- a/cli/src/dsym/upload.rs
+++ b/cli/src/dsym/upload.rs
@@ -32,7 +32,7 @@ pub struct Args {
/// Include source code files in the dSYM upload.
/// When enabled, source files referenced by DWARF debug info are bundled into the upload,
/// allowing PostHog to display source code context around crash locations.
- /// Implies --force unless --skip-on-conflict is set.
+ /// Implies --force unless --skip-on-conflict is set. [default: false]
#[arg(long, default_value_t = false)]
pub include_source: bool,
}
diff --git a/cli/src/sourcemaps/args.rs b/cli/src/sourcemaps/args.rs
index 903c214cd692..bd0f67202bd0 100644
--- a/cli/src/sourcemaps/args.rs
+++ b/cli/src/sourcemaps/args.rs
@@ -14,7 +14,7 @@ pub struct FileSelectionArgs {
#[arg(short, long, alias = "file")]
pub directory: Vec<PathBuf>,
- /// Read additional file/directory paths from stdin (one per line)
+ /// Read additional file/directory paths from stdin (one per line) [default: false]
#[arg(long, default_value = "false")]
pub stdin: bool,
@@ -98,19 +98,19 @@ pub struct ReleaseArgs {
pub build: Option<String>,
/// If the server returns a release_id_mismatch error (symbol set already exists with a different release),
- /// retry the upload without associating a release instead of failing.
+ /// retry the upload without associating a release instead of failing. [default: true]
#[arg(long, default_value = "true")]
pub skip_release_on_fail: bool,
}
#[derive(clap::Args, Clone, Default)]
pub struct UploadConflictArgs {
- /// Allow overwriting an existing symbol set whose content has changed.
+ /// Allow overwriting an existing symbol set whose content has changed. [default: false]
#[arg(long, default_value_t = false, conflicts_with = "skip_on_conflict")]
pub force: bool,
/// Skip symbol sets that already exist with different content instead of failing.
- /// Existing symbol sets are left unchanged.
+ /// Existing symbol sets are left unchanged. [default: false]
#[arg(long, default_value_t = false, conflicts_with = "force")]
pub skip_on_conflict: bool,
}
diff --git a/cli/src/sourcemaps/plain/mod.rs b/cli/src/sourcemaps/plain/mod.rs
index cb318e83f33a..3ed01d50479c 100644
--- a/cli/src/sourcemaps/plain/mod.rs
+++ b/cli/src/sourcemaps/plain/mod.rs
@@ -33,7 +33,7 @@ pub struct ProcessArgs {
#[clap(flatten)]
pub release: ReleaseArgs,
- /// Whether to delete the source map files after uploading them
+ /// Whether to delete the source map files after uploading them [default: false]
#[arg(long, default_value = "false")]
pub delete_after: bool,
diff --git a/cli/src/sourcemaps/plain/upload.rs b/cli/src/sourcemaps/plain/upload.rs
index 11cf24c133e8..e1f9de1693fc 100644
--- a/cli/src/sourcemaps/plain/upload.rs
+++ b/cli/src/sourcemaps/plain/upload.rs
@@ -37,7 +37,7 @@ pub struct Args {
#[arg(short, long)]
pub public_path_prefix: Option<String>,
- /// Whether to delete the source map files after uploading them
+ /// Whether to delete the source map files after uploading them [default: false]
#[arg(long, default_value = "false")]
pub delete_after: bool,
@@ -51,8 +51,8 @@ pub struct Args {
#[clap(flatten)]
pub conflict: UploadConflictArgs,
- /// DEPRECATED - use top-level `--skip-ssl-verification` instead
- #[arg(long, default_value = "false")]
+ /// DEPRECATED - this flag is a no-op. Use top-level `--skip-ssl-verification` instead.
+ #[arg(long)]
pub skip_ssl_verification: bool,
}