@metabase/cli 0.1.18 → 0.2.1-alpha.bcm-ghy-4075-spawn-default-profile.eb120d1
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 +283 -45
- package/dist/add-collection-CCpC-GUz.mjs +9 -0
- package/dist/{add-collection-CRZAFCZy.mjs → add-collection-CLXfrgp4.mjs} +4 -5
- package/dist/append-DMcxP1LM.mjs +42 -0
- package/dist/archive-4WqMsPWB.mjs +38 -0
- package/dist/{archive-De4yVEV8.mjs → archive-5inmbMDL.mjs} +5 -7
- package/dist/{archive-3mEhK9_H.mjs → archive-BggM_AuL.mjs} +5 -7
- package/dist/{archive-Z8ZM-ilB.mjs → archive-BmhehbS0.mjs} +8 -9
- package/dist/{archive-d74nDcp4.mjs → archive-BwIZzWGe.mjs} +5 -7
- package/dist/{archive-CFHYRF65.mjs → archive-DErhQn8A.mjs} +5 -7
- package/dist/archive-DTnz1suV.mjs +38 -0
- package/dist/{archive-C3RWdM-2.mjs → archive-Q1387APe.mjs} +7 -8
- package/dist/{archive-errg-EKw.mjs → archive-h-3H5b4K.mjs} +5 -7
- package/dist/auth-DzCAiArV.mjs +22 -0
- package/dist/{body-BS2s2zDl.mjs → body-5snfmiwR.mjs} +3 -3
- package/dist/{branches-mcyT7wI-.mjs → branches-PL170CYS.mjs} +5 -7
- package/dist/{cancel-B2l-i2NS.mjs → cancel-EFKcF5J_.mjs} +4 -6
- package/dist/{cancel-task-CugcIeIi.mjs → cancel-task-mFFx0d5m.mjs} +5 -7
- package/dist/capabilities-CiaAfUgX.mjs +684 -0
- package/dist/{card-DEmcRlNO.mjs → card-B8G5jQQT.mjs} +24 -18
- package/dist/card-BsfdXK0O.mjs +26 -0
- package/dist/{cards-BGkz5BeZ.mjs → cards-BI7zKb9M.mjs} +7 -8
- package/dist/cli.mjs +178 -29
- package/dist/collection-2h_by9Ue.mjs +23 -0
- package/dist/{collection-DrLpA1SO.mjs → collection-C52Ndi_O.mjs} +5 -3
- package/dist/{collection-namespace-BP_LJrAD.mjs → collection-namespace-uNA5WhLB.mjs} +2 -2
- package/dist/{create-Cztp5kES.mjs → create-BLD0YniB.mjs} +6 -7
- package/dist/create-BP8EIWrP.mjs +161 -0
- package/dist/{create-CkRFKtFG.mjs → create-BpizGzgQ.mjs} +8 -9
- package/dist/create-BxCsAdqc.mjs +45 -0
- package/dist/{create-DzyMvAVy.mjs → create-CBKT7SE_.mjs} +8 -9
- package/dist/{create-D8KA4zJA.mjs → create-CQ32FwVe.mjs} +11 -11
- package/dist/{create-YfGzANNB.mjs → create-CU3bYpsT.mjs} +8 -9
- package/dist/create-DAH24ltu.mjs +45 -0
- package/dist/{create-BOmmMSjF.mjs → create-DutkaD7P.mjs} +11 -12
- package/dist/{create-B4HAEEE0.mjs → create-FuZa4j1N.mjs} +8 -9
- package/dist/{create-wpvDXSSY.mjs → create-KveE3j3p.mjs} +12 -13
- package/dist/{create-DhrftYre.mjs → create-VrSowEbj.mjs} +14 -14
- package/dist/{create-CD9Rp8qs.mjs → create-acWKw4Y1.mjs} +14 -14
- package/dist/{create-branch-DsoMfx_2.mjs → create-branch-CP1Y4_El.mjs} +5 -7
- package/dist/{create-kWzqvTGR.mjs → create-xPfmI1Tu.mjs} +11 -12
- package/dist/csv-CZyYi0vi.mjs +58 -0
- package/dist/{current-task-WuKPZpZ6.mjs → current-task-BR4koo9z.mjs} +5 -7
- package/dist/dashboard-ARgJfamb.mjs +35 -0
- package/dist/{dashboard-DOplbKyQ.mjs → dashboard-BLihjDXg.mjs} +35 -15
- package/dist/{database-D9fftP-i.mjs → database-BOqzcexD.mjs} +2 -2
- package/dist/db-dbnxMPSR.mjs +27 -0
- package/dist/{delete-Buai0_e_.mjs → delete-BpL3vaaT.mjs} +6 -8
- package/dist/{delete-BCitmugk.mjs → delete-C5DqDwev.mjs} +6 -8
- package/dist/delete-DCDFLHFa.mjs +49 -0
- package/dist/delete-P2Qlsr_s.mjs +49 -0
- package/dist/{delete-CmGh0jo1.mjs → delete-ea_ns1uM.mjs} +6 -8
- package/dist/{delete-runtime-B0ha5QR4.mjs → delete-runtime-DdBn6poA.mjs} +2 -3
- package/dist/{delete-table-BOkYxdjA.mjs → delete-table-tM048btr.mjs} +6 -8
- package/dist/{dependencies-XZrEvHUA.mjs → dependencies-DdOTClO2.mjs} +5 -7
- package/dist/destroy-B51EPvOJ.mjs +168 -0
- package/dist/{dirty-B-5NDbG9.mjs → dirty-CEQYmhNF.mjs} +5 -7
- package/dist/{document-1W7NRaO_.mjs → document-D4zB-5a0.mjs} +20 -4
- package/dist/document-DR1FLOn9.mjs +22 -0
- package/dist/{eid-BCuJRv7a.mjs → eid-CtKGjAkz.mjs} +10 -11
- package/dist/embedding-CKdw8q7p.mjs +11 -0
- package/dist/events-C26DZ6yZ.mjs +44 -0
- package/dist/{export-Dod2gdyE.mjs → export-CippuWZJ.mjs} +5 -10
- package/dist/export-Cy2DFtR2.mjs +10 -0
- package/dist/field-CXDndCbB.mjs +21 -0
- package/dist/{field-CMY_LWUe.mjs → field-DsXTeqBy.mjs} +6 -4
- package/dist/{fields-B0yttrzR.mjs → fields-Xm_HVNcX.mjs} +6 -8
- package/dist/get-3O7hv4zv.mjs +67 -0
- package/dist/{get-D-pNrQGA.mjs → get-B0cq1uGy.mjs} +5 -7
- package/dist/{get-k6M5nGMC.mjs → get-B90bXbpw.mjs} +5 -7
- package/dist/{get-D7QMqPOK.mjs → get-BQBu2c94.mjs} +5 -7
- package/dist/{get-CfeYa0v5.mjs → get-BQz45IBF.mjs} +6 -7
- package/dist/get-BSfKWZNJ.mjs +35 -0
- package/dist/get-BdNC8WM8.mjs +38 -0
- package/dist/{get-DBY5esTW.mjs → get-Bj66bcuU.mjs} +5 -7
- package/dist/{get-BpZ81hX8.mjs → get-BrKqMM1d.mjs} +5 -7
- package/dist/{get-9p0Gt1c7.mjs → get-CjZWjRa5.mjs} +5 -7
- package/dist/{get-DISgP66L.mjs → get-CwGqARAf.mjs} +16 -9
- package/dist/{get-BkGh9BPd.mjs → get-D5crrFSf.mjs} +5 -7
- package/dist/{get-Dz7fcqoG.mjs → get-DTkvGu_J.mjs} +8 -9
- package/dist/{get-u5Uq9vms.mjs → get-DX2fp6BB.mjs} +4 -6
- package/dist/get-DYuJVlP-.mjs +35 -0
- package/dist/{get-DJ8huA8y.mjs → get-FIE88hj9.mjs} +7 -8
- package/dist/{get-B0OsW6jk.mjs → get-Ihx_XaaI.mjs} +5 -7
- package/dist/{get-run-DQJVpDw1.mjs → get-run-lVwhQVFx.mjs} +5 -7
- package/dist/{get-CbpHt4Hs.mjs → get-z0BKkiRX.mjs} +4 -6
- package/dist/git-sync-CmB4YBmS.mjs +31 -0
- package/dist/{group-BNE_RiH5.mjs → group-CILtQqCL.mjs} +2 -1
- package/dist/{has-remote-changes-DvQBXudi.mjs → has-remote-changes-DHrYSnTg.mjs} +5 -7
- package/dist/{import-PGS8-DwE.mjs → import-BU40xXSF.mjs} +7 -9
- package/dist/{input-7Sj85_K7.mjs → input-BGyHn0Kr.mjs} +6 -3
- package/dist/{is-dirty-DyEVFQVJ.mjs → is-dirty-BPluqPPP.mjs} +3 -4
- package/dist/is-dirty-DOy1TRcf.mjs +8 -0
- package/dist/{items-CkFEy2Du.mjs → items-BZpYkImP.mjs} +6 -8
- package/dist/{key-bltP32Pm.mjs → key-B8UAsQmB.mjs} +1 -1
- package/dist/{library-1AAVbk-K.mjs → library-BGWDIfEM.mjs} +6 -6
- package/dist/list-B037kJtH.mjs +39 -0
- package/dist/{list-82NkvRpI.mjs → list-B7Ihu6XI.mjs} +7 -8
- package/dist/{list-pQ22nXhQ.mjs → list-BCeZlfpQ.mjs} +4 -6
- package/dist/{list-CKzpoTgP.mjs → list-Bct00qku.mjs} +6 -8
- package/dist/{list-D-rgDFa5.mjs → list-Be8xMtS3.mjs} +8 -9
- package/dist/{list-Bb8YRON_.mjs → list-CjBPVJqd.mjs} +4 -6
- package/dist/{list-BCYTTCFD.mjs → list-CoqHnusK.mjs} +4 -6
- package/dist/{list-B9wXg3qi.mjs → list-CvaoHnl-.mjs} +3 -5
- package/dist/{list-BVzu2RIZ.mjs → list-DamRE5Ds.mjs} +4 -6
- package/dist/{list-BWAYDSbQ.mjs → list-DmopauvJ.mjs} +4 -6
- package/dist/{list-CJx5q-Yn.mjs → list-M_1sdYNH.mjs} +6 -8
- package/dist/{list-CK0p7vvK.mjs → list-Ov6bYzT9.mjs} +7 -8
- package/dist/{list-Sgo3RfDY.mjs → list-SfpASSFx.mjs} +4 -6
- package/dist/{list-BBxRjuMn.mjs → list-fPfgG0PY.mjs} +4 -6
- package/dist/list-lsPeumLP.mjs +34 -0
- package/dist/{list-BY4S32Lg.mjs → list-sn9M7QQX.mjs} +4 -6
- package/dist/{list-CjF12k1G.mjs → list-wxIVl45_.mjs} +5 -7
- package/dist/listing-wFZuS5li.mjs +10 -0
- package/dist/{login-C6ZAnGHz.mjs → login-CRlmR4op.mjs} +61 -23
- package/dist/{logout-CWjyY3Y8.mjs → logout-DSZEUxSQ.mjs} +5 -7
- package/dist/{measure-DoJvtCaA.mjs → measure-C3G1srWb.mjs} +5 -4
- package/dist/measure-Ka0n3426.mjs +25 -0
- package/dist/{parameter-values-DmDOuE-j.mjs → parameter-values-CwW8Xes7.mjs} +5 -7
- package/dist/{parse-enum-BL9i_brN.mjs → parse-enum-ooCsJWn6.mjs} +1 -1
- package/dist/parse-id-xS1tWJAq.mjs +18 -0
- package/dist/{parse-ref-CB_KvF9h.mjs → parse-ref-j4lxaQmd.mjs} +1 -1
- package/dist/{path-D8IJ4YrW.mjs → path-CVmg-bmf.mjs} +4 -6
- package/dist/{poll-hgnrHBoh.mjs → poll-CuTlWBwI.mjs} +2 -2
- package/dist/{poll-task-NQNLT_aA.mjs → poll-task-DhsYs8Hx.mjs} +2 -2
- package/dist/{preflight-DvaPQHHf.mjs → preflight-D3VgjEg7.mjs} +4 -5
- package/dist/{process-j8UHMHc2.mjs → process-7c8BcQEi.mjs} +1 -1
- package/dist/profile-name-CZ1-Vtrh.mjs +7 -0
- package/dist/{prompt-C85xd9HR.mjs → prompt-jQnNKtlx.mjs} +1 -1
- package/dist/{publish-BntmFR6g.mjs → publish-DFTCsjHU.mjs} +13 -10
- package/dist/{query-DSKQZu91.mjs → query-CPq-dhFV.mjs} +15 -15
- package/dist/{query-BQfgKV68.mjs → query-Dfx69iJ4.mjs} +9 -10
- package/dist/{query-result-D6mfoVfQ.mjs → query-result-Cg7odyR_.mjs} +1 -1
- package/dist/{remove-collection-BguaI3-6.mjs → remove-collection-DUAMhx5L.mjs} +7 -9
- package/dist/replace-DZWd6avZ.mjs +42 -0
- package/dist/requests-DYrDe-D0.mjs +96 -0
- package/dist/{rescan-values-DjD6IW3J.mjs → rescan-values-DZSnEFA0.mjs} +7 -9
- package/dist/{resolve-Dj2MTBkn.mjs → resolve-BTZuO3Yq.mjs} +22 -15
- package/dist/{run-Bp1yxkBN.mjs → run-B2b3Bjmv.mjs} +4 -6
- package/dist/{run-RQfQj7Rk.mjs → run-ryZ4sXK5.mjs} +7 -9
- package/dist/{runs-CSsatfWb.mjs → runs-F82HVSie.mjs} +5 -7
- package/dist/{runtime-oxjmrYoP.mjs → runtime-C6ASrgVA.mjs} +944 -909
- package/dist/{schema-tables-5I5pCxHl.mjs → schema-tables-CCOKb715.mjs} +6 -8
- package/dist/{schemas-CfzFCfBt.mjs → schemas-LtVrNECH.mjs} +4 -6
- package/dist/{search-Vo-BqliA.mjs → search-9GSZHgJQ.mjs} +4 -6
- package/dist/segment-C40bORNZ.mjs +25 -0
- package/dist/{segment-TXktTCfU.mjs → segment-CxRYEXeO.mjs} +6 -5
- package/dist/{selectors-DBnJsKlW.mjs → selectors-B2nDmrIV.mjs} +3 -3
- package/dist/{set-1Vh0AF-T.mjs → set-C57KDMGM.mjs} +9 -9
- package/dist/{set-active-C0mUZlNN.mjs → set-active-BDHGHtj2.mjs} +4 -6
- package/dist/setting-zrJwy48C.mjs +20 -0
- package/dist/{setup-CzYFvFK5.mjs → setup-Doq8atTG.mjs} +11 -12
- package/dist/{skills-B6gfH0iR.mjs → skills-y-KsUqT9.mjs} +1 -1
- package/dist/{skills-CR2xyV33.mjs → skills-yuzH_o8s.mjs} +3 -3
- package/dist/{snippet-CtA2Pkoa.mjs → snippet-C8PVaPY9.mjs} +7 -4
- package/dist/snippet-ScFM8re8.mjs +22 -0
- package/dist/{stash-CQHXwBu_.mjs → stash-D_u6z4q6.mjs} +7 -9
- package/dist/{status-C_7aqTvB.mjs → status--Dm2Jv6k.mjs} +5 -7
- package/dist/{status-DXQkM18v.mjs → status-CDPhDX5I.mjs} +27 -13
- package/dist/{summary-1aNpQc8j.mjs → summary-C9a2cBTE.mjs} +5 -7
- package/dist/{sync-schema-BqLp5uTS.mjs → sync-schema-CDIWNCGI.mjs} +9 -11
- package/dist/sync-scope-DW2QpGwv.mjs +55 -0
- package/dist/{table-DE3i82T_.mjs → table-3onHpwcb.mjs} +16 -4
- package/dist/table-BKehBm_E.mjs +21 -0
- package/dist/timeline-DEaiuB5V.mjs +157 -0
- package/dist/timeline-event-CLWMxvE0.mjs +22 -0
- package/dist/timeline-n3Nw9Egt.mjs +24 -0
- package/dist/transform-CrOOqKen.mjs +31 -0
- package/dist/{transform-DEF38FWe.mjs → transform-DP6J2ber.mjs} +31 -5
- package/dist/transform-job-J-E0Mec7.mjs +25 -0
- package/dist/transform-tag-Bkyasy_s.mjs +21 -0
- package/dist/{transforms-BelyllUL.mjs → transforms-w2a5qsjJ.mjs} +5 -7
- package/dist/{tree-YvmwGql7.mjs → tree-JZC6vD9q.mjs} +4 -6
- package/dist/{unpublish-CHjGLMu9.mjs → unpublish-BsfIH46y.mjs} +5 -7
- package/dist/{update-D7vc8GBF.mjs → update-B8hn6VxO.mjs} +12 -13
- package/dist/{update-BKhekuqr.mjs → update-BSNK36fk.mjs} +15 -15
- package/dist/update-BTFj6WHo.mjs +52 -0
- package/dist/{update-BACl_bJS.mjs → update-BfIGjAVA.mjs} +9 -10
- package/dist/{update-CrRz47aj.mjs → update-C1_aIL6X.mjs} +15 -15
- package/dist/{update-K-jjQ0Aw.mjs → update-CXKWHOIN.mjs} +10 -11
- package/dist/{update-BnHYSu96.mjs → update-Cg09lBb5.mjs} +13 -14
- package/dist/update-D01S8hnw.mjs +52 -0
- package/dist/{update-txUfAJxy.mjs → update-DKQjMsuE.mjs} +9 -10
- package/dist/{update-Zz01Woxj.mjs → update-DSlSr7Ky.mjs} +9 -10
- package/dist/{update-C9fndCqb.mjs → update-QaBVvlz9.mjs} +9 -10
- package/dist/{update-BGMJTpA6.mjs → update-WLb9099y.mjs} +12 -13
- package/dist/{update-BWlN3QDo.mjs → update-bFNKpay8.mjs} +9 -10
- package/dist/{update-dashcard-Dvth-yLC.mjs → update-dashcard-CKZC7scy.mjs} +11 -11
- package/dist/{upgrade-DsXlfPef.mjs → upgrade-DkK1ZbEY.mjs} +5 -7
- package/dist/upload-DOMoaR9f.mjs +16 -0
- package/dist/{uuid-ByJmWV7b.mjs → uuid-DDbLKnbe.mjs} +3 -5
- package/dist/{validate-BqNW4Sk1.mjs → validate-DqQ7DQnP.mjs} +1 -2
- package/dist/{validate-query-CcZVKYPV.mjs → validate-query-BYG7lyaY.mjs} +2 -3
- package/dist/{values-CIjJI4sz.mjs → values-Bc99Kkuv.mjs} +5 -7
- package/dist/{verify-Jsuc2dat.mjs → verify-WvMbaT8W.mjs} +2 -2
- package/dist/{wait-5ltTFvSa.mjs → wait-DmgEPnHW.mjs} +6 -8
- package/dist/{wait-flags-D6kd_G7c.mjs → wait-flags-BpzyrpAL.mjs} +2 -2
- package/dist/workspace-BgH_4xFO.mjs +75 -0
- package/dist/workspace-LFtHxcw9.mjs +19 -0
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +31 -23
- package/skill-data/dashboard/SKILL.md +26 -3
- package/skill-data/data-workflow/SKILL.md +17 -15
- package/skill-data/git-sync/SKILL.md +20 -5
- package/skill-data/visualization/SKILL.md +1 -0
- package/dist/add-collection-DbalcC3_.mjs +0 -11
- package/dist/auth--PWX0oj5.mjs +0 -22
- package/dist/capabilities-N0jo5U7S.mjs +0 -239
- package/dist/card-D07WYCQY.mjs +0 -26
- package/dist/collection-Dss2qSEF.mjs +0 -23
- package/dist/dashboard-Crh4v6Fq.mjs +0 -35
- package/dist/db-BCAURQei.mjs +0 -28
- package/dist/document-upxL2nKH.mjs +0 -22
- package/dist/error-BaBm-UrT.mjs +0 -227
- package/dist/field-CloFa1oe.mjs +0 -21
- package/dist/get-B8tugTku.mjs +0 -50
- package/dist/git-sync-C9m-OHac.mjs +0 -31
- package/dist/is-dirty-DpyKeGAJ.mjs +0 -10
- package/dist/manifest-BVf8P4bl.mjs +0 -126
- package/dist/measure-Cbly1r0E.mjs +0 -25
- package/dist/metadata-CW5Lfw5d.mjs +0 -39
- package/dist/metadata-aQAqseCm.mjs +0 -38
- package/dist/notice-DyVl5aYB.mjs +0 -206
- package/dist/parse-id-DlXnOcmP.mjs +0 -12
- package/dist/segment-BuN_IoM8.mjs +0 -25
- package/dist/setting-BbdKR-lO.mjs +0 -20
- package/dist/snippet-Bzo2U9Fv.mjs +0 -22
- package/dist/table-BwGOz97O.mjs +0 -22
- package/dist/transform-B65ZD9-e.mjs +0 -31
- package/dist/transform-job-BWVKXSV6.mjs +0 -25
- package/dist/transform-tag-C4qvmicL.mjs +0 -21
- /package/dist/{body-flags-DWTTxJpP.mjs → body-flags-CgHgJBRC.mjs} +0 -0
- /package/dist/{command-augment-DdZIfx1V.mjs → command-augment-D9pI9Vbh.mjs} +0 -0
- /package/dist/{parameter-CiJ4CwWE.mjs → parameter-BZ6y-Gfs.mjs} +0 -0
- /package/dist/{render-BTKnWL0d.mjs → render-CkuFkWlQ.mjs} +0 -0
- /package/dist/{transform-job-CtixL4An.mjs → transform-job-B5x8aYfV.mjs} +0 -0
- /package/dist/{transform-tag-rsIrckCM.mjs → transform-tag-BRwfWeHf.mjs} +0 -0
package/README.md
CHANGED
|
@@ -52,16 +52,19 @@ Against a server older than v62 the CLI detects the missing OAuth support and fa
|
|
|
52
52
|
|
|
53
53
|
On success the server is probed once — the rendered output shows the user, role (`Admin`/`User`), and Metabase version, and the same values are cached in `<configDir>/profiles.json` so later commands skip re-probing. Failure of either the auth probe (`/api/user/current`) or the server probe (`/api/session/properties`) rejects the login; an existing profile keeps its last-known-good credential and gains a `lastFailure` entry.
|
|
54
54
|
|
|
55
|
-
| Flag | Description
|
|
56
|
-
| ------------------------ |
|
|
57
|
-
| `--url <url>` | Metabase URL, including any subpath if the instance is hosted under one (`https://my.org.com/metabase`). Falls back to `MB_URL`, then prompts.
|
|
58
|
-
| `--api-key <value>` | API key. Skips the browser flow. Visible in shell history — pipe on stdin instead.
|
|
59
|
-
| `--client-id <id>` | Pre-registered OAuth client id (only needed when dynamic client registration is disabled on the server).
|
|
60
|
-
| `--profile <name>`, `-p` | Profile to write to (default: `default`).
|
|
61
|
-
| `--skip-verify` | Save without contacting the server (no probe, no cache).
|
|
55
|
+
| Flag | Description |
|
|
56
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `--url <url>` | Metabase URL, including any subpath if the instance is hosted under one (`https://my.org.com/metabase`). Falls back to `MB_URL`, then prompts. |
|
|
58
|
+
| `--api-key <value>` | API key. Skips the browser flow. Visible in shell history — pipe on stdin instead. |
|
|
59
|
+
| `--client-id <id>` | Pre-registered OAuth client id (only needed when dynamic client registration is disabled on the server). |
|
|
60
|
+
| `--profile <name>`, `-p` | Profile to write to (default: `default`). |
|
|
61
|
+
| `--skip-verify` | Save without contacting the server (no probe, no cache). |
|
|
62
|
+
| `--workspace` | Request a workspace-manager-scoped login: the stored token can only manage workspaces — every other endpoint 403s server-side. Browser OAuth only (an API key cannot carry a scope), so it requires a TTY and refuses `--api-key`/`MB_API_KEY`. Requires a server advertising the `mb:workspace-manager` scope. |
|
|
62
63
|
|
|
63
64
|
Non-interactive (non-TTY) login requires an API key; resolution order: `--api-key` → piped stdin → `MB_API_KEY` (first non-empty wins). Without one, non-interactive login fails rather than prompting.
|
|
64
65
|
|
|
66
|
+
A workspace-scoped profile that hits a 403 on a content command gets an error naming the scope and the fix (re-login without `--workspace`, or use a workspace profile) instead of a bare "Forbidden."
|
|
67
|
+
|
|
65
68
|
```sh
|
|
66
69
|
mb auth login # interactive: browser or API key
|
|
67
70
|
echo "$MB_KEY" | mb auth login --url https://m.example.com
|
|
@@ -328,11 +331,11 @@ mb transform-tag delete 5 --yes
|
|
|
328
331
|
|
|
329
332
|
## Databases
|
|
330
333
|
|
|
331
|
-
Read warehouse metadata from `/api/database`. The `db` group exposes the full database list, the per-database record, schema and table inspection, the two manual-sync triggers
|
|
334
|
+
Read warehouse metadata from `/api/database`. The `db` group exposes the full database list, the per-database record with optional table/field hydration, schema and table inspection, and the two manual-sync triggers.
|
|
332
335
|
|
|
333
336
|
`db` is aliased to `database`.
|
|
334
337
|
|
|
335
|
-
> **Agent traversal
|
|
338
|
+
> **Agent traversal — the hydration ladder:** start with `db get <db-id> --include tables`, the compact table map (id, name, schema, description per table) — one call that fits most databases. Pick the relevant tables, then fetch fields per table with `table fields <table-id>` (bounded: a table has at most a few hundred fields). `--include tables.fields` is the full rollup — small databases only. When output outgrows the `--max-bytes` cap, the error message names the next command down the ladder. On warehouses with hundreds of tables, traverse by schema (`db schemas <db-id>` → `db schema-tables <db-id> <schema>`) or find tables by name (`mb search <term> --models table --db-id <db-id>`).
|
|
336
339
|
|
|
337
340
|
### `mb db list`
|
|
338
341
|
|
|
@@ -340,34 +343,26 @@ Read warehouse metadata from `/api/database`. The `db` group exposes the full da
|
|
|
340
343
|
mb db list
|
|
341
344
|
mb db list --json
|
|
342
345
|
mb db list --saved --json
|
|
343
|
-
mb db list --include tables --
|
|
346
|
+
mb db list --include tables --json # every db with its compact table map
|
|
344
347
|
```
|
|
345
348
|
|
|
346
|
-
| Flag | Description
|
|
347
|
-
| ------------------- |
|
|
348
|
-
| `--include <which>` | Hydrate related entities. Currently only `tables` is supported (each database is returned with its `tables`).
|
|
349
|
-
| `--saved` | Include the Saved Questions virtual database in the list. The virtual db has id `-1337` and no `engine`.
|
|
349
|
+
| Flag | Description |
|
|
350
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
351
|
+
| `--include <which>` | Hydrate related entities. Currently only `tables` is supported (each database is returned with its compact `tables`). To map a single warehouse, prefer `db get <id> --include tables`. |
|
|
352
|
+
| `--saved` | Include the Saved Questions virtual database in the list. The virtual db has id `-1337` and no `engine`. |
|
|
350
353
|
|
|
351
354
|
### `mb db get <id>`
|
|
352
355
|
|
|
353
356
|
```sh
|
|
354
357
|
mb db get 1
|
|
355
358
|
mb db get 1 --json
|
|
356
|
-
mb db get 1 --include tables --
|
|
357
|
-
mb db get 1 --include tables.fields --
|
|
359
|
+
mb db get 1 --include tables --json # + compact table map (fits most databases)
|
|
360
|
+
mb db get 1 --include tables.fields --json # + every field of every table (small databases only)
|
|
358
361
|
```
|
|
359
362
|
|
|
360
|
-
| Flag | Description
|
|
361
|
-
| ------------------- |
|
|
362
|
-
| `--include <which>` | Hydrate related entities.
|
|
363
|
-
|
|
364
|
-
### `mb db metadata <id>`
|
|
365
|
-
|
|
366
|
-
Equivalent to `GET /api/database/:id/metadata`: a single database with all its tables and fields rolled up in one response. This is the largest read in the `db` group — on a real warehouse the response will exceed the agent context. Use only when you know the database is small (a seeded dev instance, a sample db, a freshly-bootstrapped test fixture). For agent-driven introspection on a real warehouse, walk `db schemas` → `db schema-tables` → `table get --include fields` instead.
|
|
367
|
-
|
|
368
|
-
```sh
|
|
369
|
-
mb db metadata 1 --json --full --max-bytes 0
|
|
370
|
-
```
|
|
363
|
+
| Flag | Description |
|
|
364
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
365
|
+
| `--include <which>` | Hydrate related entities. `tables` is the compact table map — the recommended first call for schema discovery. `tables.fields` is the full rollup and fits only small databases; on anything larger, take the map and fetch fields per table with `table fields <table-id>`, or traverse by schema (see above). |
|
|
371
366
|
|
|
372
367
|
### `mb db schemas <id>`
|
|
373
368
|
|
|
@@ -430,7 +425,7 @@ mb table list --db-id 1 --json
|
|
|
430
425
|
|
|
431
426
|
### `mb table get <id>`
|
|
432
427
|
|
|
433
|
-
Returns the basic table record (no fields). Pass `--include fields` to route through `/api/table/:id/query_metadata` so the response carries the table's columns compact-projected as `fields` — this is the default agent path for field introspection. Use `mb table fields <id>` if you only want the fields as a list envelope
|
|
428
|
+
Returns the basic table record (no fields). Pass `--include fields` to route through `/api/table/:id/query_metadata` so the response carries the table's columns compact-projected as `fields` — this is the default agent path for field introspection (the response also carries FK targets and dimensions under `--full`). Use `mb table fields <id>` if you only want the fields as a list envelope.
|
|
434
429
|
|
|
435
430
|
```sh
|
|
436
431
|
mb table get 42
|
|
@@ -451,14 +446,6 @@ mb table fields 42
|
|
|
451
446
|
mb table fields 42 --json
|
|
452
447
|
```
|
|
453
448
|
|
|
454
|
-
### `mb table metadata <id>`
|
|
455
|
-
|
|
456
|
-
`GET /api/table/:id/query_metadata`: the table with its fields, FKs, dimensions, segments, and measures all hydrated. Heavier than `table get --include fields` — reach for it only when you actually need the FK / dimension / segment / measure data.
|
|
457
|
-
|
|
458
|
-
```sh
|
|
459
|
-
mb table metadata 42 --json --full --max-bytes 0
|
|
460
|
-
```
|
|
461
|
-
|
|
462
449
|
### `mb table update <id>`
|
|
463
450
|
|
|
464
451
|
Patch a table (`PUT /api/table/:id`). Body fields: `display_name`, `description`, `caveats`, `points_of_interest`, `entity_type`, `visibility_type`, `field_order`, `show_in_getting_started`. Pass the body via `--body`, `--file`, or stdin (exactly one).
|
|
@@ -508,6 +495,43 @@ mb field update 100 --body '{"description":"customer email","semantic_type":"typ
|
|
|
508
495
|
mb field update 100 --file patch.json
|
|
509
496
|
```
|
|
510
497
|
|
|
498
|
+
## Upload
|
|
499
|
+
|
|
500
|
+
Load CSV/TSV data into the warehouse via `/api/upload`. Requires an uploads database configured on the server (Admin → Settings → Uploads); the destination db and schema are set there, not per-command. `append`/`replace` target a table created by a prior upload, and the CSV columns must match.
|
|
501
|
+
|
|
502
|
+
### `mb upload csv`
|
|
503
|
+
|
|
504
|
+
Create a new table plus a model over it from a CSV file. Prints the new model id and table id.
|
|
505
|
+
|
|
506
|
+
```sh
|
|
507
|
+
mb upload csv --file data.csv
|
|
508
|
+
mb upload csv --file data.csv --collection 5
|
|
509
|
+
mb upload csv --file data.csv --json
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
| Flag | Description |
|
|
513
|
+
| ------------------- | ---------------------------------------------------------------------- |
|
|
514
|
+
| `--file <path>` | Path to the CSV/TSV file to upload (required). |
|
|
515
|
+
| `--collection <id>` | Target collection id for the created model, or `root` (default: root). |
|
|
516
|
+
|
|
517
|
+
### `mb upload append <table-id>`
|
|
518
|
+
|
|
519
|
+
Insert a CSV file's rows into an existing uploaded table.
|
|
520
|
+
|
|
521
|
+
```sh
|
|
522
|
+
mb upload append 42 --file more-rows.csv
|
|
523
|
+
mb upload append 42 --file more-rows.csv --json
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### `mb upload replace <table-id>`
|
|
527
|
+
|
|
528
|
+
Replace an existing uploaded table's contents with a CSV file's rows.
|
|
529
|
+
|
|
530
|
+
```sh
|
|
531
|
+
mb upload replace 42 --file rows.csv
|
|
532
|
+
mb upload replace 42 --file rows.csv --json
|
|
533
|
+
```
|
|
534
|
+
|
|
511
535
|
## Cards
|
|
512
536
|
|
|
513
537
|
CRUD plus query execution on `/api/card`. A "card" is a Metabase question, model, or metric. The `query` subcommand runs the card and either returns Metabase's JSON envelope or streams a raw CSV / XLSX export.
|
|
@@ -898,6 +922,157 @@ mb measure archive 1 --revision-message "deprecated"
|
|
|
898
922
|
| --------------------------- | ------------------------------------------- |
|
|
899
923
|
| `--revision-message <text>` | Audit-log message recorded with the change. |
|
|
900
924
|
|
|
925
|
+
## Timelines
|
|
926
|
+
|
|
927
|
+
CRUD on `/api/timeline`. A timeline is a named collection of dated events rendered as annotations on time-series charts. Timelines live in collections (`collection_id: null` = root) and carry an icon (`star`, `cake`, `mail`, `warning`, `bell`, `cloud`).
|
|
928
|
+
|
|
929
|
+
### `mb timeline list`
|
|
930
|
+
|
|
931
|
+
```sh
|
|
932
|
+
mb timeline list
|
|
933
|
+
mb timeline list --json
|
|
934
|
+
mb timeline list --archived --json
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
| Flag | Description |
|
|
938
|
+
| ------------ | ----------------------------------------------- |
|
|
939
|
+
| `--archived` | Show archived timelines instead of active ones. |
|
|
940
|
+
|
|
941
|
+
### `mb timeline get <id>`
|
|
942
|
+
|
|
943
|
+
```sh
|
|
944
|
+
mb timeline get 1
|
|
945
|
+
mb timeline get 1 --json --full
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
### `mb timeline events <id>`
|
|
949
|
+
|
|
950
|
+
List the events on a timeline. Archived events are excluded unless `--archived` is passed (which returns both).
|
|
951
|
+
|
|
952
|
+
```sh
|
|
953
|
+
mb timeline events 1
|
|
954
|
+
mb timeline events 1 --archived --json
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
| Flag | Description |
|
|
958
|
+
| ------------ | ------------------------ |
|
|
959
|
+
| `--archived` | Include archived events. |
|
|
960
|
+
|
|
961
|
+
### `mb timeline create`
|
|
962
|
+
|
|
963
|
+
```sh
|
|
964
|
+
mb timeline create --body '{"name":"Releases"}'
|
|
965
|
+
cat timeline.json | mb timeline create
|
|
966
|
+
mb timeline create --file timeline.json
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
| Flag | Description |
|
|
970
|
+
| --------------- | ----------------------- |
|
|
971
|
+
| `--body <json>` | Inline JSON body. |
|
|
972
|
+
| `--file <path>` | Path to JSON body file. |
|
|
973
|
+
|
|
974
|
+
Body fields: `name` (required), `description` (optional), `icon` (optional, default `star`), `collection_id` (optional positive integer, omit for the root collection), `default` (optional boolean marking the collection's default timeline).
|
|
975
|
+
|
|
976
|
+
### `mb timeline update <id>`
|
|
977
|
+
|
|
978
|
+
Patch a timeline. Body is a partial subset of the create shape plus `archived`. Only the keys you send are touched. Changing `archived` cascades to every event on the timeline.
|
|
979
|
+
|
|
980
|
+
```sh
|
|
981
|
+
mb timeline update 1 --body '{"name":"Product releases"}'
|
|
982
|
+
cat patch.json | mb timeline update 1
|
|
983
|
+
mb timeline update 1 --file patch.json
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
| Flag | Description |
|
|
987
|
+
| --------------- | ----------------------- |
|
|
988
|
+
| `--body <json>` | Inline JSON body. |
|
|
989
|
+
| `--file <path>` | Path to JSON body file. |
|
|
990
|
+
|
|
991
|
+
### `mb timeline archive <id>`
|
|
992
|
+
|
|
993
|
+
Soft-delete a timeline (and, by server-side cascade, all its events) by setting `archived: true`. To unarchive use `mb timeline update <id> --body '{"archived":false}'`.
|
|
994
|
+
|
|
995
|
+
```sh
|
|
996
|
+
mb timeline archive 1
|
|
997
|
+
mb timeline archive 1 --json
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### `mb timeline delete <id>`
|
|
1001
|
+
|
|
1002
|
+
Permanently delete a timeline and all its events. Irreversible — prefer `mb timeline archive` unless you mean it. Prompts for confirmation on a TTY; requires `--yes` otherwise.
|
|
1003
|
+
|
|
1004
|
+
```sh
|
|
1005
|
+
mb timeline delete 1 --yes
|
|
1006
|
+
mb timeline delete 1
|
|
1007
|
+
```
|
|
1008
|
+
|
|
1009
|
+
| Flag | Description |
|
|
1010
|
+
| ------- | ------------------ |
|
|
1011
|
+
| `--yes` | Skip confirmation. |
|
|
1012
|
+
|
|
1013
|
+
## Timeline events
|
|
1014
|
+
|
|
1015
|
+
CRUD on `/api/timeline-event`. An event is a dated annotation on a timeline. There is no server-side list endpoint — list events with `mb timeline events <id>`.
|
|
1016
|
+
|
|
1017
|
+
### `mb timeline-event get <id>`
|
|
1018
|
+
|
|
1019
|
+
```sh
|
|
1020
|
+
mb timeline-event get 1
|
|
1021
|
+
mb timeline-event get 1 --json --full
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
### `mb timeline-event create`
|
|
1025
|
+
|
|
1026
|
+
```sh
|
|
1027
|
+
mb timeline-event create --body '{"name":"v2 launch","timestamp":"2026-07-01T00:00:00Z","timezone":"UTC","time_matters":false,"timeline_id":1}'
|
|
1028
|
+
cat event.json | mb timeline-event create
|
|
1029
|
+
mb timeline-event create --file event.json
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
| Flag | Description |
|
|
1033
|
+
| --------------- | ----------------------- |
|
|
1034
|
+
| `--body <json>` | Inline JSON body. |
|
|
1035
|
+
| `--file <path>` | Path to JSON body file. |
|
|
1036
|
+
|
|
1037
|
+
Body fields: `name` (required), `timestamp` (required, ISO 8601), `timezone` (required, IANA name like `UTC` or `America/New_York`), `time_matters` (required boolean — `true` when the time of day is significant, `false` when only the date is), `timeline_id` (required positive integer), `description` (optional), `icon` (optional, default: the timeline's icon).
|
|
1038
|
+
|
|
1039
|
+
### `mb timeline-event update <id>`
|
|
1040
|
+
|
|
1041
|
+
Patch an event. Body is a partial subset of the create shape plus `archived`. Only the keys you send are touched; `timeline_id` moves the event to another timeline.
|
|
1042
|
+
|
|
1043
|
+
```sh
|
|
1044
|
+
mb timeline-event update 1 --body '{"name":"v2.1 launch"}'
|
|
1045
|
+
cat patch.json | mb timeline-event update 1
|
|
1046
|
+
mb timeline-event update 1 --file patch.json
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
| Flag | Description |
|
|
1050
|
+
| --------------- | ----------------------- |
|
|
1051
|
+
| `--body <json>` | Inline JSON body. |
|
|
1052
|
+
| `--file <path>` | Path to JSON body file. |
|
|
1053
|
+
|
|
1054
|
+
### `mb timeline-event archive <id>`
|
|
1055
|
+
|
|
1056
|
+
Soft-delete an event by setting `archived: true`. To unarchive use `mb timeline-event update <id> --body '{"archived":false}'`.
|
|
1057
|
+
|
|
1058
|
+
```sh
|
|
1059
|
+
mb timeline-event archive 1
|
|
1060
|
+
mb timeline-event archive 1 --json
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
### `mb timeline-event delete <id>`
|
|
1064
|
+
|
|
1065
|
+
Permanently delete an event. Prompts for confirmation on a TTY; requires `--yes` otherwise.
|
|
1066
|
+
|
|
1067
|
+
```sh
|
|
1068
|
+
mb timeline-event delete 1 --yes
|
|
1069
|
+
mb timeline-event delete 1
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
| Flag | Description |
|
|
1073
|
+
| ------- | ------------------ |
|
|
1074
|
+
| `--yes` | Skip confirmation. |
|
|
1075
|
+
|
|
901
1076
|
## Collections
|
|
902
1077
|
|
|
903
1078
|
Read collections on `/api/collection`. Collections are the folders that contain cards, dashboards, and other collections. The list endpoint surfaces a virtual root collection (id `"root"`) alongside regular numeric ids; the get endpoint accepts only the numeric id.
|
|
@@ -1005,7 +1180,7 @@ mb library create --json
|
|
|
1005
1180
|
|
|
1006
1181
|
### `mb library publish`
|
|
1007
1182
|
|
|
1008
|
-
Publish tables (and their upstream dependencies) into the Library's Data collection (`POST /api/ee/data-studio/table/publish-tables`). The target Data collection is resolved automatically and the Library is created if it doesn't exist yet — there's no collection id to pass.
|
|
1183
|
+
Publish tables (and their upstream dependencies) into the Library's Data collection (`POST /api/ee/data-studio/table/publish-tables`). The target Data collection is resolved automatically and the Library is created if it doesn't exist yet — there's no collection id to pass. Publishing does not add the Data collection to the git-sync scope; on an instance with remote sync configured, the command warns on stderr with the `mb git-sync add-collection <id>` invocation that makes exports carry the published tables' metadata.
|
|
1009
1184
|
|
|
1010
1185
|
```sh
|
|
1011
1186
|
mb library publish --table-ids 1,2,3
|
|
@@ -1156,7 +1331,7 @@ Drive Metabase Enterprise Remote Sync (`/api/ee/remote-sync`) — import / expor
|
|
|
1156
1331
|
|
|
1157
1332
|
### `mb git-sync status`
|
|
1158
1333
|
|
|
1159
|
-
Roll up the current sync state in one call: configured branch, dirty flag,
|
|
1334
|
+
Roll up the current sync state in one call: configured branch, dirty flag, the most recent sync task (or `null` if none has ever run), and the collections marked for sync.
|
|
1160
1335
|
|
|
1161
1336
|
```sh
|
|
1162
1337
|
mb git-sync status
|
|
@@ -1315,6 +1490,64 @@ mb git-sync remove-collection 12
|
|
|
1315
1490
|
mb git-sync remove-collection 12 --json --profile prod
|
|
1316
1491
|
```
|
|
1317
1492
|
|
|
1493
|
+
## Workspaces
|
|
1494
|
+
|
|
1495
|
+
Lifecycle for EE workspaces via `/api/ee/workspace-manager` (Metabase v62+, `workspaces` premium feature). A workspace attaches databases and provisions warehouse isolation — a temporary schema + user per database — so work runs against real data without touching prod schemas. Alias: `mb ws`.
|
|
1496
|
+
|
|
1497
|
+
### `mb workspace list`
|
|
1498
|
+
|
|
1499
|
+
```sh
|
|
1500
|
+
mb workspace list
|
|
1501
|
+
mb workspace list --json
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1504
|
+
### `mb workspace get <id>`
|
|
1505
|
+
|
|
1506
|
+
Includes per-database provisioning status (`unprovisioned` | `provisioning` | `provisioned` | `deprovisioning`), input schemas, and the isolated output namespace.
|
|
1507
|
+
|
|
1508
|
+
```sh
|
|
1509
|
+
mb workspace get 1 --json
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
### `mb workspace create`
|
|
1513
|
+
|
|
1514
|
+
Creates the workspace and provisions isolation for each database (blocking). Each database must be eligible for workspaces (driver support + the `database-enable-workspaces` database setting).
|
|
1515
|
+
|
|
1516
|
+
```sh
|
|
1517
|
+
mb workspace create --name ws-reports --database-ids 1
|
|
1518
|
+
mb workspace create --name ws-etl --database-ids 1,2 --json
|
|
1519
|
+
mb workspace create --name transform-work --database-ids 1 --spawn
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
| Flag | Description |
|
|
1523
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
1524
|
+
| `--name <name>` | Workspace name. |
|
|
1525
|
+
| `--database-ids <ids>` | Database ids to attach, comma separated. |
|
|
1526
|
+
| `--spawn` | Also spawn a workspace Metabase; the returned credential is saved to the `ws-<id>` profile (never printed) and made the default. |
|
|
1527
|
+
| `--keep-existing-auth` | Proceed despite broader same-server credentials in the profile store. Interactive only — refused in non-interactive contexts. |
|
|
1528
|
+
|
|
1529
|
+
Before creating, the profile store is swept for broader credentials against the same server: any API key profile, or any OAuth profile wider than `mb:workspace-manager`. Interactive runs offer to revoke the offenders (local clear + best-effort server-side token revocation; API keys must additionally be deleted in Admin settings); non-interactive runs hard-refuse so an agent can't proceed while a full-power credential is in reach.
|
|
1530
|
+
|
|
1531
|
+
With `--spawn` the parent asks its instance manager for a workspace Metabase (`spawn_instance: true`) and the CLI consumes the returned `url` + `api_key`: the credential is written straight to the profile store as `ws-<id>` — never to stdout, `--json`, or an agent transcript — and that profile becomes the default, so bare `mb` targets the new workspace from then on (explicit `--profile`/`MB_PROFILE` still win). Destroying the workspace (or `mb auth logout` on the profile) unhooks the default again. Because an exported `MB_API_KEY` outranks stored profiles, `--spawn` refuses to run while it is set — it would silently shadow the profile it is about to install.
|
|
1532
|
+
|
|
1533
|
+
### `mb workspace destroy <id>`
|
|
1534
|
+
|
|
1535
|
+
Destroy is the only irreversible moment, so it closes the work-loss window first: when a local profile named `ws-<id>` exists, the child is checked for unsynced work (`remote-sync is-dirty`) and a dirty workspace is auto-exported to its target branch before teardown. `--discard` skips the check and the export; a machine without the workspace's profile warns and proceeds (destroy is the billing-stop lever — ops cleanup must work from anywhere), while a profile whose child can't be reached refuses without `--discard`.
|
|
1536
|
+
|
|
1537
|
+
Then each provisioned database's warehouse isolation is torn down and the workspace removed; the matching local profile is dropped on success. Prompts unless `--yes`. Refuses (409) while any database is still provisioning/deprovisioning unless `--ignore-pending`, which removes the records and leaves those warehouse objects behind; unreachable-warehouse leftovers are reported as `orphaned_resources`.
|
|
1538
|
+
|
|
1539
|
+
```sh
|
|
1540
|
+
mb workspace destroy 1 --yes
|
|
1541
|
+
mb workspace destroy 1 --yes --discard
|
|
1542
|
+
mb workspace destroy 1 --yes --ignore-pending
|
|
1543
|
+
```
|
|
1544
|
+
|
|
1545
|
+
| Flag | Description |
|
|
1546
|
+
| ------------------ | ----------------------------------------------------------------------- |
|
|
1547
|
+
| `--yes` | Skip confirmation. |
|
|
1548
|
+
| `--discard` | Destroy without exporting unsynced work (skips the is-dirty check). |
|
|
1549
|
+
| `--ignore-pending` | Remove workspace records even while databases are mid-(de)provisioning. |
|
|
1550
|
+
|
|
1318
1551
|
## Instance setup
|
|
1319
1552
|
|
|
1320
1553
|
Bootstrapping a fresh, not-yet-configured Metabase instance.
|
|
@@ -1397,7 +1630,7 @@ When the embedded query (`card.dataset_query`, `transform.source.query` for `sou
|
|
|
1397
1630
|
|
|
1398
1631
|
Pass `--skip-validate` to bypass the pre-flight on any of `card create`, `card update`, `transform create`, `transform update`, `measure create`, `measure update`, `segment create`, or `segment update` — the body is sent as-is and the server is the authority. Same escape hatch as on `mb query`; use only when the bundled schema disagrees with what the server actually accepts.
|
|
1399
1632
|
|
|
1400
|
-
Agent discovery path: `mb
|
|
1633
|
+
Agent discovery path: `mb <command> --help --json` lists a command's args, JSON-body input schema, and output schema; the description for `card create`/`update`, `transform create`/`update`, `measure create`/`update`, and `segment create`/`update` references `mb query --print-schema` so an agent can fetch the validating schema directly.
|
|
1401
1634
|
|
|
1402
1635
|
The bundled query schema is synced from a pinned `@metabase/representations` release via `bun run sync:representations`; CI guards against drift.
|
|
1403
1636
|
|
|
@@ -1488,7 +1721,7 @@ mb skills path # absolute paths for direct Read
|
|
|
1488
1721
|
mb skills path core # one path
|
|
1489
1722
|
```
|
|
1490
1723
|
|
|
1491
|
-
`mb skills get` honors the shared `--max-bytes` list cap. With the default
|
|
1724
|
+
`mb skills get` honors the shared `--max-bytes` list cap. With the default 24 576 cap, `--all` will return only the first skill and emit a truncation notice — pass `--max-bytes 0` to dump every skill in one envelope.
|
|
1492
1725
|
|
|
1493
1726
|
Bundled skills:
|
|
1494
1727
|
|
|
@@ -1515,7 +1748,7 @@ Exit codes: `0` success, `2` `ConfigError` (missing name, unknown name, `MB_SKIL
|
|
|
1515
1748
|
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1516
1749
|
| `MB_URL` | Default URL for `auth login` and config resolution. |
|
|
1517
1750
|
| `MB_API_KEY` | Default API key (makes `auth login` non-interactive, skipping the browser flow; not stored). |
|
|
1518
|
-
| `MB_PROFILE` | Default profile when `--profile` is omitted. Falls back to `default`.
|
|
1751
|
+
| `MB_PROFILE` | Default profile when `--profile` is omitted. Falls back to the stored default pointer (set by `workspace create --spawn`), then `default`. |
|
|
1519
1752
|
| `MB_VERBOSE` | When set to `1`, prints structured developer-detail JSON to stderr on failure. |
|
|
1520
1753
|
| `MB_CLI_SKIP_PREFLIGHT` | When set to `1`, bypasses the per-command server version / token-feature preflight check. Escape hatch for patched Metabase builds; can mask real compatibility problems. |
|
|
1521
1754
|
| `MB_CLI_DISABLE_KEYRING` | When set to `1`, skips the OS keychain and stores credentials as plaintext in the profiles file. |
|
|
@@ -1525,15 +1758,20 @@ The former `METABASE_`-prefixed names (`METABASE_URL`, `METABASE_API_KEY`, `META
|
|
|
1525
1758
|
|
|
1526
1759
|
## Agent integration
|
|
1527
1760
|
|
|
1528
|
-
###
|
|
1761
|
+
### `--help --json`
|
|
1762
|
+
|
|
1763
|
+
Every node of the command tree answers `--help --json` with machine-readable help, mirroring what text help shows at that level:
|
|
1529
1764
|
|
|
1530
|
-
|
|
1765
|
+
- A leaf command emits its full entry — name, description, `details`, examples, citty args with types/defaults/enums, `capabilities` (min server version / token feature), and the input and output Zod schemas rendered as JSON Schema (`inputSchema` is the exact validator `readBody` enforces on the JSON body, `null` for commands that take none).
|
|
1766
|
+
- A command group (and the root) emits a flat `{ commands: [{ command, description }] }` index of every leaf in its subtree, with full-path names.
|
|
1531
1767
|
|
|
1532
1768
|
```sh
|
|
1533
|
-
mb
|
|
1769
|
+
mb --help --json | jq -r '.commands[].command' # every command
|
|
1770
|
+
mb card query --help --json | jq .outputSchema # one command's output schema
|
|
1771
|
+
mb card create --help --json | jq .inputSchema # the JSON-body contract it validates
|
|
1534
1772
|
```
|
|
1535
1773
|
|
|
1536
|
-
The
|
|
1774
|
+
The entry and index schemas (`CommandHelpEntry`, `CommandHelpIndex`) are exported from `src/runtime/command-help.ts`.
|
|
1537
1775
|
|
|
1538
1776
|
## Exit codes
|
|
1539
1777
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./parse-id-xS1tWJAq.mjs";
|
|
5
|
+
import "./poll-CuTlWBwI.mjs";
|
|
6
|
+
import "./poll-task-DhsYs8Hx.mjs";
|
|
7
|
+
import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CLXfrgp4.mjs";
|
|
8
|
+
|
|
9
|
+
export { add_collection_default as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { connectionFlags, outputFlags, profileFlag } from "./
|
|
2
|
-
import { defineMetabaseCommand } from "./runtime-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { REMOTE_SYNC_PATHS } from "./poll-task-NQNLT_aA.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
3
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
4
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-DhsYs8Hx.mjs";
|
|
6
5
|
import { z } from "zod";
|
|
7
6
|
|
|
8
7
|
//#region src/commands/git-sync/add-collection.ts
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./input-BGyHn0Kr.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
6
|
+
import { UploadUpdateResult, readCsvFile, requireUploadFilePath, updateTableFromCsv, uploadUpdateResultView } from "./requests-DYrDe-D0.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/upload/append.ts
|
|
9
|
+
var append_default = defineMetabaseCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "append",
|
|
12
|
+
description: "Append a CSV file's rows to an existing uploaded table"
|
|
13
|
+
},
|
|
14
|
+
details: "Inserts the rows of the CSV into the table with the given id. The table must have been created by a CSV upload and the CSV columns must match.",
|
|
15
|
+
capabilities: { minVersion: 58 },
|
|
16
|
+
args: {
|
|
17
|
+
...outputFlags,
|
|
18
|
+
...profileFlag,
|
|
19
|
+
...connectionFlags,
|
|
20
|
+
file: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Path to the CSV/TSV file to upload"
|
|
23
|
+
},
|
|
24
|
+
id: {
|
|
25
|
+
type: "positional",
|
|
26
|
+
description: "Target table id",
|
|
27
|
+
required: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
outputSchema: UploadUpdateResult,
|
|
31
|
+
examples: ["mb upload append 42 --file more-rows.csv", "mb upload append 42 --file more-rows.csv --json"],
|
|
32
|
+
async run({ args, ctx, getClient }) {
|
|
33
|
+
const id = parseId(args.id);
|
|
34
|
+
const file = await readCsvFile(requireUploadFilePath(args.file));
|
|
35
|
+
const client = await getClient();
|
|
36
|
+
const result = await updateTableFromCsv(client, id, "append", file);
|
|
37
|
+
renderSummary(result, uploadUpdateResultView, `Appended "${file.filename}" into table ${id}.`, ctx);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { append_default as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
5
|
+
import { Timeline, timelineView } from "./timeline-DEaiuB5V.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/commands/timeline/archive.ts
|
|
8
|
+
var archive_default = defineMetabaseCommand({
|
|
9
|
+
meta: {
|
|
10
|
+
name: "archive",
|
|
11
|
+
description: "Archive (soft-delete) a timeline and all its events by id"
|
|
12
|
+
},
|
|
13
|
+
capabilities: { minVersion: 58 },
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
id: {
|
|
19
|
+
type: "positional",
|
|
20
|
+
description: "Timeline id",
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
outputSchema: Timeline,
|
|
25
|
+
examples: ["mb timeline archive 1", "mb timeline archive 1 --json"],
|
|
26
|
+
async run({ args, ctx, getClient }) {
|
|
27
|
+
const id = parseId(args.id);
|
|
28
|
+
const client = await getClient();
|
|
29
|
+
const updated = await client.requestParsed(Timeline, `/api/timeline/${id}`, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: { archived: true }
|
|
32
|
+
});
|
|
33
|
+
renderSummary(updated, timelineView, `Archived timeline ${updated.id} "${updated.name}".`, ctx);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { archive_default as default };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
-
import { Collection, collectionView } from "./collection-DrLpA1SO.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
5
|
+
import { Collection, collectionView } from "./collection-C52Ndi_O.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/collection/archive.ts
|
|
10
8
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
|
|
6
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
7
5
|
import { revisionMessageFlag } from "./revision-message-flag-CHrJgFFx.mjs";
|
|
8
|
-
import { Segment, segmentView } from "./segment-
|
|
6
|
+
import { Segment, segmentView } from "./segment-CxRYEXeO.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/segment/archive.ts
|
|
11
9
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import "./embedding-CKdw8q7p.mjs";
|
|
5
|
+
import "./field-DsXTeqBy.mjs";
|
|
6
|
+
import "./parameter-BZ6y-Gfs.mjs";
|
|
7
|
+
import { Card, cardView } from "./card-B8G5jQQT.mjs";
|
|
8
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/card/archive.ts
|
|
12
11
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
7
|
-
import { Document, documentView } from "./document-1W7NRaO_.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-CiaAfUgX.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-C6ASrgVA.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-xS1tWJAq.mjs";
|
|
5
|
+
import { Document, documentView } from "./document-D4zB-5a0.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/document/archive.ts
|
|
10
8
|
var archive_default = defineMetabaseCommand({
|