@metabase/cli 0.1.18 → 0.2.1
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 +212 -35
- package/dist/add-collection-C8ZTPlIE.mjs +9 -0
- package/dist/{add-collection-CRZAFCZy.mjs → add-collection-CUBn11d4.mjs} +4 -5
- package/dist/append-BgDaYJW9.mjs +42 -0
- package/dist/{archive-3mEhK9_H.mjs → archive-BCPA0HhV.mjs} +6 -8
- package/dist/{archive-De4yVEV8.mjs → archive-BM9HjJHQ.mjs} +5 -7
- package/dist/{archive-CFHYRF65.mjs → archive-BZpXnQSu.mjs} +5 -7
- package/dist/{archive-C3RWdM-2.mjs → archive-BncW2dGw.mjs} +7 -8
- package/dist/archive-Bv59HYsU.mjs +38 -0
- package/dist/{archive-d74nDcp4.mjs → archive-Czzktgho.mjs} +5 -7
- package/dist/{archive-errg-EKw.mjs → archive-DFCu5hVG.mjs} +6 -8
- package/dist/archive-EoYl-lS-.mjs +38 -0
- package/dist/{archive-Z8ZM-ilB.mjs → archive-Oh1iZu2y.mjs} +8 -9
- package/dist/auth-hgAnMUfi.mjs +22 -0
- package/dist/{body-BS2s2zDl.mjs → body-DKcQw7G5.mjs} +3 -3
- package/dist/{branches-mcyT7wI-.mjs → branches-CCmtr3W8.mjs} +5 -7
- package/dist/{cancel-B2l-i2NS.mjs → cancel-72y10-Rg.mjs} +4 -6
- package/dist/{cancel-task-CugcIeIi.mjs → cancel-task-CGwdz91O.mjs} +5 -7
- package/dist/capabilities-DOTcPraV.mjs +684 -0
- package/dist/{card-DEmcRlNO.mjs → card-B8G5jQQT.mjs} +24 -18
- package/dist/card-Ct-q_C4S.mjs +26 -0
- package/dist/{cards-BGkz5BeZ.mjs → cards-CYSyvN7Z.mjs} +7 -8
- package/dist/cli.mjs +177 -29
- package/dist/{collection-DrLpA1SO.mjs → collection-CFoLPrY5.mjs} +1 -1
- package/dist/collection-K82kJWdj.mjs +23 -0
- package/dist/{collection-namespace-BP_LJrAD.mjs → collection-namespace-C7mr_a8H.mjs} +2 -2
- package/dist/{create-CD9Rp8qs.mjs → create-7pbf5Wu0.mjs} +14 -14
- package/dist/{create-DzyMvAVy.mjs → create-BDY38_Kr.mjs} +8 -9
- package/dist/create-Brh8WCa3.mjs +45 -0
- package/dist/{create-DhrftYre.mjs → create-C3DThF9E.mjs} +14 -14
- package/dist/{create-B4HAEEE0.mjs → create-CPEOSxIH.mjs} +8 -9
- package/dist/{create-YfGzANNB.mjs → create-C_WqoOf5.mjs} +8 -9
- package/dist/{create-wpvDXSSY.mjs → create-CaWFrPRU.mjs} +12 -13
- package/dist/{create-Cztp5kES.mjs → create-DFyZCXQD.mjs} +5 -7
- package/dist/{create-BOmmMSjF.mjs → create-E7XhC0gJ.mjs} +11 -12
- package/dist/{create-kWzqvTGR.mjs → create-QYctYGSa.mjs} +11 -12
- package/dist/create-U_XDwsIX.mjs +45 -0
- package/dist/{create-branch-DsoMfx_2.mjs → create-branch-DPE6itiS.mjs} +5 -7
- package/dist/{create-D8KA4zJA.mjs → create-nXlnVzXl.mjs} +9 -10
- package/dist/{create-CkRFKtFG.mjs → create-pTnveKkm.mjs} +8 -9
- package/dist/csv-CR2qhmC6.mjs +58 -0
- package/dist/{current-task-WuKPZpZ6.mjs → current-task-MUHaiHIg.mjs} +5 -7
- package/dist/{dashboard-DOplbKyQ.mjs → dashboard-B-MTpfeS.mjs} +35 -15
- package/dist/dashboard-B1iRSUBI.mjs +35 -0
- package/dist/{database-D9fftP-i.mjs → database-CIbVSfua.mjs} +2 -2
- package/dist/db-eWy7A-H3.mjs +27 -0
- package/dist/{delete-Buai0_e_.mjs → delete-B58Cng0p.mjs} +6 -8
- package/dist/{delete-CmGh0jo1.mjs → delete-BKMOtpjs.mjs} +6 -8
- package/dist/delete-BMa26SzX.mjs +49 -0
- package/dist/delete-CW3dYmuT.mjs +49 -0
- package/dist/{delete-BCitmugk.mjs → delete-doa3R-c5.mjs} +6 -8
- package/dist/{delete-runtime-B0ha5QR4.mjs → delete-runtime-_YOukDRC.mjs} +2 -3
- package/dist/{delete-table-BOkYxdjA.mjs → delete-table-D_tjBZPd.mjs} +6 -8
- package/dist/{dependencies-XZrEvHUA.mjs → dependencies-BR_4um7h.mjs} +5 -7
- package/dist/{dirty-B-5NDbG9.mjs → dirty-BKCg6oVN.mjs} +5 -7
- package/dist/{document-1W7NRaO_.mjs → document-CL4ML5FN.mjs} +20 -4
- package/dist/document-CVxhTnUD.mjs +22 -0
- package/dist/{eid-BCuJRv7a.mjs → eid-DSOk7Khb.mjs} +10 -11
- package/dist/embedding-CKdw8q7p.mjs +11 -0
- package/dist/events-Dxm7me47.mjs +44 -0
- package/dist/{export-Dod2gdyE.mjs → export-Gb_wfZpt.mjs} +7 -9
- package/dist/field-BTCw6voJ.mjs +21 -0
- package/dist/{field-CMY_LWUe.mjs → field-DsXTeqBy.mjs} +6 -4
- package/dist/{fields-B0yttrzR.mjs → fields-hZeq6IF2.mjs} +6 -8
- package/dist/{get-9p0Gt1c7.mjs → get--rGDVyje.mjs} +5 -7
- package/dist/get-43Smv3RI.mjs +67 -0
- package/dist/{get-k6M5nGMC.mjs → get-7Np_G2je.mjs} +5 -7
- package/dist/{get-BkGh9BPd.mjs → get-BSdOE5J4.mjs} +5 -7
- package/dist/{get-B0OsW6jk.mjs → get-CHAH_F37.mjs} +5 -7
- package/dist/{get-DBY5esTW.mjs → get-CH_JmPc-.mjs} +5 -7
- package/dist/{get-CbpHt4Hs.mjs → get-CP3lrIYi.mjs} +5 -7
- package/dist/{get-CfeYa0v5.mjs → get-CgZ5qjQx.mjs} +5 -7
- package/dist/get-CuPCE_AG.mjs +35 -0
- package/dist/{get-DJ8huA8y.mjs → get-DB6Y9igl.mjs} +7 -8
- package/dist/{get-D7QMqPOK.mjs → get-DRK5-UdU.mjs} +5 -7
- package/dist/{get-D-pNrQGA.mjs → get-DT2MOZ8L.mjs} +5 -7
- package/dist/{get-BpZ81hX8.mjs → get-DWzMR8sn.mjs} +5 -7
- package/dist/{get-Dz7fcqoG.mjs → get-DZatHVdn.mjs} +8 -9
- package/dist/{get-u5Uq9vms.mjs → get-DtvzjfjG.mjs} +4 -6
- package/dist/get-T85qZgnv.mjs +35 -0
- package/dist/{get-DISgP66L.mjs → get-nZW0W7Ui.mjs} +16 -9
- package/dist/{get-run-DQJVpDw1.mjs → get-run-Cwia6e0d.mjs} +5 -7
- package/dist/git-sync-Cjrx2meo.mjs +31 -0
- package/dist/{group-BNE_RiH5.mjs → group-CILtQqCL.mjs} +2 -1
- package/dist/{has-remote-changes-DvQBXudi.mjs → has-remote-changes-CIIib71u.mjs} +5 -7
- package/dist/{import-PGS8-DwE.mjs → import-D9ID9Mz4.mjs} +7 -9
- package/dist/{input-7Sj85_K7.mjs → input-DzbvxKYU.mjs} +6 -3
- package/dist/{is-dirty-DyEVFQVJ.mjs → is-dirty-CHbUJ-bh.mjs} +3 -4
- package/dist/is-dirty-DY5Zhsbk.mjs +8 -0
- package/dist/{items-CkFEy2Du.mjs → items-DN63mjpF.mjs} +7 -9
- package/dist/{key-bltP32Pm.mjs → key-BnGRTX8U.mjs} +1 -1
- package/dist/{library-1AAVbk-K.mjs → library-DF2qx50w.mjs} +6 -6
- package/dist/{list-Bb8YRON_.mjs → list-B1sdMz6m.mjs} +4 -6
- package/dist/{list-BBxRjuMn.mjs → list-B3HoSfYj.mjs} +4 -6
- package/dist/{list-Sgo3RfDY.mjs → list-BSxMFDMR.mjs} +4 -6
- package/dist/list-BeqcZVSn.mjs +39 -0
- package/dist/{list-CK0p7vvK.mjs → list-C0344yqi.mjs} +5 -7
- package/dist/{list-82NkvRpI.mjs → list-C5Ir-96z.mjs} +7 -8
- package/dist/{list-CJx5q-Yn.mjs → list-C6YpaUpC.mjs} +6 -8
- package/dist/{list-CKzpoTgP.mjs → list-C7TqbWG1.mjs} +6 -8
- package/dist/{list-BWAYDSbQ.mjs → list-CQN2BpaW.mjs} +4 -6
- package/dist/{list-BY4S32Lg.mjs → list-CY-jpBNE.mjs} +4 -6
- package/dist/{list-BCYTTCFD.mjs → list-CkTsOOA7.mjs} +4 -6
- package/dist/{list-BVzu2RIZ.mjs → list-CvS68tLn.mjs} +4 -6
- package/dist/{list-CjF12k1G.mjs → list-De82cXvn.mjs} +5 -7
- package/dist/{list-B9wXg3qi.mjs → list-KDHLmoUx.mjs} +4 -6
- package/dist/{list-pQ22nXhQ.mjs → list-MqqHcBvD.mjs} +4 -6
- package/dist/{list-D-rgDFa5.mjs → list-n2PY3OIx.mjs} +8 -9
- package/dist/{login-C6ZAnGHz.mjs → login-jy9rbYev.mjs} +8 -10
- package/dist/{logout-CWjyY3Y8.mjs → logout-CRbk1SuY.mjs} +4 -6
- package/dist/measure-CPqisgyf.mjs +25 -0
- package/dist/{measure-DoJvtCaA.mjs → measure-S9WszHre.mjs} +5 -4
- package/dist/{parameter-values-DmDOuE-j.mjs → parameter-values-CcgcG3S5.mjs} +5 -7
- package/dist/{parse-enum-BL9i_brN.mjs → parse-enum-C_2lGr3g.mjs} +1 -1
- package/dist/{parse-id-DlXnOcmP.mjs → parse-id-CD54Chc5.mjs} +1 -1
- package/dist/{parse-ref-CB_KvF9h.mjs → parse-ref-BLgKEEF-.mjs} +1 -1
- package/dist/{path-D8IJ4YrW.mjs → path-CPMr1RJO.mjs} +4 -6
- package/dist/{poll-hgnrHBoh.mjs → poll-DVF9EnEb.mjs} +2 -2
- package/dist/{poll-task-NQNLT_aA.mjs → poll-task-CpHGQOd5.mjs} +2 -2
- package/dist/{preflight-DvaPQHHf.mjs → preflight-xhwEOHAt.mjs} +4 -5
- package/dist/{process-j8UHMHc2.mjs → process-HDPKLS_z.mjs} +1 -1
- package/dist/{prompt-C85xd9HR.mjs → prompt-BgkWNgIR.mjs} +1 -1
- package/dist/{publish-BntmFR6g.mjs → publish-xVPABwE8.mjs} +7 -9
- package/dist/{query-DSKQZu91.mjs → query-B3HDIsJ-.mjs} +15 -15
- package/dist/{query-BQfgKV68.mjs → query-Cxh9hmrP.mjs} +9 -10
- package/dist/{query-result-D6mfoVfQ.mjs → query-result-Drvjv7DD.mjs} +1 -1
- package/dist/{remove-collection-BguaI3-6.mjs → remove-collection-_a4uIlLB.mjs} +7 -9
- package/dist/replace-BwvKDNur.mjs +42 -0
- package/dist/requests-qyh002pL.mjs +96 -0
- package/dist/{rescan-values-DjD6IW3J.mjs → rescan-values-Bd0Joerq.mjs} +7 -9
- package/dist/{resolve-Dj2MTBkn.mjs → resolve-Ct084wx3.mjs} +1 -1
- package/dist/{run-RQfQj7Rk.mjs → run-BfpKUjqL.mjs} +7 -9
- package/dist/{run-Bp1yxkBN.mjs → run-yrpSF6VL.mjs} +4 -6
- package/dist/{runs-CSsatfWb.mjs → runs-D_08Ma08.mjs} +6 -8
- package/dist/{runtime-oxjmrYoP.mjs → runtime-Ab96yYlM.mjs} +3 -4
- package/dist/{schema-tables-5I5pCxHl.mjs → schema-tables-ChBYz4mO.mjs} +6 -8
- package/dist/{schemas-CfzFCfBt.mjs → schemas-C2crnVML.mjs} +4 -6
- package/dist/{search-Vo-BqliA.mjs → search-DnGEh6sZ.mjs} +4 -6
- package/dist/{segment-TXktTCfU.mjs → segment-BPb1H6DW.mjs} +6 -5
- package/dist/segment-DyVTZSIM.mjs +25 -0
- package/dist/{selectors-DBnJsKlW.mjs → selectors-Ll_TRxl5.mjs} +3 -3
- package/dist/{set-active-C0mUZlNN.mjs → set-active-qqDoBh_Z.mjs} +4 -6
- package/dist/{set-1Vh0AF-T.mjs → set-tHsHXRGV.mjs} +10 -10
- package/dist/setting-B9xSyMf6.mjs +20 -0
- package/dist/{setup-CzYFvFK5.mjs → setup-CXGcyTuv.mjs} +11 -12
- package/dist/{skills-B6gfH0iR.mjs → skills-BKuiGkc1.mjs} +1 -1
- package/dist/{skills-CR2xyV33.mjs → skills-rnvVgau4.mjs} +3 -3
- package/dist/snippet-C4h-GMUf.mjs +22 -0
- package/dist/{snippet-CtA2Pkoa.mjs → snippet-DWiXNy4T.mjs} +7 -4
- package/dist/{stash-CQHXwBu_.mjs → stash-DxmpBS7x.mjs} +7 -9
- package/dist/{status-C_7aqTvB.mjs → status-B5ar0uXc.mjs} +4 -6
- package/dist/{status-DXQkM18v.mjs → status-D5CR1SrS.mjs} +6 -8
- package/dist/{summary-1aNpQc8j.mjs → summary-BEEJl2O1.mjs} +5 -7
- package/dist/{sync-schema-BqLp5uTS.mjs → sync-schema-B5HDpmrp.mjs} +9 -11
- package/dist/{table-DE3i82T_.mjs → table-C3RIKiYM.mjs} +16 -4
- package/dist/table-DHmaW3Ec.mjs +21 -0
- package/dist/timeline-B0R6-dm8.mjs +24 -0
- package/dist/timeline-BCTRThc-.mjs +157 -0
- package/dist/timeline-event-BVDTt-pM.mjs +22 -0
- package/dist/{transform-DEF38FWe.mjs → transform-BVHYzWpK.mjs} +31 -5
- package/dist/transform-Cq2_muWO.mjs +31 -0
- package/dist/transform-job-BpebgMnq.mjs +25 -0
- package/dist/transform-tag-B1xnFa9w.mjs +21 -0
- package/dist/{transforms-BelyllUL.mjs → transforms-CLkv3e81.mjs} +5 -7
- package/dist/{tree-YvmwGql7.mjs → tree-CB2IURsX.mjs} +4 -6
- package/dist/{unpublish-CHjGLMu9.mjs → unpublish-BkZldbkP.mjs} +5 -7
- package/dist/update-8bTrglfc.mjs +52 -0
- package/dist/{update-BnHYSu96.mjs → update-B1dkPypu.mjs} +13 -14
- package/dist/{update-BACl_bJS.mjs → update-B4atxTx0.mjs} +9 -10
- package/dist/{update-C9fndCqb.mjs → update-BHC3pwzR.mjs} +9 -10
- package/dist/{update-BWlN3QDo.mjs → update-BacyVaLu.mjs} +9 -10
- package/dist/{update-BKhekuqr.mjs → update-BghbOcv6.mjs} +15 -15
- package/dist/{update-Zz01Woxj.mjs → update-CGWTX1Z0.mjs} +9 -10
- package/dist/{update-D7vc8GBF.mjs → update-CO9uCJxV.mjs} +12 -13
- package/dist/{update-txUfAJxy.mjs → update-Cyxjg496.mjs} +9 -10
- package/dist/{update-CrRz47aj.mjs → update-D7Ia9Qrt.mjs} +15 -15
- package/dist/{update-BGMJTpA6.mjs → update-D80GWpWl.mjs} +12 -13
- package/dist/update-DajyWtBN.mjs +52 -0
- package/dist/{update-dashcard-Dvth-yLC.mjs → update-dashcard-DLq7ihNO.mjs} +11 -11
- package/dist/{update-K-jjQ0Aw.mjs → update-iY9WZqy0.mjs} +10 -11
- package/dist/{upgrade-DsXlfPef.mjs → upgrade-CXoNQ4FH.mjs} +5 -7
- package/dist/upload-D3eiApa0.mjs +16 -0
- package/dist/{uuid-ByJmWV7b.mjs → uuid-D6dao_q4.mjs} +3 -5
- package/dist/{validate-BqNW4Sk1.mjs → validate-Cqa14t7o.mjs} +1 -2
- package/dist/{validate-query-CcZVKYPV.mjs → validate-query-D1N30wJ7.mjs} +2 -3
- package/dist/{values-CIjJI4sz.mjs → values-DIBAgSyz.mjs} +5 -7
- package/dist/{verify-Jsuc2dat.mjs → verify-DvhZWmS2.mjs} +2 -2
- package/dist/{wait-5ltTFvSa.mjs → wait-CW1OawkI.mjs} +6 -8
- package/dist/{wait-flags-D6kd_G7c.mjs → wait-flags-DvNU8ahZ.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +30 -22
- package/skill-data/dashboard/SKILL.md +26 -3
- package/skill-data/data-workflow/SKILL.md +17 -15
- 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/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/{paginate-FVZUxL4J.mjs → paginate-CMqbqhMC.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/{revision-message-flag-CHrJgFFx.mjs → revision-message-flag-CHzX0cqV.mjs} +0 -0
- /package/dist/{setting-m46MUtW5.mjs → setting-Cko6bE_w.mjs} +0 -0
- /package/dist/{transform-job-CtixL4An.mjs → transform-job-CjsAXMej.mjs} +0 -0
- /package/dist/{transform-tag-rsIrckCM.mjs → transform-tag--IBQ-8Ij.mjs} +0 -0
package/README.md
CHANGED
|
@@ -328,11 +328,11 @@ mb transform-tag delete 5 --yes
|
|
|
328
328
|
|
|
329
329
|
## Databases
|
|
330
330
|
|
|
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
|
|
331
|
+
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
332
|
|
|
333
333
|
`db` is aliased to `database`.
|
|
334
334
|
|
|
335
|
-
> **Agent traversal
|
|
335
|
+
> **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
336
|
|
|
337
337
|
### `mb db list`
|
|
338
338
|
|
|
@@ -340,34 +340,26 @@ Read warehouse metadata from `/api/database`. The `db` group exposes the full da
|
|
|
340
340
|
mb db list
|
|
341
341
|
mb db list --json
|
|
342
342
|
mb db list --saved --json
|
|
343
|
-
mb db list --include tables --
|
|
343
|
+
mb db list --include tables --json # every db with its compact table map
|
|
344
344
|
```
|
|
345
345
|
|
|
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`.
|
|
346
|
+
| Flag | Description |
|
|
347
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
348
|
+
| `--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`. |
|
|
349
|
+
| `--saved` | Include the Saved Questions virtual database in the list. The virtual db has id `-1337` and no `engine`. |
|
|
350
350
|
|
|
351
351
|
### `mb db get <id>`
|
|
352
352
|
|
|
353
353
|
```sh
|
|
354
354
|
mb db get 1
|
|
355
355
|
mb db get 1 --json
|
|
356
|
-
mb db get 1 --include tables --
|
|
357
|
-
mb db get 1 --include tables.fields --
|
|
356
|
+
mb db get 1 --include tables --json # + compact table map (fits most databases)
|
|
357
|
+
mb db get 1 --include tables.fields --json # + every field of every table (small databases only)
|
|
358
358
|
```
|
|
359
359
|
|
|
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
|
-
```
|
|
360
|
+
| Flag | Description |
|
|
361
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
362
|
+
| `--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
363
|
|
|
372
364
|
### `mb db schemas <id>`
|
|
373
365
|
|
|
@@ -430,7 +422,7 @@ mb table list --db-id 1 --json
|
|
|
430
422
|
|
|
431
423
|
### `mb table get <id>`
|
|
432
424
|
|
|
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
|
|
425
|
+
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
426
|
|
|
435
427
|
```sh
|
|
436
428
|
mb table get 42
|
|
@@ -451,14 +443,6 @@ mb table fields 42
|
|
|
451
443
|
mb table fields 42 --json
|
|
452
444
|
```
|
|
453
445
|
|
|
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
446
|
### `mb table update <id>`
|
|
463
447
|
|
|
464
448
|
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 +492,43 @@ mb field update 100 --body '{"description":"customer email","semantic_type":"typ
|
|
|
508
492
|
mb field update 100 --file patch.json
|
|
509
493
|
```
|
|
510
494
|
|
|
495
|
+
## Upload
|
|
496
|
+
|
|
497
|
+
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.
|
|
498
|
+
|
|
499
|
+
### `mb upload csv`
|
|
500
|
+
|
|
501
|
+
Create a new table plus a model over it from a CSV file. Prints the new model id and table id.
|
|
502
|
+
|
|
503
|
+
```sh
|
|
504
|
+
mb upload csv --file data.csv
|
|
505
|
+
mb upload csv --file data.csv --collection 5
|
|
506
|
+
mb upload csv --file data.csv --json
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
| Flag | Description |
|
|
510
|
+
| ------------------- | ---------------------------------------------------------------------- |
|
|
511
|
+
| `--file <path>` | Path to the CSV/TSV file to upload (required). |
|
|
512
|
+
| `--collection <id>` | Target collection id for the created model, or `root` (default: root). |
|
|
513
|
+
|
|
514
|
+
### `mb upload append <table-id>`
|
|
515
|
+
|
|
516
|
+
Insert a CSV file's rows into an existing uploaded table.
|
|
517
|
+
|
|
518
|
+
```sh
|
|
519
|
+
mb upload append 42 --file more-rows.csv
|
|
520
|
+
mb upload append 42 --file more-rows.csv --json
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### `mb upload replace <table-id>`
|
|
524
|
+
|
|
525
|
+
Replace an existing uploaded table's contents with a CSV file's rows.
|
|
526
|
+
|
|
527
|
+
```sh
|
|
528
|
+
mb upload replace 42 --file rows.csv
|
|
529
|
+
mb upload replace 42 --file rows.csv --json
|
|
530
|
+
```
|
|
531
|
+
|
|
511
532
|
## Cards
|
|
512
533
|
|
|
513
534
|
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 +919,157 @@ mb measure archive 1 --revision-message "deprecated"
|
|
|
898
919
|
| --------------------------- | ------------------------------------------- |
|
|
899
920
|
| `--revision-message <text>` | Audit-log message recorded with the change. |
|
|
900
921
|
|
|
922
|
+
## Timelines
|
|
923
|
+
|
|
924
|
+
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`).
|
|
925
|
+
|
|
926
|
+
### `mb timeline list`
|
|
927
|
+
|
|
928
|
+
```sh
|
|
929
|
+
mb timeline list
|
|
930
|
+
mb timeline list --json
|
|
931
|
+
mb timeline list --archived --json
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
| Flag | Description |
|
|
935
|
+
| ------------ | ----------------------------------------------- |
|
|
936
|
+
| `--archived` | Show archived timelines instead of active ones. |
|
|
937
|
+
|
|
938
|
+
### `mb timeline get <id>`
|
|
939
|
+
|
|
940
|
+
```sh
|
|
941
|
+
mb timeline get 1
|
|
942
|
+
mb timeline get 1 --json --full
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### `mb timeline events <id>`
|
|
946
|
+
|
|
947
|
+
List the events on a timeline. Archived events are excluded unless `--archived` is passed (which returns both).
|
|
948
|
+
|
|
949
|
+
```sh
|
|
950
|
+
mb timeline events 1
|
|
951
|
+
mb timeline events 1 --archived --json
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
| Flag | Description |
|
|
955
|
+
| ------------ | ------------------------ |
|
|
956
|
+
| `--archived` | Include archived events. |
|
|
957
|
+
|
|
958
|
+
### `mb timeline create`
|
|
959
|
+
|
|
960
|
+
```sh
|
|
961
|
+
mb timeline create --body '{"name":"Releases"}'
|
|
962
|
+
cat timeline.json | mb timeline create
|
|
963
|
+
mb timeline create --file timeline.json
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
| Flag | Description |
|
|
967
|
+
| --------------- | ----------------------- |
|
|
968
|
+
| `--body <json>` | Inline JSON body. |
|
|
969
|
+
| `--file <path>` | Path to JSON body file. |
|
|
970
|
+
|
|
971
|
+
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).
|
|
972
|
+
|
|
973
|
+
### `mb timeline update <id>`
|
|
974
|
+
|
|
975
|
+
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.
|
|
976
|
+
|
|
977
|
+
```sh
|
|
978
|
+
mb timeline update 1 --body '{"name":"Product releases"}'
|
|
979
|
+
cat patch.json | mb timeline update 1
|
|
980
|
+
mb timeline update 1 --file patch.json
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
| Flag | Description |
|
|
984
|
+
| --------------- | ----------------------- |
|
|
985
|
+
| `--body <json>` | Inline JSON body. |
|
|
986
|
+
| `--file <path>` | Path to JSON body file. |
|
|
987
|
+
|
|
988
|
+
### `mb timeline archive <id>`
|
|
989
|
+
|
|
990
|
+
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}'`.
|
|
991
|
+
|
|
992
|
+
```sh
|
|
993
|
+
mb timeline archive 1
|
|
994
|
+
mb timeline archive 1 --json
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
### `mb timeline delete <id>`
|
|
998
|
+
|
|
999
|
+
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.
|
|
1000
|
+
|
|
1001
|
+
```sh
|
|
1002
|
+
mb timeline delete 1 --yes
|
|
1003
|
+
mb timeline delete 1
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
| Flag | Description |
|
|
1007
|
+
| ------- | ------------------ |
|
|
1008
|
+
| `--yes` | Skip confirmation. |
|
|
1009
|
+
|
|
1010
|
+
## Timeline events
|
|
1011
|
+
|
|
1012
|
+
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>`.
|
|
1013
|
+
|
|
1014
|
+
### `mb timeline-event get <id>`
|
|
1015
|
+
|
|
1016
|
+
```sh
|
|
1017
|
+
mb timeline-event get 1
|
|
1018
|
+
mb timeline-event get 1 --json --full
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
### `mb timeline-event create`
|
|
1022
|
+
|
|
1023
|
+
```sh
|
|
1024
|
+
mb timeline-event create --body '{"name":"v2 launch","timestamp":"2026-07-01T00:00:00Z","timezone":"UTC","time_matters":false,"timeline_id":1}'
|
|
1025
|
+
cat event.json | mb timeline-event create
|
|
1026
|
+
mb timeline-event create --file event.json
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
| Flag | Description |
|
|
1030
|
+
| --------------- | ----------------------- |
|
|
1031
|
+
| `--body <json>` | Inline JSON body. |
|
|
1032
|
+
| `--file <path>` | Path to JSON body file. |
|
|
1033
|
+
|
|
1034
|
+
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).
|
|
1035
|
+
|
|
1036
|
+
### `mb timeline-event update <id>`
|
|
1037
|
+
|
|
1038
|
+
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.
|
|
1039
|
+
|
|
1040
|
+
```sh
|
|
1041
|
+
mb timeline-event update 1 --body '{"name":"v2.1 launch"}'
|
|
1042
|
+
cat patch.json | mb timeline-event update 1
|
|
1043
|
+
mb timeline-event update 1 --file patch.json
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
| Flag | Description |
|
|
1047
|
+
| --------------- | ----------------------- |
|
|
1048
|
+
| `--body <json>` | Inline JSON body. |
|
|
1049
|
+
| `--file <path>` | Path to JSON body file. |
|
|
1050
|
+
|
|
1051
|
+
### `mb timeline-event archive <id>`
|
|
1052
|
+
|
|
1053
|
+
Soft-delete an event by setting `archived: true`. To unarchive use `mb timeline-event update <id> --body '{"archived":false}'`.
|
|
1054
|
+
|
|
1055
|
+
```sh
|
|
1056
|
+
mb timeline-event archive 1
|
|
1057
|
+
mb timeline-event archive 1 --json
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
### `mb timeline-event delete <id>`
|
|
1061
|
+
|
|
1062
|
+
Permanently delete an event. Prompts for confirmation on a TTY; requires `--yes` otherwise.
|
|
1063
|
+
|
|
1064
|
+
```sh
|
|
1065
|
+
mb timeline-event delete 1 --yes
|
|
1066
|
+
mb timeline-event delete 1
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
| Flag | Description |
|
|
1070
|
+
| ------- | ------------------ |
|
|
1071
|
+
| `--yes` | Skip confirmation. |
|
|
1072
|
+
|
|
901
1073
|
## Collections
|
|
902
1074
|
|
|
903
1075
|
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.
|
|
@@ -1397,7 +1569,7 @@ When the embedded query (`card.dataset_query`, `transform.source.query` for `sou
|
|
|
1397
1569
|
|
|
1398
1570
|
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
1571
|
|
|
1400
|
-
Agent discovery path: `mb
|
|
1572
|
+
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
1573
|
|
|
1402
1574
|
The bundled query schema is synced from a pinned `@metabase/representations` release via `bun run sync:representations`; CI guards against drift.
|
|
1403
1575
|
|
|
@@ -1488,7 +1660,7 @@ mb skills path # absolute paths for direct Read
|
|
|
1488
1660
|
mb skills path core # one path
|
|
1489
1661
|
```
|
|
1490
1662
|
|
|
1491
|
-
`mb skills get` honors the shared `--max-bytes` list cap. With the default
|
|
1663
|
+
`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
1664
|
|
|
1493
1665
|
Bundled skills:
|
|
1494
1666
|
|
|
@@ -1525,15 +1697,20 @@ The former `METABASE_`-prefixed names (`METABASE_URL`, `METABASE_API_KEY`, `META
|
|
|
1525
1697
|
|
|
1526
1698
|
## Agent integration
|
|
1527
1699
|
|
|
1528
|
-
###
|
|
1700
|
+
### `--help --json`
|
|
1701
|
+
|
|
1702
|
+
Every node of the command tree answers `--help --json` with machine-readable help, mirroring what text help shows at that level:
|
|
1529
1703
|
|
|
1530
|
-
|
|
1704
|
+
- 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).
|
|
1705
|
+
- A command group (and the root) emits a flat `{ commands: [{ command, description }] }` index of every leaf in its subtree, with full-path names.
|
|
1531
1706
|
|
|
1532
1707
|
```sh
|
|
1533
|
-
mb
|
|
1708
|
+
mb --help --json | jq -r '.commands[].command' # every command
|
|
1709
|
+
mb card query --help --json | jq .outputSchema # one command's output schema
|
|
1710
|
+
mb card create --help --json | jq .inputSchema # the JSON-body contract it validates
|
|
1534
1711
|
```
|
|
1535
1712
|
|
|
1536
|
-
The
|
|
1713
|
+
The entry and index schemas (`CommandHelpEntry`, `CommandHelpIndex`) are exported from `src/runtime/command-help.ts`.
|
|
1537
1714
|
|
|
1538
1715
|
## Exit codes
|
|
1539
1716
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import "./poll-DVF9EnEb.mjs";
|
|
6
|
+
import "./poll-task-CpHGQOd5.mjs";
|
|
7
|
+
import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CUBn11d4.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-DOTcPraV.mjs";
|
|
2
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
3
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
4
|
+
import { REMOTE_SYNC_PATHS } from "./poll-task-CpHGQOd5.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-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./input-DzbvxKYU.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
6
|
+
import { UploadUpdateResult, readCsvFile, requireUploadFilePath, updateTableFromCsv, uploadUpdateResultView } from "./requests-qyh002pL.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 };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { revisionMessageFlag } from "./revision-message-flag-CHrJgFFx.mjs";
|
|
8
|
-
import { Segment, segmentView } from "./segment-TXktTCfU.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { revisionMessageFlag } from "./revision-message-flag-CHzX0cqV.mjs";
|
|
6
|
+
import { Segment, segmentView } from "./segment-BPb1H6DW.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/segment/archive.ts
|
|
11
9
|
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 { Collection, collectionView } from "./collection-DrLpA1SO.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { Collection, collectionView } from "./collection-CFoLPrY5.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/collection/archive.ts
|
|
10
8
|
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 { Snippet, snippetView } from "./snippet-CtA2Pkoa.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { Snippet, snippetView } from "./snippet-DWiXNy4T.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/snippet/archive.ts
|
|
10
8
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import { Dashboard, dashboardView } from "./dashboard-DOplbKyQ.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import "./embedding-CKdw8q7p.mjs";
|
|
5
|
+
import "./parameter-BZ6y-Gfs.mjs";
|
|
6
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
7
|
+
import { Dashboard, dashboardView } from "./dashboard-B-MTpfeS.mjs";
|
|
9
8
|
|
|
10
9
|
//#region src/commands/dashboard/archive.ts
|
|
11
10
|
var archive_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { TimelineEvent, timelineEventView } from "./timeline-BCTRThc-.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/commands/timeline-event/archive.ts
|
|
8
|
+
var archive_default = defineMetabaseCommand({
|
|
9
|
+
meta: {
|
|
10
|
+
name: "archive",
|
|
11
|
+
description: "Archive (soft-delete) a timeline event by id"
|
|
12
|
+
},
|
|
13
|
+
capabilities: { minVersion: 58 },
|
|
14
|
+
args: {
|
|
15
|
+
...outputFlags,
|
|
16
|
+
...profileFlag,
|
|
17
|
+
...connectionFlags,
|
|
18
|
+
id: {
|
|
19
|
+
type: "positional",
|
|
20
|
+
description: "Timeline event id",
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
outputSchema: TimelineEvent,
|
|
25
|
+
examples: ["mb timeline-event archive 1", "mb timeline-event 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(TimelineEvent, `/api/timeline-event/${id}`, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body: { archived: true }
|
|
32
|
+
});
|
|
33
|
+
renderSummary(updated, timelineEventView, `Archived timeline event ${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 { Document, documentView } from "./document-1W7NRaO_.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { Document, documentView } from "./document-CL4ML5FN.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/document/archive.ts
|
|
10
8
|
var archive_default = defineMetabaseCommand({
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Measure, measureView } from "./measure-DoJvtCaA.mjs";
|
|
8
|
-
import { revisionMessageFlag } from "./revision-message-flag-CHrJgFFx.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { Measure, measureView } from "./measure-S9WszHre.mjs";
|
|
6
|
+
import { revisionMessageFlag } from "./revision-message-flag-CHzX0cqV.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/measure/archive.ts
|
|
11
9
|
var archive_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-CD54Chc5.mjs";
|
|
5
|
+
import { Timeline, timelineView } from "./timeline-BCTRThc-.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,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-DOTcPraV.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-Ab96yYlM.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-CD54Chc5.mjs";
|
|
10
9
|
|
|
11
10
|
//#region src/commands/card/archive.ts
|
|
12
11
|
var archive_default = defineMetabaseCommand({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-CILtQqCL.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/auth/index.ts
|
|
5
|
+
var auth_default = defineCommandGroup({
|
|
6
|
+
name: "auth",
|
|
7
|
+
description: "Authenticate against a Metabase instance",
|
|
8
|
+
defaultCommand: "login",
|
|
9
|
+
skills: [{
|
|
10
|
+
skill: "core",
|
|
11
|
+
purpose: "authentication and named profiles"
|
|
12
|
+
}],
|
|
13
|
+
subCommands: {
|
|
14
|
+
login: () => import("./login-jy9rbYev.mjs").then((m) => m.default),
|
|
15
|
+
status: () => import("./status-B5ar0uXc.mjs").then((m) => m.default),
|
|
16
|
+
list: () => import("./list-De82cXvn.mjs").then((m) => m.default),
|
|
17
|
+
logout: () => import("./logout-CRbk1SuY.mjs").then((m) => m.default)
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { auth_default as default };
|