$ inspect Metabase CLI
repo: https://github.com/rohanraarora/metabase-cli
language: TypeScript
status: indexed
$ cat ./metabase-cli.md
Metabase CLI
Headless CLI and Node.js library for interacting with Metabase (https://www.metabase.com) instances. Manage profiles, run queries, CRUD questions, dashboards, collections, snippets, alerts, segments, timelines, and more — all from the terminal.
4 stars
2 forks
TypeScript
MIT License
Login with GitHub to like and favorite this CLI tool
$ git release --latest
Latest Releases
All releases
Added
Fixed
Security
Full changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.7.0...v0.8.0
notification update --card <id>— reassign a notification's card. (#24)
Fixed
- Integer CLI options are now parsed in base 10 via a shared
parseIntArghelper. Previously a numeric option default became theparseIntradix, sodashboard add-card --width 12 --height 8either applied the wrong card size or failed with400 Bad Request. All integer options now reject non-integer input with a clear error. (#23) alert update,alert delete, andnotification updatenow work on Metabase v0.59+: the CLI reads the current notification, merges the change, and PUTs the full object back with all nested ids preserved. The old partial-body PUT either 400'd or silently corrupted the alert into a card-less orphan. (#24)alert update --scheduleno longer wipes the existing Slack/email handler. (#24)alert deletearchives in place viaactive:false(v0.59+ has no DELETE route); corrupt null-payload orphans fail with a clear message instead of a cryptic 500. (#24)
Security
- Dev-only advisories resolved:
esbuild→ 0.28.1 (GHSA-g7r4-m6w7-qqqr) andjs-yaml(GHSA-h67p-54hq-rp68).npm auditreports 0 vulnerabilities. No runtime dependencies changed.
Full changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.7.0...v0.8.0
Adds first-class support for two Metabase v0.59+ workflows and clears all open dependency advisories.
Added
Fixed
Security
Full Changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.6.1...v0.7.0
Added
question update --db <id>— move a saved card to a different database. Updates both the top-leveldatabaseidanddatasetquery.databaseso they never drift.--slack-channel <name>onalert create/notification create— post to a Slack channel by name (emits anotification-recipient/raw-valuerecipient, the only shape v0.59+ accepts for channel-name targets).--schedule <cron>(Quartz/Spring), plus legacy--schedule-type/--schedule-hour, onalert create/alert update— schedules now attach to top-levelsubscriptions[]asnotification-subscription/cron.notification create:--condition,--send-once,--disable-linksflags for the full v0.59+ payload.
Fixed
--channel-type slackno longer fails with400 ... unknown error, received: :slack— the channel type is canonicalized tochannel/slack/channel/email. Both bare and prefixed forms are accepted.notification create --scheduleno longer attaches the cron tohandlers[].schedule(silently ignored); it's mounted at the notification level.AlertApitranslatesalertcondition+alertabovegoal→sendconditionandalertfirstonly→send_once; legacy field names still accepted.alert createcanonicalizes--channel-typebefore the Slack-recipient guard (prefixed form was bypassing validation).alert update --above-goalwithout--conditionnow implies a goal condition instead of downgrading tohas_result.
Security
- Cleared all
npm auditadvisories (dev deps):brace-expansion(ReDoS),postcss(XSS), andvitest3 → 4.1.8 (critical UI-server arbitrary file read/exec).npm auditnow reports 0 vulnerabilities. No runtime dependencies changed.
Full Changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.6.1...v0.7.0
Added
Changed
Fixed
Full changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.6.0...v0.6.1
- Global
--verboseflag (andMETABASECLIVERBOSE=1env var) to print full API error response bodies. Useful for debugging; off by default.
Changed
- API errors are now one-line human-readable messages instead of the full server response. Previously a single 500 dumped 5–20 KB of Clojure stacktrace into stdout; now it prints just the top-level
message/error/causefield (e.g.500 Server Error: Invalid parameter: Card 24,009 does not have a template tag named "since_date".). Use--verboseto see the original body. Applies to both HTTP errors and in-band query-execution failures.
Fixed
question updateno longer corrupts v0.59+ cards when template tags are involved. The previous code wrappedstages[0].nativeas an object with nestedtemplate-tags; Metabase saved the payload but the query processor could not substitute parameters, leaving cards unrunnable ("Card does not have a template tag named X"). Updates now emitnativeas a string withtemplate-tagsat the stage level, matching native-UI-authored cards. Cards previously corrupted by this bug are healed on their next update.
Full changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.6.0...v0.6.1
What's Changed
Added
Fixed
Changed
Full Changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.5.0...v0.6.0
Added
metabase-cli doctor— runs 8 diagnostic checks against your Metabase instance (connectivity, version detection, API compatibility)--template-tagsand--template-tags-fileflags onquestion update(previously only available oncreate)
Fixed
question update --sqlno longer corrupts questions on Metabase v0.59+ — now detects thestagesformat vs legacynativeformat- Migrated alert commands from deprecated
/api/alertto/api/notificationendpoints (backward-compatible CLI interface) segment deletenow usesPUTwitharchived: trueinstead of deprecatedDELETEendpointdashboard listfalls back to search API if/api/dashboardreturns 404 (endpoint deprecated in recent Metabase versions)- Security: updated transitive deps
vite(7.3.1 → 7.3.2) andpicomatch(4.0.3 → 4.0.4), fixing 4 Dependabot alerts
Changed
DatasetQuerytype now includes optionalstagesproperty for Metabase v0.59+ compatibility- Alert delete now archives (soft delete) instead of hard delete, matching notification API behavior
Full Changelog: https://github.com/rohanraarora/metabase-cli/compare/v0.5.0...v0.6.0
What's New
See [CHANGELOG](https://github.com/rohanraarora/metabase-cli/blob/main/CHANGELOG.md) for full details.
``
- Environment variable authentication: Set
METABASECLIAUTHKEYandMETABASECLI_DOMAINto use the CLI without runningprofile add— useful for CI/CD pipelines, Docker containers, and quick one-off usage - Warning when only one of the two env vars is set
--profileflag still takes precedence over env vars
See [CHANGELOG](https://github.com/rohanraarora/metabase-cli/blob/main/CHANGELOG.md) for full details.
``
bashnpm install -g [email protected]``
Installation
npm install -g metabase-cli
$ tail ./comments.log
Comments (0)
Login with GitHub to post a comment
No comments yet. Be the first to comment!