@revos/cli
v0.2.0
Published
RevOS CLI for managing RevOS platform resources
Readme
RevOS CLI
Command-line interface for managing RevOS resources.
Installation
pnpm add @revos/cliUsage
revos [command] [options]Global Options
-o, --org <id> Override organization ID for this command
--json Format output as JSONCommands
Project Initialization
revos init [destination] [--yes] [--dry-run]Scaffolds a new RevOS data engineering project. If destination is omitted, initializes in the current directory.
Arguments:
destination Path or project name (default: current directory)
Examples:
my-project → creates ./my-project/
./my-project → same as above
../my-project → one level up
/home/user/my-project → absolute pathFlags:
-y, --yes Skip confirmation prompts, use defaults
--dry-run Show what would be created without creating files or GCP resourcesNon-empty directory behavior:
If the destination already exists and is not empty, you will be prompted to confirm before proceeding. Use --yes to skip this prompt.
What it does:
- Fetches your organizations and prompts you to select one (auto-selects if only one).
- Provisions a GCP service account for your org (idempotent) and writes the key to
~/.revos/{project-name}-gsa-creds.json. - Creates the project directory structure (medallion layout: bronze/silver/gold).
- Generates
.devcontainer/devcontainer.jsonwith Python 3.11, Node.js, Google Cloud SDK (bq), and dbt pre-installed. The Dev Container mounts~/.revos/{project-name}-gsa-creds.jsonautomatically. - Generates
dbt/profiles.ymlpre-configured for BigQuery. - Generates
.gitignoreandREADME.md. - Scaffolds AI companion files:
CLAUDE.md,AGENTS.md, and.claude/skills/with three pre-installed skills:explore-lakehouse,create-semantic-model, andcreate-dbt-transformations.
Requires: revos auth login first.
Authentication
Login
revos auth loginLogout
revos auth logoutShow auth status
revos auth status [--json]Organization Management
List organizations
revos org list [--columns name,id] [--json]Show current organization
revos org current [--json]Switch organization
# Interactive mode
revos org switch
# Direct by ID
revos org switch <org-id>Overlays Management
Overlay files are Cube.dev semantic model definitions stored as YAML in semantic/. The overlay name is taken from the name field inside the file (or derived from the filename as a fallback). A description field is synced with the overlay's description on push.
Example semantic/my_table.yml:
name: my_table
description: My custom overlay
sql_table: my_table
dimensions:
id:
sql: "${CUBE}.id"
type: number
primary_key: true
measures:
count:
type: countPush overlays to API
revos overlays push [files...] [-d <dir>] [-f] [--json]
Options:
-d, --dir <path> Directory containing overlay files (default: "./semantic")
-f, --force Force push even if remote is newerPull overlays from API
revos overlays pull [-d <dir>] [-n <name>...] [--json]
Options:
-d, --dir <path> Directory to save overlay files (default: "./semantic")
-n, --name <name> Specific overlay names to pull (repeatable)Show diff between local and remote
revos overlays diff [files...] [-d <dir>] [--json]Check overlay status
revos overlays status [files...] [-d <dir>] [--columns name,status] [--json]Resource commands
The CLI exposes every method of @revos/api-client as a topic-prefixed command. Each topic mirrors a resource on the SDK and supports the standard CRUD verbs (list, get, create, update, delete) plus any resource-specific extras.
Topics
| Topic | Verbs |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| tables | list, get, create, update, delete |
| table-views | list, create, update, delete |
| scores | list, create, update, delete |
| score-groups | list, get, create, update, delete |
| gservice-accounts | list, get, create, delete |
| gservice-account-keys | get, reveal |
| actions | list, get, get-params-schema, get-input-schema |
| action-runs | list, get |
| ai-instructions | list, get, create, update, delete |
| org | list, current, switch, get, create |
| segments | list, get, create, update, delete, list-versions, get-version, restore-version, get-evaluation-history, evaluate |
List flags
list commands accept --page-size, --page-token, --order-by, --filter, and --fields. actions list adds --only-used.
revos tables list --page-size 50 --order-by 'createdAt desc'Request bodies (--body)
create and update take a single --body flag. Three forms:
# Inline JSON literal
revos tables create --body '{"name":"customers","sql_table":"customers"}'
# Read from file
revos tables create --body @./table.json
# Read from stdin
cat table.json | revos tables create --body -Bad JSON is rejected before any HTTP call.
Examples
revos tables list --json
revos tables get tbl_123
revos segments evaluate seg_456
revos segments list-versions seg_456
revos segments get-version seg_456 3
revos actions get-params-schema act_789
revos gservice-account-keys reveal key_abcOutput Formats
Every command supports --json for machine-readable output:
revos org list --json
revos auth status --json
revos overlays status --jsonList commands support --columns to limit displayed columns:
revos org list --columns name
revos overlays status --columns name,statusConfiguration
| Variable | Description |
| --------------- | -------------------------------------------------------- |
| REVOS_TOKEN | Authentication token (alternative to revos auth login) |
| REVOS_API_URL | API endpoint (default: https://api.revos.ai) |
| REVOS_ORG_ID | Organization ID override |
