Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"name": "metabase-cli",
"description": "Be your data analyst / data engineer for Metabase, from the terminal via the `mb` CLI. Go from raw data to something a non-technical person can use: clean tables, reusable metrics, dashboards, and written answers. Use when someone wants to \"make sense of my data\", \"build a data model\", \"go from raw data to a dashboard\", \"answer questions about my data\", \"report on who registered / signed up / responded\", or \"set up analytics for X\". Also full CRUD on every Metabase resource (cards, dashboards, transforms, queries), git-sync content to and from a remote, and on-demand workflow skills served by `mb skills get`.",
"source": "./",
"source": "./packages/cli",
"strict": false,
"skills": ["./skills/metabase-cli"],
"category": "development"
Expand Down
5 changes: 5 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"worktree": {
"baseRef": "head"
}
}
103 changes: 79 additions & 24 deletions .claude/skills/add-e2e-test/SKILL.md

Large diffs are not rendered by default.

405 changes: 301 additions & 104 deletions .claude/skills/add-resource-command/SKILL.md

Large diffs are not rendered by default.

143 changes: 101 additions & 42 deletions .claude/skills/audit-architecture/SKILL.md

Large diffs are not rendered by default.

239 changes: 165 additions & 74 deletions .claude/skills/review/SKILL.md

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ on:
branches: [main]
pull_request:

# Each gate is its own job so a red check names what broke, and each runs at the root manifest's
# declared floor. Whether the whole declared range holds is a different question, answered by
# test.yml's `toolchain` matrix.
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.19.5
- run: node --version
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -20,6 +27,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.19.5
- run: node --version
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -30,6 +41,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.19.5
- run: node --version
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
Expand All @@ -40,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stbenjam/skillsaw@v0
- uses: stbenjam/skillsaw@v0.17.0
with:
path: skill-data
path: packages/cli/skill-data
strict: true
8 changes: 5 additions & 3 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node.js with npm registry
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Setup Bun
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Compute alpha version and dist-tag
id: version
run: |
BASE=$(node -p "require('./package.json').version")
BASE=$(node -p "require('./packages/cli/package.json').version")
BRANCH="${{ github.event.pull_request.head.ref }}"
SLUG=$(echo "$BRANCH" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g; s/--*/-/g; s/^-//; s/-$//')
SHORT_SHA=$(git rev-parse --short HEAD)
Expand All @@ -46,12 +46,14 @@ jobs:
echo "Will publish @metabase/cli@$VERSION with dist-tag $TAG"

- name: Set package version
run: npm version --no-git-tag-version --allow-same-version "${{ steps.version.outputs.version }}"
working-directory: packages/cli
run: npm pkg set version="${{ steps.version.outputs.version }}"

- name: Build
run: bun run build

- name: Publish to NPM
working-directory: packages/cli
run: npm publish --tag "${{ steps.version.outputs.tag }}" --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js with npm registry
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Setup Bun
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Check whether local version was already published
id: check
run: |
LOCAL=$(node -p "require('./package.json').version")
LOCAL=$(node -p "require('./packages/cli/package.json').version")
LATEST=$(npm view @metabase/cli version 2>/dev/null || echo "none")
ALREADY_PUBLISHED=$(npm view @metabase/cli versions --json 2>/dev/null | node -e "
let raw = '';
Expand All @@ -55,6 +55,7 @@ jobs:

- name: Publish to NPM
if: steps.check.outputs.changed == 'true'
working-directory: packages/cli
run: npm publish --tag latest --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,30 @@ on:
pull_request:

jobs:
test:
# The root manifest's `engines.node` is `^20.19.0 || >=22.12.0`, both boundaries pinned below
# alongside a current release. `bun run check`'s fifth step, `lint:skills`, is `uvx skillsaw` and
# cannot vary with Node, so it stays in lint.yml where the skillsaw action already runs it; the
# four steps here are the ones that load a Node binary.
toolchain:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 20.19.5
- 22.12.0
- 24.12.0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun run typecheck
- run: bun run lint
- run: bun run format:check
- run: bun run test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ coverage/
plan
.dev-state/
tests/e2e/.bootstrap*.json
tests/e2e/.gate-skips*.json
tests/e2e/snapshots/*.sql
metabase-*.log
metabase-*.log
*.tgz
.claude/worktrees/
2 changes: 1 addition & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": []
"ignorePatterns": ["packages/cli/src/core/schema/data/**"]
}
9 changes: 6 additions & 3 deletions .skillsaw.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# skillsaw configuration — https://github.com/stbenjam/skillsaw
# Lints the skill collection under skill-data/. Pinned so a skillsaw
# release can't silently change token math and break CI.
# Lints the skill collection under packages/cli/skill-data/. The tool version is
# pinned at both call sites — `lint:skills` in package.json and the action tag in
# .github/workflows/lint.yml — so a skillsaw release can't silently change token
# math and break CI. This field records the version those two pins name; keep the
# three in step.

version: "0.11.4"
version: "0.17.0"

rules:
context-budget:
Expand Down
Loading
Loading