@offstage/cli
v0.0.1
Published
Command-line interface for Offstage analytics
Readme
@offstage/cli
The command-line interface for Offstage analytics. Sign in, manage sites and API keys, and query events from your terminal.
Install
npm install -g @offstage/cliOr run it without installing:
npx @offstage/cli loginSign in
offstage loginOpens your browser, signs you in via a magic link, and stores the bearer token in your OS keychain (via keytar). If the keychain is unavailable, the token falls back to ~/.offstage/credentials (mode 0600).
offstage whoami # who am I signed in as
offstage logout # remove stored credentials
offstage token # print the bearer token (useful for scripting)Commands
offstage login
offstage logout
offstage whoami
offstage token
offstage sites <subcommand> # list, create, delete sites
offstage api-keys <subcommand> # list, create, revoke API keys
offstage query <subcommand> # ad-hoc analytics queries
offstage events recent
offstage visits recent
offstage identities list
offstage identities get <id>
offstage identities events <id>Run offstage <command> --help for subcommand details and flags.
Self-hosted deployments
Point the CLI at your own Offstage instance with the OFFSTAGE_API_URL environment variable:
export OFFSTAGE_API_URL=https://offstage.your-domain.com
offstage loginSet it in your shell profile so every invocation hits the right host.
