AppBrain CLI
A single-binary command-line client for AppBrain’s Keyword API. Sign in once, then track Google Play keyword rankings, analyze competitors, and generate keyword reports — from your terminal, your scripts, or an AI agent.
On a terminal you get colored tables, rank sparklines, and clickable app names. With --json you
get clean, machine-readable output for scripts, jq, CI, and agents.
The AppBrain CLI is currently in beta. If you hit a rough edge, email contact@appbrain.com.
Install
macOS and Linux:
curl -fsSL https://www.appbrain.com/cli/install | sh
Windows (PowerShell):
iwr https://www.appbrain.com/cli/install.ps1 -UseB | iex
The installer picks the right binary for your OS and architecture, verifies its SHA-256 against a
checksum published next to it, and drops a single self-contained executable in ~/.local/bin (no
sudo required, no runtime to install). Supported targets: macOS (Intel + Apple Silicon), Linux
(x64 + arm64), and Windows (x64).
Pinning a version
curl -fsSL https://www.appbrain.com/cli/install | APPBRAIN_CLI_VERSION=0.9.0 sh
Published versions are immutable, so a pinned install always fetches the exact same binary. Without a pin, the installer fetches the current latest release.
First steps
appbrain login # browser-based sign-in (use --device on a headless/SSH box)
appbrain whoami # confirm your account and per-service entitlements
appbrain doctor # pass/fail health check: config, token, server, entitlements
appbrain keyword overview # your apps and their tracked keywords
Run appbrain --help (or appbrain keyword --help) for the full command surface.
Commands
Cross-cutting commands live at the top level; Keyword API commands are grouped under
appbrain keyword.
| Command | What it does |
|---|---|
login [--device] | Sign in (browser loopback, or device code for headless boxes) |
whoami | Show your account and per-service entitlements |
doctor | Health check; exits non-zero on any failure |
config show / path | Inspect the resolved settings (the token is masked) |
logout | Remove the local config file |
keyword rankings <query> | Live Google Play ranking for a keyword |
keyword overview | Your apps and their tracked keywords |
keyword history keyword <query> | Rank history for a keyword |
keyword history app <package> | Rank history for one of your apps |
keyword competitors list / discover <package> | Auto-discovered competitors |
keyword competitors keywords <package> <competitor> | Competitor keyword gap analysis |
keyword tracked list / add / remove | Manage tracked keywords |
keyword report generate / get / list | AI-assisted keyword reports |
keyword scrape <keyword...> | Scrape live Google Play results |
Global flags work on any command and may be placed before or after the subcommand: --country
(comma-separated where multiple countries are allowed), --partner, --base-url, and --json.
Output formats
On a terminal, the default pretty format renders colored tables sized to your window, with rank
sparklines and clickable app links; keyword history --chart adds a rank-over-time line chart. For
scripts and automation:
--format | Use |
|---|---|
pretty (default) | Colored tables, sparklines, charts, clickable links |
json (--json) | Canonical proto-JSON — the high-fidelity path for agents |
ndjson | The response’s primary list, one JSON object per line (great for jq) |
appbrain --json keyword overview | jq '.apps[].appInfo.packageName'
appbrain --format ndjson keyword rankings "photo editor" --country de | jq -r .packageName
Errors print structured JSON ({"error":{"code","message"}}) in machine formats, or a red message
in pretty, and always exit non-zero.
Authentication for scripts and CI
For non-interactive use, provide your token via the APPBRAIN_API_TOKEN environment variable:
export APPBRAIN_API_TOKEN=… # from a secrets manager, ideally
appbrain keyword overview --json
There is intentionally no token flag — command-line arguments are visible to other users via
ps and land in shell history. When you sign in interactively with appbrain login, the token is
stored in ~/.config/appbrain/config.json, written 0600 in a 0700 directory.
Requirements
An AppBrain account. The keyword commands are free for any developer account — sign in with
appbrain login, then track up to 20 keywords on the free tier. An
AppBrain Intelligence subscription lifts that cap to unlimited
tracking. The CLI is a companion to the web
Keyword Tracker & Optimizer — same API, same data.
See also the AppBrain API overview and the API specification.