@metabase/rde 0.1.9 → 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.
- package/README.md +1 -27
- package/dist/cli.mjs +19 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ 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 `
|
|
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) |
|
|
@@ -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.
|
package/dist/cli.mjs
CHANGED
|
@@ -2826,12 +2826,18 @@ const MAPPERS = {
|
|
|
2826
2826
|
...leftoverOptions(parsed, ["db", "warehouse"])
|
|
2827
2827
|
});
|
|
2828
2828
|
},
|
|
2829
|
-
sparksql: (parsed) =>
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2829
|
+
sparksql: (parsed) => {
|
|
2830
|
+
const user = paramIgnoringCase(parsed, ["user"]);
|
|
2831
|
+
const password = paramIgnoringCase(parsed, ["password"]);
|
|
2832
|
+
return build(parsed.database, {
|
|
2833
|
+
host: parsed.host ?? param(parsed, "Server"),
|
|
2834
|
+
port: portNumber(parsed.port),
|
|
2835
|
+
dbname: parsed.database,
|
|
2836
|
+
user: user?.value ?? null,
|
|
2837
|
+
password: password?.value ?? null,
|
|
2838
|
+
...leftoverOptions(parsed, ["Server", ...keysOf(user, password)], "jdbc-flags")
|
|
2839
|
+
});
|
|
2840
|
+
},
|
|
2835
2841
|
sqlite: (parsed) => build(null, { db: parsed.path }),
|
|
2836
2842
|
sqlserver: (parsed) => {
|
|
2837
2843
|
const database = parsed.database ?? param(parsed, "databaseName");
|
|
@@ -2878,9 +2884,12 @@ const MAPPERS = {
|
|
|
2878
2884
|
...leftoverOptions(parsed, ["user", "password"])
|
|
2879
2885
|
})
|
|
2880
2886
|
};
|
|
2887
|
+
const DRUID_SCHEME = /url=(?<scheme>https?:\/\/)/i;
|
|
2888
|
+
const DRUID_DEFAULT_SCHEME = "http://";
|
|
2881
2889
|
function mapDruid(parsed) {
|
|
2890
|
+
const scheme = DRUID_SCHEME.exec(parsed.uri)?.groups?.["scheme"] ?? DRUID_DEFAULT_SCHEME;
|
|
2882
2891
|
return build(null, {
|
|
2883
|
-
host: parsed.host
|
|
2892
|
+
host: parsed.host === null ? null : `${scheme}${parsed.host}`,
|
|
2884
2893
|
port: portNumber(parsed.port)
|
|
2885
2894
|
});
|
|
2886
2895
|
}
|
|
@@ -5060,7 +5069,7 @@ function gitSyncStep(deps = hostDeps$10) {
|
|
|
5060
5069
|
//#region src/tools/skills-cli.ts
|
|
5061
5070
|
const NPX = "npx";
|
|
5062
5071
|
const SKILLS_PACKAGE = "skills@latest";
|
|
5063
|
-
const DEFAULT_RDE_SKILL_SOURCE = "https://github.com/metabase/agent-skills/tree/
|
|
5072
|
+
const DEFAULT_RDE_SKILL_SOURCE = "https://github.com/metabase/agent-skills/tree/main";
|
|
5064
5073
|
const RDE_SOURCE_SKILL_NAMES = ["rde", "rde-data-apps"];
|
|
5065
5074
|
const DATA_APP_SKILLS_SOURCE = "metabase/metabase/skills#master";
|
|
5066
5075
|
const DATA_APP_SKILL_NAMES = [
|
|
@@ -5310,7 +5319,7 @@ function agentsSkillsStep(options, deps = hostDeps$9) {
|
|
|
5310
5319
|
agents,
|
|
5311
5320
|
output: ctx.ui.childOutput
|
|
5312
5321
|
});
|
|
5313
|
-
const from = resolved.skillSource === "https://github.com/metabase/agent-skills/tree/
|
|
5322
|
+
const from = resolved.skillSource === "https://github.com/metabase/agent-skills/tree/main" ? "" : ` from ${resolved.skillSource}`;
|
|
5314
5323
|
ctx.ui.info(`Installing the rde skills ${forWhom}${from}`);
|
|
5315
5324
|
await skills.add({
|
|
5316
5325
|
source: resolved.skillSource,
|
|
@@ -10194,7 +10203,7 @@ const upgradeCommand = defineRdeCommand({
|
|
|
10194
10203
|
const main = defineCommand({
|
|
10195
10204
|
meta: {
|
|
10196
10205
|
name: "rde",
|
|
10197
|
-
version: "0.1.
|
|
10206
|
+
version: "0.1.10",
|
|
10198
10207
|
description: "Prepares a local machine for data-engineering work with Metabase and coding agents"
|
|
10199
10208
|
},
|
|
10200
10209
|
subCommands: {
|