Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Amplitude Ampli CLI

$ ampli Official Med Risk
Amplitude · Workspace & SaaS · MIT · macos / linux / windows

Amplitude 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.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install amplitude/ampli/ampli
CLI vs MCP Decision CLI Preferred vs MCP

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

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

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 status verification and -t token flag
  • No structured --json output flag
Trust & Safety 20 / 25

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-branch guard for ampli status
  • Modifies local ampli.json and generated SDK files on pull
Setup & Portability 13 / 15

Available via @amplitude/ampli on npm, Homebrew tap, and official Docker image (amplitudeinc/ampli).

  • Cross-platform npm package plus Homebrew tap
Utility & Efficiency 12 / 15

Bridges product analytics schemas and typed client codegen with automated CI tracking-plan enforcement.

  • Combines schema sync (pull/push), typed SDK generation, and status linting
Maintenance & Lineage 9 / 10

Official Amplitude CLI (amplitude/ampli) under MIT license.

  • First-party Amplitude repository
Docs & Verifiability 8 / 10

Well-documented CI recipes and clear subcommand --help pages.

  • Official docs at amplitude.com/docs/data/ampli/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

Persists interactive OAuth credentials locally or accepts AMPLI_TOKEN / -t <token> alongside ampli.json workspace/source config.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source CLI; requires an Amplitude Data workspace (free Starter plan available).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Verify analytics instrumentation in CI
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.

Check if a Data branch is merged
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

Pull tracking plan and regenerate typed SDK
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 status and --is-merged.
  • + Generates strongly-typed tracking wrappers directly from Amplitude Data schemas.

Caveats & Pitfalls

  • ! Human-formatted stdout with no --json flag for machine parsing.
  • ! Requires ampli.json project initialization before most subcommands can run.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI