@metabase/rde 0.1.8 → 0.1.10

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.
Files changed (3) hide show
  1. package/README.md +6 -32
  2. package/dist/cli.mjs +433 -263
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -54,12 +54,12 @@ The git step reads `–` until a license with remote sync is active; it is check
54
54
  | --- | --- |
55
55
  | Check this machine | Platform, Node version, git, and a reachable Docker daemon or a Java 21+ runtime |
56
56
  | Install the Metabase CLI | `@metabase/cli` (`mb`) at the `alpha-fix-transform-test-ee-path` dist-tag, with the package manager that installed `rde` |
57
- | Install the rde and data-app skills | The data-app skills (`metabase-data-app-setup`, `-routing`, `-actions`, `-semantic-layer`) from `metabase/metabase/skills#master`, then the `rde` and `rde-data-apps` skills from the `rde-generic-skills` branch of `metabase/agent-skills` (the rde skill hands an explicit app request to `rde-data-apps`, which hands the build to the data-app skills), for the coding agents you pick at a terminal, from the ones found on this machine (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Windsurf). When none is found, the step is skipped and says how to add the skills once an agent is installed; `rde` installs no agent. Without a terminal, or with `--yes`, every agent found gets the skills; `--agents` picks a set ahead of time (the skills are installed for them whether or not they are on the machine yet), `--skip-agents` none; `RDE_SKILL_SOURCE` installs the two rde skills from another URL or a local checkout of `metabase/agent-skills` |
57
+ | Install the rde and data-app skills | The data-app skills (`metabase-data-app-setup`, `-routing`, `-actions`, `-semantic-layer`) from `metabase/metabase/skills#master`, then the `rde` and `rde-data-apps` skills from the `main` branch of `metabase/agent-skills` (the rde skill hands an explicit app request to `rde-data-apps`, which hands the build to the data-app skills), for the coding agents you pick at a terminal, from the ones found on this machine (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Windsurf). When none is found, the step is skipped and says how to add the skills once an agent is installed; `rde` installs no agent. Without a terminal, or with `--yes`, every agent found gets the skills; `--agents` picks a set ahead of time (the skills are installed for them whether or not they are on the machine yet), `--skip-agents` none; `RDE_SKILL_SOURCE` installs the two rde skills from another URL or a local checkout of `metabase/agent-skills` |
58
58
  | Install Metabase | **Docker** when it is available: pulls `metabase/metabase-enterprise-head:latest` (or `--image`) and creates the container. **Jar** otherwise, or with `--runtime jar`: downloads the latest enterprise release (or the tag or `.jar` path given as `--jar`) into `~/.rde/jars/` and runs it with your Java. Either way on port 3100, or the first free port above it, or `--port` |
59
59
  | Start Metabase | Starts the container or the jar and waits for `/api/health`, showing Metabase's own progress |
