The CLI
getopen on npm: install the tracker with oa init, sign in with oa login, read stats from the terminal.
Install
The package is getopen on npm and gives you the oa command. Install it globally, or run any command one-off with npx and nothing to install.
npm i -g getopenoa init: install the tracker
Run it in your project folder. It detects the framework, asks for your tracking key, writes the snippet into the right file, prints which file it changed, and tells you what to do next. It is idempotent, so a project that already carries the snippet is left alone.
npx getopen initDetected frameworks: Next.js (App and Pages Router), TanStack Start, React, Vue, Nuxt, SvelteKit, Remix, Astro, Gatsby, WordPress and plain HTML. The installation guides show what it writes, per framework.
Sign in and read stats
Sign in with the device flow
oa login prints a code and opens a browser approval. The CLI never sees your password, and the grant is revocable any time from Account → Connected apps.
oa loginList sites and read totals
oa sites # sites your account can readoa stats --site my-site # totals; add --from / --to as ISO instantsoa logout- Credentials live in
~/.config/oa/credentials.json, restricted to your user (0600), and the CLI says out loud if the filesystem refused the restriction. - The CLI is read-only by design: its scopes are
site:read analytics:read realtime:read revenue:read, and nothing it can do mutates a site.
Point it elsewhere, or script it
Self-hosted, staging and JSON output
OA_API_URL overrides the API base for self-hosted or staging deployments, and --api does the same per invocation. Every read command takes --json for scripting.