@gurulu/cli
v0.4.7
Published
Gurulu.io CLI — setup analytics in seconds
Readme
@gurulu/cli
CLI for Gurulu.io — setup, diagnostics, data exploration, and AI-powered analytics from your terminal.
Quick Start
npx @gurulu/cli initCommands
Authentication
| Command | Description |
|---------|-------------|
| gurulu auth | Authenticate via device-link flow (or --key for manual) |
| gurulu login | Authenticate with API key |
| gurulu logout | Remove a stored profile |
| gurulu whoami | Show current authentication state |
Setup & Diagnostics
| Command | Description |
|---------|-------------|
| gurulu init | Set up Gurulu analytics (auto-detects framework) |
| gurulu install [path] | Install Gurulu tracker in a repository |
| gurulu add-server | Add server-side SDK (@gurulu/node) |
| gurulu status | Check SDK health and connection |
| gurulu doctor | Diagnose setup issues |
| gurulu config <action> | Manage CLI profiles (list, use, show, delete) |
Sites & Keys
| Command | Description |
|---------|-------------|
| gurulu sites <action> | Manage sites (list, create, show, delete, rotate-token) |
| gurulu api-keys <action> | Manage API keys (list, create, revoke, rotate) |
Data & Events
| Command | Description |
|---------|-------------|
| gurulu events <action> | View ingested events (list, tail) |
| gurulu insights <action> | View daily insights (today, history, weekly) |
| gurulu chat [question] | Ask analytics questions in natural language (NL -> SQL) |
Identity & Audiences
| Command | Description |
|---------|-------------|
| gurulu identity <action> | View identity state (decay, transfers, cdc-sources) |
| gurulu audiences <action> | View audiences (list, show) |
| gurulu experiments <action> | View experiments (list, show, results) |
Integrations & Export
| Command | Description |
|---------|-------------|
| gurulu warehouse <action> | Warehouse exports (BigQuery) |
| gurulu warehouses <action> | View warehouse exports (list, runs) |
| gurulu destinations <action> | View activation destinations (list, show) |
| gurulu db <action> | Connect, list, sync, or remove database sources |
Monitoring & Debugging
| Command | Description |
|---------|-------------|
| gurulu alerts <action> | View anomaly alerts (list, show, channels) |
| gurulu sourcemap <action> | Upload source maps for error deobfuscation |
| gurulu audit <action> | Stream or export the CLI audit log (tail, export) |
| gurulu playground <action> | View playground sessions (list) |
Supported Frameworks
Next.js (App & Pages Router), React (Vite & CRA), Vue 3, Nuxt 3, Svelte & SvelteKit, Astro, Express, NestJS, Plain HTML.
Authentication
gurulu auth # Device-link flow (recommended)
gurulu login --api-key pak_live_x # Manual API keyOr set the GURULU_API_KEY environment variable.
Non-Interactive Mode
All commands support --no-interactive for CI/CD:
gurulu init --site-id abc123 --token tok_xxx --no-interactiveJSON Output
Use --json flag for machine-readable output:
gurulu events list --json
gurulu status --json
gurulu doctor --jsonTelemetry
gurulu install records anonymous install telemetry — framework, CLI version,
install status, and a SHA-256 hash of the absolute repo path — to help us
improve framework detection and patch reliability. No source code, file
contents, or environment variables are ever sent.
On the first interactive install you'll be asked to opt in. Your choice is
persisted to ~/.gurulu/config.json (telemetry: true|false) and never
re-asked.
To opt out:
gurulu install --no-telemetry # one-off
export GURULU_TELEMETRY=off # session / shell
export DO_NOT_TRACK=1 # honored across most CLI tools
echo '{"telemetry": false}' > ~/.gurulu/config.json # permanentAny of GURULU_TELEMETRY=off|0|false|no, DO_NOT_TRACK=1, --no-telemetry,
or telemetry: false in ~/.gurulu/config.json disables telemetry — the repo
hash is never computed and no network request is made.
