revos init
Scaffold a new RevOS data engineering project.
Usage
revos init [destination]
The destination can be a project name, relative path, or absolute path. If omitted, the current directory name is used as the project name.
Requires: revos auth login first for greenfield runs. In-project runs (when revos.yaml already exists) sign you in automatically if needed.
Flags
| Flag | Description |
|---|---|
-y, --yes | Non-interactive mode — skip confirmation prompts |
--dry-run | Preview what would be created without making changes |
Two Modes
revos init behaves differently depending on whether you run it inside an existing project (i.e. a tree containing revos.yaml):
- Greenfield — no
revos.yamlfound walking up from the destination → full scaffold + service account provisioning + IaC discovery. - In-project —
revos.yamldiscovered → idempotent. The org prompt is skipped (org is read fromrevos.yaml), scaffolding is skipped (existing files are never overwritten), IaC discovery is skipped, and the GCP service account key is only provisioned if~/.revos/{project}-gsa-creds.jsonis missing. If you aren't authenticated yet, the browser opens for sign-in first — no org picker is shown because the org is already pinned inrevos.yaml. Re-running with everything in place is a clean no-op.
The in-project mode is what powers the Dev Container onboarding flow: open the container with no host credentials shared in and run a single revos init — it signs you in via the browser and materializes the GCP service account key into the container's ~/.revos/.
What It Does (Greenfield)
- Organization selection — Fetches your organizations and prompts you to select one (auto-selects if only one). The selected org must have a BigQuery dataset configured.
- Service account provisioning — Creates a GCP service account for your org (idempotent) and writes the key to
~/.revos/{project}-gsa-creds.json(or%USERPROFILE%\.revos\{project}-gsa-creds.jsonon Windows). - Directory structure — Creates a medallion-architecture dbt project:
project/├── .devcontainer/├── .claude/│ ├── settings.json # security rules│ └── skills/ # RevOS AI skills (installed from revosai/skills)├── dbt/models/│ ├── bronze/│ ├── silver/│ └── gold/├── cubes/├── connectors/ # custom low-code connectors (see Connectors)└── connections/
- Dev Container — Generates
.devcontainer/devcontainer.json,Dockerfile,post-create.sh,post-start.sh, andwelcome.shwith Python 3.13, Node.js, Google Cloud CLI, dbt-bigquery, the connector test runtime (sorevos connectors check/discover/readwork out of the box), andjqpre-installed. The container has no host bind mounts; instead it persists three per-project named Docker volumes —revos-{slug}-credentials(~/.revos),revos-{slug}-gcloud(~/.config/gcloud), andrevos-{slug}-claude(~/.claude) — so CLI login, GSA key, gcloud auth state, and Claude Code state all surviveRebuild Container. - dbt configuration — Generates
dbt/profiles.ymlanddbt/dbt_project.ymlpre-configured for BigQuery with medallion materialization settings. - Standard files —
.gitignoreandREADME.md. - AI companion files —
CLAUDE.md,AGENTS.md, and.claude/settings.jsonwith deny rules that block AI assistants from reading~/.revos/(CLI credentials and service account keys),~/.config/gcloud/(Google Cloud Application Default Credentials), from runninggcloud auth print-*-tokencommands, and from editing the settings file itself (so the AI can't lift its own restrictions). - AI skills — Installs the RevOS skills into
.claude/skills/(exploring your data lakehouse, authoring Connection configs from Source streams, creating Cube.dev semantic models, building dbt transformations, loading sample data, querying and visualizing the semantic model) by runningnpx skills add revosai/skills/data-engineering --copy. The skills come from the publicrevosai/skillsrepository (grouped into bundles —data-engineeringis the one for this project type), so you can refresh them in an existing project withnpx skills update— noinitre-run or CLI upgrade. The Dev Container also re-installs/refreshes them on every start (self-healing if a prior install failed), keeping them current automatically. See AI Skills. Needs network access; if it fails,initstill completes and prints the command to install them later. - IaC discovery — Pulls existing Connections and Cubes from the API into
connections/andcubes/, so the project starts from the live state. Pass--no-pullto skip. Sources are managed only throughrevos sourcescommands and referenced from Connection YAML by their server id. - Project marker — Writes
revos.yamlat the root, pinning the directory to your organization. The CLI walks up from the current directory to find this file when you run commands likerevos status,revos apply,revos diff, andrevos pull. Runrevos statusto list local resources,revos diffto preview drift,revos applyto push local changes to the API, orrevos pullto import remote state into your YAML.
Example
# Scaffold into a new directory
revos init my-data-project
cd my-data-project
# Preview without creating anything
revos init my-data-project --dry-run
# Non-interactive mode
revos init my-data-project --yes
After scaffolding, open the project in VS Code and click Reopen in Container. Inside the container, finish setup with:
revos init # signs you in via browser (if needed) and provisions the GCP service account key into ~/.revos
Subsequent container starts auto-activate the service account via postStartCommand, so bq, dbt, and gcloud work without manual steps.
Organization Binding
During revos init, you select an organization. That choice is baked into the scaffolded project — every generated file is configured for that specific org. There is no post-init way to rebind the project to a different organization.
Where the Org Is Stored
| File | Setting | Purpose |
|---|---|---|
revos.yaml | metadata.orgId | Authoritative org for all CLI commands run inside this project tree |
.devcontainer/devcontainer.json | containerEnv.REVOS_ORG_ID | Convenience for non-CLI tools inside the container (validated against revos.yaml) |
.devcontainer/devcontainer.json | containerEnv.REVOS_BQ_DATASET | BigQuery dataset belonging to the org |
.devcontainer/devcontainer.json | containerEnv.GOOGLE_CLOUD_PROJECT | GCP project associated with the org |
~/.revos/<project>-gsa-creds.json | Service-account key (host & container, both written by revos init) | GCP credentials scoped to the org's resources |
dbt/profiles.yml | project and dataset | BigQuery target generated from the org's configuration |
Implications
revos apply / pull / diffalways target the org inrevos.yaml. If the container'sREVOS_ORG_IDenv var disagrees (e.g. you opened a different project's container), the CLI hard-fails rather than silently writing to the wrong org.--orgis rejected inside a project. The destination isrevos.yaml'smetadata.orgId;--orgonly works outside a project tree.- Different org = separate project. If you need to work with another organization, scaffold a new project with
revos init. - Sharing a project folder across orgs won't work without re-scaffolding, because the service-account key, dbt profile, and container environment all reference the original org.
To see which org you are currently targeting, run revos org current inside the Dev Container.
Next Steps
- Dev Container — why we recommend developing inside it
- Resource types — what you build in a project, with a link to each resource's reference
- Concepts — understand how Projects and Organizations relate
- From Zero to Semantic Model — see scaffolding in the context of a full workflow