# Aurabase CLI Reference (aura) > NPM Distribution: `npm install -g @aurabase/cli` (exposes `aura` and `aurabase` binaries) > Local Rust Build: `cargo install --path aura-cli` > Documentation: https://aurabase.dev/en/docs/cli ## 1. Setup & Account Management - `aura init`: Initialize `aurabase.toml` in the current directory. - `aura login [--email --password | --token ]`: Authenticate to the console platform. - `aura register [--email --password]`: Create a new platform console account. - `aura logout`: Clear local authentication session. - `aura whoami`: Show active logged-in user and linked project. - `aura link [--project-id ]`: Link working directory to a cloud project. - `aura status`: Check project status and service health. - `aura doctor`: Complete system and environment diagnostics. ## 2. Local Stack & Development - `aura start`: Start local container stack (PostgreSQL 18, SeaweedFS S3, Gateway, Auth). - `aura stop` / `aura restart`: Stop or restart the local services. - `aura dev`: Continuous development mode (watch migrations & auto-generate types). - `aura studio`: Open local Studio web interface at `http://localhost:3000`. - `aura logs [--service ] [--since ] [--tail ]`: Stream service logs. ## 3. Database & Migrations (`aura db`) - `aura db migration new `: Scaffold a timestamped SQL migration in `aurabase/migrations/`. - `aura db push`: Apply local migrations to the remote database. - `aura db pull`: Extract remote database schema into local migration files. - `aura db diff [--name ]`: Calculate schema differences between local and remote. - `aura db generate`: Generate TypeScript definitions (`aurabase.types.ts`). - `aura db seed`: Run seed data script `aurabase/seed.sql`. - `aura db reset`: Full teardown and re-creation of local database. - `aura db raw ""`: Execute arbitrary raw SQL with parameters. - `aura db table [list|create|drop|rls]`: Declarative table schema and RLS management. - `aura db policy [list|create|drop]`: Manage Row-Level Security policies. - `aura db function [list|create|drop]`: Manage stored PL/pgSQL functions. - `aura db trigger [list|create|drop]`: Manage PostgreSQL table triggers. - `aura db slow-queries`: Display top slowest SQL queries via `pg_stat_statements`. - `aura db stats`: Show active connections and database disk usage. - `aura db backup [list|create|restore]`: Manage logical backups and point-in-time recovery. ## 4. Edge Functions (`aura functions`) - `aura functions new [--runtime deno|wasm]`: Scaffold a new function. - `aura functions serve `: Run and test function locally. - `aura functions deploy `: Deploy function to the Data Plane. - `aura functions list`: List all deployed Edge Functions. - `aura functions logs `: View runtime execution logs. - `aura functions invoke [--data '']`: Invoke a deployed function. - `aura functions delete `: Delete a deployed function. ## 5. Secrets Management (`aura secrets`) - `aura secrets list --function `: List environment variables for a function. - `aura secrets set --function KEY=VALUE`: Set secret for a function. - `aura secrets unset --function KEY`: Remove a secret. ## 6. S3 Storage (`aura storage`) - `aura storage ls [bucket]`: List buckets or objects in a bucket. - `aura storage cp `: Transfer files (local <-> S3). - `aura storage rm /`: Delete an object. - `aura storage mb `: Create a new storage bucket. - `aura storage trash [list|restore]`: Manage object soft-delete trash bin. ## 7. Migration & Utilities - `aura migrate export-supabase`: Export schema, data, and users from an existing Supabase project. - `aura connect`: Open an interactive `psql` console to the remote database. - `aura ui`: Launch interactive Terminal User Interface (TUI). - `aura update`: Update CLI binary to the latest release.