60
60
  | Create the admin user | `admin@metabase.local` with a generated password that `rde credentials` shows, or your own with `--admin prompted`, see [Credentials](#credentials) |
61
61
  | Connect the Metabase CLI | Creates an API key named `rde` and logs `mb` in with it under the profile `default`, so plain `mb` uses the instance; when `default` already points at another Metabase it asks first, see [The `mb` profile](#the-mb-profile); a key Metabase rejects is replaced |
62
- | Connect a sample database | Runs Metabase's Postgres sample data (`metabase/qa-databases:postgres-sample-15`) in a container named `rde-sampledb-default` on the first free port from 15432, connects it as `Sample Database`, and switches transforms on. It replaces the H2 sample database Metabase would otherwise bundle, which cannot be a transform target. Needs Docker, so a jar instance on a machine without Docker keeps the H2 one instead |
62
+ | Connect a sample database | Runs Metabase's Postgres sample data (`metabase/qa-databases:postgres-sample-15`) in a container named `rde-sampledb-default` on the first free port from 15432 (or one Docker picks, when another program or a concurrent `rde init` takes that port first), connects it as `Sample Database`, and switches transforms on. It replaces the H2 sample database Metabase would otherwise bundle, which cannot be a transform target. Needs Docker, so a jar instance on a machine without Docker keeps the H2 one instead |
63
63
  | Activate your license | Optional. Paste a token, or press Enter to skip; remote sync needs one with the `remote-sync` feature |
64
64
  | Connect your databases | At a terminal, until you connect one of your own or skip it: paste a connection string (Enter skips), review, test, add; repeat. `--database` names them ahead of time; with `--yes` or without a terminal nothing is asked. `rde db add` starts from the engine list, where the fields can also be filled one by one |
65
65
  | Connect a git repository | Only with a license. Initializes or reuses a repository and points Metabase's remote sync at it |
@@ -102,7 +102,7 @@ The second run on the same machine detects every step as done and prints the sum
102
102
  └ rde init finished
103
103
  ```
104
104
 
105
- Ctrl-C at any prompt stops the run; `rde init` again continues from the first step that is not done. A step that fails ends the run with exit code 1 (2 for a missing answer) and a last line naming the step and the command that resumes there: `rde init stopped at "Connect a sample database": <reason>. Resume with rde init --from sample-database.` `rde init --from license` re-runs from a step on, `rde init --only databases` runs one step.
105
+ Ctrl-C at any prompt stops the run; `rde init` again continues from the first step that is not done. A step that fails ends the run with exit code 1 (2 for a missing answer) and a last line naming the step and the command that resumes there: `rde init stopped at "Connect a sample database": <reason>. Resume with rde init --from sample-database.` `rde init --from license` re-runs from a step on (a later step that does not apply, such as the git step without a license that has remote sync, stays skipped), `rde init --only databases` runs one step.
106
106
 
107
107
  ## The sample database
108
108
 
@@ -191,10 +191,10 @@ mb git-sync status
191
191
 
192
192
  ## The git repository
193
193
 
194
- With a license that includes remote sync, the last step connects a git repository. You choose where the working directory lives (here, a new directory, or an existing repository) and where Metabase pushes:
194
+ With a license that includes remote sync, the last step connects a git repository. You choose where Metabase pushes, then where the working directory lives (here, another directory, or an existing repository):
195
195
 
196
196
  - **Local remote inside `~/.rde`** (default): a bare repository at `instances/default/data/content.git`, mounted into the container and reached as `file:///rde/content.git`. No account, no token. Your working directory gets it as `origin` (or as `rde-remote` when `origin` already points elsewhere).
197
- - **Hosted remote**: a GitHub, GitLab, or Bitbucket `https://` URL plus a token with read and write access. `rde` tests the connection through Metabase before saving anything.
197
+ - **Hosted remote**: a GitHub, GitLab, or Bitbucket `https://` URL plus a token with read and write access. `rde` tests the connection through Metabase before saving anything, then clones the repository into the working directory (an existing repository gets the URL as `origin` instead); an empty hosted repository gets the first commit pushed to it. The token is handed to Metabase and, for the clone and that first push, to git in its environment; it never lands in the clone's config, the remote URL, or a credential helper, so a later `git pull` uses your own git credentials.
198
198
 
199
199
  A fresh repository gets a first commit with a `README.md` and a `.gitignore` that keeps out what a data app built in it must not push: `.env`, `.env.local`, `.env.*.local`, `node_modules/`, `.vite/`, the rde skill's `.scratch/`, and `.DS_Store` (a data app's built `dist/` stays tracked, since that bundle is what Metabase serves); a `.gitignore` already there keeps its lines and gets the missing ones, and a repository that already has commits is left as it is. A repository that already holds Metabase content is imported on the spot. Afterwards:
200
200
 
@@ -257,7 +257,7 @@ rde init --license-token '$RDE_LICENSE_TOKEN' …
257
257
 
258
258
  ### Recording a run
259
259
 
260
- `rde init --print-answers <file>` writes, once an interactive run finishes, the answers file that reproduces it: the prompts as they were answered, plus any override given by a flag. Secrets are written as references, never as values: `$RDE_ADMIN_PASSWORD`, `$RDE_LICENSE_TOKEN`, `$RDE_GIT_TOKEN`, `$RDE_DATABASE_<n>_URI` for a connection string carrying a password, and `$RDE_DATABASE_<n>_<FIELD>` for a secret field (a password, or an SSH private key). Set those variables and run `rde init --answers <file>` on the next machine.
260
+ `rde init --print-answers <file>` writes, once an interactive run finishes, the answers file that reproduces it: the prompts as they were answered, each database as it was added (its connection string if used as pasted, otherwise its fields), plus any override given by a flag. Secrets are written as references, never as values: `$RDE_ADMIN_PASSWORD`, `$RDE_LICENSE_TOKEN`, `$RDE_GIT_TOKEN`, `$RDE_DATABASE_<n>_URI` for a connection string carrying a password, and `$RDE_DATABASE_<n>_<FIELD>` for a secret field (a password, or an SSH private key). Set those variables and run `rde init --answers <file>` on the next machine.
261
261
 
262
262
  ## Upgrading
263
263
 
@@ -350,29 +350,3 @@ Start Docker (or `colima start`), or install Java, and run `rde init` again. `rd
350
350
  **The agent follows an old copy of the skill.** The `rde skill copies` row lists every copy of the skill the `skills` CLI knows, global and in the current directory's project, with where it came from, and fails when one did not come from rde's source (the branch is read from the `skills` lock file; against a local `RDE_SKILL_SOURCE` the copy's `SKILL.md` is compared with the checkout's `skills/rde/SKILL.md`). With several copies it says which one Claude Code started in that directory loads (a personal skill wins over a project one). `rde init --only agents-skills` reinstalls the global copy; restart the agent session afterwards.
351
351
 
352
352
  **The license token is rejected.** Activation ends with `Metabase reports the token as invalid` (or another status Metabase returned). Check the token, and check that the container can reach `token-check.metabase.com`: activation needs outbound network access. Run `rde init --from license` to try again; press Enter at the prompt to skip the license and carry on without remote sync.
353
-
354
- ## Development
355
-
356
- ```sh
357
- bun install
358
- bun run check # tsc, oxlint + boundary linter, oxfmt, unit tests
359
- bin/rde-dev init # runs from source with RDE_HOME and the mb config under .dev-state/
360
- RDE_SKILL_SOURCE=~/agent-skills bin/rde-dev init --only agents-skills # the rde skills from a local checkout
361
- ```
362
-
363
- The end-to-end lane runs the built binary against real Docker: a seeded Postgres 16 sidecar on `127.0.0.1:15432` (`RDE_E2E_PG_PORT` to change it) and a fresh instance under `.e2e-state/`, with a fake `HOME` so the skill installer never touches your agents. `bun run build` must precede `bun run test:e2e`, and `python3` must be on `PATH`: the lane answers one `init` question through a pseudo-terminal it opens with Python's `pty` module. With `RDE_E2E_JAR` pointing at a Metabase jar (a local build) the lane also runs the jar runtime through init, doctor, stop, start, and uninstall with the host's Java; without it those tests are reported as skipped.
364
-
365
- ```sh
366
- bun run build && bun run e2e:up && bun run test:e2e
367
- bun run e2e:down
368
- ```
369
-
370
- With the database stack up, the lane also connects one container per engine Metabase supports and Docker can run (Postgres, MySQL, MariaDB, ClickHouse, SQL Server, Oracle, Trino, MongoDB), each in its URL and JDBC forms, without a terminal, and waits for its first sync. These cases live in `tests/e2e/databases.e2e.test.ts`, which sets up its own instance and has one `describe` block per service in `tests/e2e/databases.compose.yml`, so `-t` picks the engines to run. CI (`.github/workflows/test.yml`) runs the unit gate, the main lane, and one job per database service, in parallel, on every pull request.
371
-
372
- ```sh
373
- bun run e2e:databases:up mysql mongo # any of the services; Oracle and SQL Server are large
374
- bun run test:e2e:databases -t '^(mysql|mongo) ' # or no -t for every service
375
- bun run e2e:databases:down
376
- ```
377
-
378
- With `MB_PREMIUM_EMBEDDING_TOKEN` in the environment the lane also activates the license and connects a local git remote; without it that test is reported as skipped.