Amplitude Ampli CLI
$ ampli Official Med RiskAmplitude Ampli CLI (ampli) syncs Amplitude Data tracking plans into repositories, generates type-safe analytics wrappers across languages, and checks codebase instrumentation via ampli status. Supports CI token auth (-t / AMPLI_TOKEN) and branch-aware schema workflows.
brew install amplitude/ampli/ampli ampli statically scans local source files for tracked events and generates language-specific typed SDK wrappers inside the repo, which an MCP server cannot run.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports headless CI flags (-t, -b, --skip-update-on-default-branch, --is-merged) and clean exit codes, though it outputs human text rather than --json.
- CI-ready
ampli statusverification and-ttoken flag - No structured
--jsonoutput flag
Token auth avoids browser login in CI and --skip-update-on-default-branch prevents unintended remote state updates, though ampli push lacks --dry-run.
- Supports
--skip-update-on-default-branchguard forampli status - Modifies local
ampli.jsonand generated SDK files onpull
Available via @amplitude/ampli on npm, Homebrew tap, and official Docker image (amplitudeinc/ampli).
- Cross-platform npm package plus Homebrew tap
Bridges product analytics schemas and typed client codegen with automated CI tracking-plan enforcement.
- Combines schema sync (
pull/push), typed SDK generation, andstatuslinting
Official Amplitude CLI (amplitude/ampli) under MIT license.
- First-party Amplitude repository
Well-documented CI recipes and clear subcommand --help pages.
- Official docs at amplitude.com/docs/data/ampli/cli
Security, Auth & Guardrails
Persists interactive OAuth credentials locally or accepts AMPLI_TOKEN / -t <token> alongside ampli.json workspace/source config.
MIT open-source CLI; requires an Amplitude Data workspace (free Starter plan available).
# Amplitude Ampli CLI (ampli) Agent Rules - Use `-t "$AMPLI_TOKEN"` (or `AMPLI_TOKEN` env var) in headless runs to avoid OAuth browser prompts. - Pass `--skip-update-on-default-branch` with `ampli status` and confirm before running `ampli push`.
Agent-Ready Command Recipes
Safe Read-Only Queries
ampli status -t "$AMPLI_TOKEN" --skip-update-on-default-branch
Audits local source files against the Amplitude Data tracking plan without mutating remote status on default branches.
ampli status --is-merged -b feat/checkout -t "$AMPLI_TOKEN"
Tests whether tracking-plan branch feat/checkout has been merged before shipping code.
Controlled Writes & Previews
ampli pull web -b main -t "$AMPLI_TOKEN"
Downloads the main branch schema for source web and regenerates the typed Ampli wrapper locally.
Strengths for Agents
- + Catches missing or drifted analytics events in CI via
ampli statusand--is-merged. - + Generates strongly-typed tracking wrappers directly from Amplitude Data schemas.
Caveats & Pitfalls
- ! Human-formatted stdout with no
--jsonflag for machine parsing. - ! Requires
ampli.jsonproject initialization before most subcommands can run.