@revturbine/cli 0.19.4 → 0.20.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 +33 -3
- package/dist/cli.js +1292 -74
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,13 +65,13 @@ Commands that read a config name the version explicitly — there is no default:
|
|
|
65
65
|
|---|---|
|
|
66
66
|
| `init` (alias `create`) | Set up RevTurbine while preserving existing integrations: install missing packages, pin the CLI exactly, create a starter for a fresh integration, and install skills for one agent. Use `--scaffold` to create a missing root starter explicitly; existing files are never overwritten. `--agent claude-code\|cursor\|codex` overrides environment detection; an unknown agent skips skills and prints the selection command. Also supports `--dir`, `--dry-run`, `--no-skills`, `--json`. With no `package.json`, offers a new project (`--yes` for noninteractive creation). Runs the invoked CLI even inside a repo that pins a different one. |
|
|
67
67
|
| `signup` | Create an account headlessly: email + password, then an emailed one-time code to verify, then a token is stored. |
|
|
68
|
-
| `login` / `logout` | Device-flow auth; tokens stored at `~/.revturbine/credentials.json` (mode 0600). |
|
|
69
|
-
| `whoami` | Authentication state first: not logged in, credentials accepted, credentials rejected for the selected instance/tenant, or verification unavailable. Then shows instance, tenant, and credentials source; configured tenant information alone does not prove login. Verification and subsequent telemetry each time out after 3 seconds. Status reports exit 0. `--json` retains its seven fields: `instance`, `tenant
|
|
68
|
+
| `login` / `logout` | Device-flow auth; tokens stored at `~/.revturbine/credentials.json` (mode 0600). For CI, skip login and set `REVTURBINE_TOKEN` (see [CI / non-interactive use](#ci--non-interactive-use)). |
|
|
69
|
+
| `whoami` | Authentication state first: not logged in, credentials accepted, credentials rejected for the selected instance/tenant, or verification unavailable. Then shows instance, tenant, and credentials source; configured tenant information alone does not prove login. Verification and subsequent telemetry each time out after 3 seconds. Status reports exit 0. `--json` retains its seven fields: `instance`, `tenant` (`null` when `REVTURBINE_TOKEN` is set without `-t`: the server resolves the token user's own tenant, and `tenant_source` names the variable), `tenant_source`, `credentials_dir`, `credentials_source`, `token_present` (boolean), and `token_valid` (`true` for 2xx, `false` for 401/403, `null` when absent or unverified, including redirects, other HTTP errors, timeouts and network failures). |
|
|
70
70
|
| `schema` | Emit the bundled `RevTurbineConfig` JSON schema (for agents to author against). |
|
|
71
71
|
| `docs` | Print the canonical documentation URL. |
|
|
72
72
|
| `download` | Fetch a config version (`--live` / `--draft` / `--release <id>`); `--save`. |
|
|
73
73
|
| `validate` | Offline schema validation of a `<file>`, or the full server catalog against the open draft (`--draft`). |
|
|
74
|
-
| `diff` | Compare any two versions (dry-run, no writes). A file vs `--draft`/`--live`/`--release` previews the launch — the server side is the base, so `+`/`-` read as created/pruned on launch. |
|
|
74
|
+
| `diff` | Compare any two versions (dry-run, no writes). A file vs `--draft`/`--live`/`--release` previews the launch — the server side is the base, so `+`/`-` read as created/pruned on launch. `--exit-code` makes the status machine-readable: `0` no differences, `1` differences, anything else an error (an unexpected internal error exits `70` so `1` always means "differences"). Every top-level Playbook collection is compared. |
|
|
75
75
|
| `show <kind>` | Summary tables: `plans` · `entitlements` · `segments` · `placements` · `trials` for any version. |
|
|
76
76
|
| `upload` | Stage a Playbook file as the open draft. |
|
|
77
77
|
| `launch` | Take a config live: validate (launch gate) → submit → approve → deploy. `launch <file>` or `launch --draft`. |
|
|
@@ -145,6 +145,33 @@ Public ingest tokens are intentionally embeddable but remain tenant-bound,
|
|
|
145
145
|
origin-restricted, and optionally IP-restricted. They cannot mint other tokens
|
|
146
146
|
or access private control-plane APIs.
|
|
147
147
|
|
|
148
|
+
## CI / non-interactive use
|
|
149
|
+
|
|
150
|
+
`login` and `signup` are interactive. In CI, supply the token through the
|
|
151
|
+
environment instead:
|
|
152
|
+
|
|
153
|
+
| Variable | Meaning |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `REVTURBINE_TOKEN` | Bearer token for every request. Wins over any stored credential (which is then ignored). With it set and no `-t/--tenant-id`, **no `x-tenant-id` header is sent** and the server resolves the token user's own tenant; `-t` still sends one (it must be that tenant). |
|
|
156
|
+
| `REVTURBINE_HTTP_HEADERS` | A JSON object of extra headers added to every request to the RevTurbine instance, e.g. `{"x-vercel-protection-bypass":"…"}` to reach a protection-gated preview/staging deployment. It may not set `Authorization`, `x-tenant-id`, `x-rt-tenant-id` or `Content-Type`. A malformed value exits `2`. |
|
|
157
|
+
|
|
158
|
+
Neither the token nor any header value is ever logged, echoed in an error, or
|
|
159
|
+
sent as telemetry: diagnostics name only the variable and the header names, and
|
|
160
|
+
any stderr line that would contain a registered secret shows `<redacted>`.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
export REVTURBINE_TOKEN="$RT_TOKEN"
|
|
164
|
+
export REVTURBINE_HTTP_HEADERS="{\"x-vercel-protection-bypass\":\"$VERCEL_BYPASS\"}"
|
|
165
|
+
URL=https://staging.example.com/app
|
|
166
|
+
if revturbine diff ./seed.playbook.json --live --url "$URL" --exit-code; then
|
|
167
|
+
echo "no changes: skip launch"
|
|
168
|
+
else
|
|
169
|
+
status=$?
|
|
170
|
+
[ "$status" -eq 1 ] || exit "$status" # 2-7 / 70 = a real error
|
|
171
|
+
revturbine launch ./seed.playbook.json --url "$URL"
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
148
175
|
## Exit-code classes
|
|
149
176
|
|
|
150
177
|
```
|
|
@@ -158,6 +185,9 @@ or access private control-plane APIs.
|
|
|
158
185
|
7 server error
|
|
159
186
|
```
|
|
160
187
|
|
|
188
|
+
`diff --exit-code` is the one exception: `1` means "differences" there, and an
|
|
189
|
+
unexpected internal error exits `70` instead.
|
|
190
|
+
|
|
161
191
|
## Schema validation
|
|
162
192
|
|
|
163
193
|
Validation is **mandatory** and runs fully offline against a vendored,
|