@revos/cli 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/dist/adapters/oclif/commands/action-runs/get.mjs +1 -1
- package/dist/adapters/oclif/commands/action-runs/list.mjs +1 -1
- package/dist/adapters/oclif/commands/actions/get-input-schema.mjs +2 -2
- package/dist/adapters/oclif/commands/actions/get-params-schema.mjs +2 -2
- package/dist/adapters/oclif/commands/actions/get.mjs +1 -1
- package/dist/adapters/oclif/commands/actions/list.mjs +2 -2
- package/dist/adapters/oclif/commands/ai-instructions/create.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/get.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/list.mjs +1 -1
- package/dist/adapters/oclif/commands/ai-instructions/update.mjs +1 -1
- package/dist/adapters/oclif/commands/api.mjs +2 -2
- package/dist/adapters/oclif/commands/apply.d.mts +1 -1
- package/dist/adapters/oclif/commands/apply.mjs +2 -2
- package/dist/adapters/oclif/commands/auth/login.mjs +8 -3
- package/dist/adapters/oclif/commands/auth/logout.mjs +2 -2
- package/dist/adapters/oclif/commands/auth/status.mjs +2 -2
- package/dist/adapters/oclif/commands/connections/create.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/get.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/list.mjs +1 -1
- package/dist/adapters/oclif/commands/connections/update.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/create.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/get.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/list.mjs +1 -1
- package/dist/adapters/oclif/commands/cubes/update.mjs +1 -1
- package/dist/adapters/oclif/commands/diff.d.mts +1 -1
- package/dist/adapters/oclif/commands/diff.mjs +2 -2
- package/dist/adapters/oclif/commands/gservice-account-keys/get.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-account-keys/reveal.mjs +2 -2
- package/dist/adapters/oclif/commands/gservice-accounts/create.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/get.mjs +1 -1
- package/dist/adapters/oclif/commands/gservice-accounts/list.mjs +1 -1
- package/dist/adapters/oclif/commands/init.d.mts +2 -0
- package/dist/adapters/oclif/commands/init.mjs +82 -3
- package/dist/adapters/oclif/commands/org/create.mjs +1 -1
- package/dist/adapters/oclif/commands/org/current.mjs +2 -2
- package/dist/adapters/oclif/commands/org/get.mjs +1 -1
- package/dist/adapters/oclif/commands/org/list.mjs +2 -2
- package/dist/adapters/oclif/commands/org/switch.mjs +2 -2
- package/dist/adapters/oclif/commands/pull.d.mts +1 -1
- package/dist/adapters/oclif/commands/pull.mjs +2 -2
- package/dist/adapters/oclif/commands/score-groups/create.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/get.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/list.mjs +1 -1
- package/dist/adapters/oclif/commands/score-groups/update.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/create.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/list.mjs +1 -1
- package/dist/adapters/oclif/commands/scores/update.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/create.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/evaluate.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get-evaluation-history.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get-version.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/get.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/list-versions.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/list.mjs +1 -1
- package/dist/adapters/oclif/commands/segments/restore-version.mjs +2 -2
- package/dist/adapters/oclif/commands/segments/update.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/create.mjs +2 -2
- package/dist/adapters/oclif/commands/sources/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/get.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/list-streams.mjs +2 -2
- package/dist/adapters/oclif/commands/sources/list.mjs +1 -1
- package/dist/adapters/oclif/commands/sources/update.mjs +2 -2
- package/dist/adapters/oclif/commands/status.d.mts +1 -1
- package/dist/adapters/oclif/commands/status.mjs +3 -3
- package/dist/adapters/oclif/commands/table-views/create.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/list.mjs +1 -1
- package/dist/adapters/oclif/commands/table-views/update.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/create.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/delete.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/get.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/list.mjs +1 -1
- package/dist/adapters/oclif/commands/tables/update.mjs +1 -1
- package/dist/{base.command-D8taHOFF.mjs → base.command-BLken6pU.mjs} +1 -1
- package/dist/{core-B-IdeRNl.mjs → core-DsGA_HuL.mjs} +31 -3
- package/dist/{factory-CCcimDhl.mjs → factory-eslVs9tN.mjs} +2 -2
- package/dist/{index-D0ax2I61.d.mts → index-Blr5iiwc.d.mts} +12 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{presets-Bb9gwgeh.mjs → presets-D0AIVsGO.mjs} +2 -2
- package/dist/templates/.devcontainer/Dockerfile +8 -0
- package/dist/templates/.devcontainer/devcontainer.json +10 -9
- package/dist/templates/.devcontainer/post-create.sh +46 -0
- package/dist/templates/.devcontainer/post-start.sh +65 -0
- package/dist/templates/.devcontainer/welcome.sh +27 -0
- package/dist/templates/README.md +81 -12
- package/package.json +1 -1
- package/dist/templates/.devcontainer/setup.sh +0 -35
package/dist/templates/README.md
CHANGED
|
@@ -1,23 +1,92 @@
|
|
|
1
1
|
# <%=projectName%>
|
|
2
2
|
|
|
3
|
-
RevOS data engineering project for **<%=orgName
|
|
3
|
+
RevOS data engineering project for **<%=orgName%>**.
|
|
4
|
+
|
|
5
|
+
This project is designed to be opened in a Dev Container. All tooling — Python, Node, dbt, the Google Cloud CLI, the RevOS CLI, GitHub CLI, and Claude Code — comes pre-installed. The container is the supported development environment; you should rarely need to install anything on your host.
|
|
4
6
|
|
|
5
7
|
## Getting started
|
|
6
8
|
|
|
7
|
-
1. Open
|
|
8
|
-
|
|
9
|
+
1. **Open in VS Code** and click **Reopen in Container** when prompted. First open builds the image (~1–2 min); subsequent opens are instant.
|
|
10
|
+
|
|
11
|
+
2. **One-time setup inside the container.** Open a terminal and run these two commands once:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
revos auth login # OAuth flow — browser opens automatically
|
|
15
|
+
revos init # provisions the BigQuery service account key
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`revos init` detects it's running inside an existing project, skips the org prompt and scaffolding, and just fills in the missing GCP key.
|
|
19
|
+
|
|
20
|
+
**You won't need to repeat this.** Credentials persist in per-project Docker volumes, so every future `Rebuild Container`, restart, or VS Code reopen lands in a fully-authenticated state — the container will print `REVOS DEV CONTAINER — READY` on every start.
|
|
21
|
+
|
|
22
|
+
3. **Verify everything is wired up.** Either look at the banner the container prints on every start (`REVOS DEV CONTAINER — READY` with your auth + GCP details), or run:
|
|
23
|
+
|
|
9
24
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
25
|
+
bq ls $REVOS_BQ_DATASET # list tables in your BigQuery dataset
|
|
26
|
+
dbt debug # confirm dbt connection
|
|
27
|
+
revos status # list local Connections/Cubes vs. the API
|
|
12
28
|
```
|
|
13
29
|
|
|
14
|
-
## Project
|
|
30
|
+
## Project layout
|
|
15
31
|
|
|
16
32
|
```
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
.
|
|
34
|
+
├── revos.yaml # binds this project to your RevOS org (do not edit)
|
|
35
|
+
├── connections/ # sync pipelines (RevOS-managed; one YAML per Connection)
|
|
36
|
+
├── cubes/ # Cube.dev semantic model definitions (one YAML per Cube)
|
|
37
|
+
├── dbt/
|
|
38
|
+
│ ├── dbt_project.yml
|
|
39
|
+
│ ├── profiles.yml # pre-configured for BigQuery via $GOOGLE_APPLICATION_CREDENTIALS
|
|
40
|
+
│ └── models/
|
|
41
|
+
│ ├── bronze/ # raw ingested data — declared as dbt sources in schema.yml
|
|
42
|
+
│ ├── silver/ # cleaned & conformed
|
|
43
|
+
│ └── gold/ # business-ready marts
|
|
44
|
+
├── .claude/ # AI companion config + pre-installed skills
|
|
45
|
+
├── .devcontainer/ # Dev Container definition
|
|
46
|
+
├── AGENTS.md # context for AI coding agents
|
|
47
|
+
└── CLAUDE.md # imports AGENTS.md
|
|
23
48
|
```
|
|
49
|
+
|
|
50
|
+
## Common workflows
|
|
51
|
+
|
|
52
|
+
| Task | Command |
|
|
53
|
+
| --------------------------------------------- | ------------------------------------ |
|
|
54
|
+
| List data sources available on RevOS | `revos sources list` |
|
|
55
|
+
| Add a new data source (opens RevOS UI) | `revos sources create` |
|
|
56
|
+
| Pull current Connections & Cubes from the API | `revos pull` |
|
|
57
|
+
| Push local YAML changes back to the API | `revos apply` |
|
|
58
|
+
| Preview drift before applying | `revos diff` |
|
|
59
|
+
| Run all dbt models | `dbt run` |
|
|
60
|
+
| Run dbt tests | `dbt test` |
|
|
61
|
+
| Inspect a BigQuery table | `bq head -n 5 $REVOS_BQ_DATASET.<t>` |
|
|
62
|
+
| Show all `revos` commands | `revos --help` |
|
|
63
|
+
|
|
64
|
+
## Working with Claude Code
|
|
65
|
+
|
|
66
|
+
This project ships pre-installed Claude skills under `.claude/skills/` for the common tasks:
|
|
67
|
+
|
|
68
|
+
- **`explore-lakehouse`** — survey your BigQuery datasets and tables.
|
|
69
|
+
- **`create-connections`** — author a Connection YAML from a Source's available streams.
|
|
70
|
+
- **`create-cubes`** — build Cube.dev semantic models from gold-layer tables.
|
|
71
|
+
- **`create-dbt-transformations`** — write bronze→silver→gold dbt models.
|
|
72
|
+
- **`load-sample-data`** — seed BigQuery with example data when the warehouse is empty.
|
|
73
|
+
- **`visualize-semantic-model`** — render the cube graph as an image.
|
|
74
|
+
|
|
75
|
+
Inside the container, ask Claude things like _"create a Connection for our Stripe source"_ or _"build a silver model for the orders table"_ and it will use the matching skill.
|
|
76
|
+
|
|
77
|
+
## Troubleshooting
|
|
78
|
+
|
|
79
|
+
- **Container shows `SETUP REQUIRED` banner.** Run `revos auth login` and `revos init` in the container terminal.
|
|
80
|
+
- **`bq` or `dbt` fails with auth errors.** Container's gcloud is not activated. Rebuild the container, or run `bash .devcontainer/post-start.sh` to re-activate.
|
|
81
|
+
- **Start from a clean slate.** Wipe the per-project Docker volumes from your host:
|
|
82
|
+
```bash
|
|
83
|
+
docker volume rm revos-<%=projectSlug%>-credentials \
|
|
84
|
+
revos-<%=projectSlug%>-gcloud \
|
|
85
|
+
revos-<%=projectSlug%>-claude
|
|
86
|
+
```
|
|
87
|
+
Then `Rebuild Container` and rerun step 2.
|
|
88
|
+
|
|
89
|
+
## Further reading
|
|
90
|
+
|
|
91
|
+
- RevOS CLI reference: <https://cli.revos.dev>
|
|
92
|
+
- This project's AI guidance: [`AGENTS.md`](./AGENTS.md)
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# Copy mounted GCP service account key to vscode user's home
|
|
5
|
-
if [ -f /tmp/.revos-gsa-creds.json ]; then
|
|
6
|
-
mkdir -p "$HOME/.revos"
|
|
7
|
-
cp /tmp/.revos-gsa-creds.json "$HOME/.revos/gsa-creds.json"
|
|
8
|
-
chmod 600 "$HOME/.revos/gsa-creds.json"
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
# Copy mounted RevOS CLI credentials so revos commands work without re-login
|
|
12
|
-
if [ -f /tmp/.revos-credentials.json ]; then
|
|
13
|
-
mkdir -p "$HOME/.revos"
|
|
14
|
-
cp /tmp/.revos-credentials.json "$HOME/.revos/credentials.json"
|
|
15
|
-
chmod 600 "$HOME/.revos/credentials.json"
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Configure gcloud with service account and project
|
|
19
|
-
GCP_KEY="$HOME/.revos/gsa-creds.json"
|
|
20
|
-
if [ -f "$GCP_KEY" ]; then
|
|
21
|
-
gcloud auth activate-service-account --key-file="$GCP_KEY"
|
|
22
|
-
fi
|
|
23
|
-
if [ -n "${GOOGLE_CLOUD_PROJECT:-}" ]; then
|
|
24
|
-
gcloud config set project "$GOOGLE_CLOUD_PROJECT"
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# Fix Claude Code credentials permissions (volume is created as root)
|
|
28
|
-
sudo chown -R vscode:vscode /home/vscode/.claude 2>/dev/null || true
|
|
29
|
-
|
|
30
|
-
# Install RevOS CLI
|
|
31
|
-
npm install -g @revos/cli
|
|
32
|
-
|
|
33
|
-
# Symlink dbt profiles so `dbt run` works without --profiles-dir
|
|
34
|
-
mkdir -p "$HOME/.dbt"
|
|
35
|
-
ln -sf "$(pwd)/dbt/profiles.yml" "$HOME/.dbt/profiles.yml"
|