@metabase/cli 0.1.18 → 0.2.0
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 +61 -35
- package/dist/{add-collection-CRZAFCZy.mjs → add-collection-BTSGp4f9.mjs} +4 -5
- package/dist/add-collection-DlAwt2Z3.mjs +9 -0
- package/dist/append-DY1-O789.mjs +42 -0
- package/dist/{archive-errg-EKw.mjs → archive-BOEEMrYL.mjs} +6 -8
- package/dist/{archive-3mEhK9_H.mjs → archive-CJ9rElKn.mjs} +6 -8
- package/dist/{archive-De4yVEV8.mjs → archive-CWtUzlHO.mjs} +5 -7
- package/dist/{archive-d74nDcp4.mjs → archive-DCPw3df6.mjs} +5 -7
- package/dist/{archive-CFHYRF65.mjs → archive-DOa1u1aJ.mjs} +5 -7
- package/dist/{archive-Z8ZM-ilB.mjs → archive-pHsa4dL0.mjs} +8 -9
- package/dist/{archive-C3RWdM-2.mjs → archive-w6TX-zEk.mjs} +7 -8
- package/dist/auth-BrQtY0pO.mjs +22 -0
- package/dist/{body-BS2s2zDl.mjs → body-C1_AaTS4.mjs} +3 -3
- package/dist/{branches-mcyT7wI-.mjs → branches-BsBzaGIf.mjs} +5 -7
- package/dist/{cancel-B2l-i2NS.mjs → cancel-BNM0yyx-.mjs} +4 -6
- package/dist/{cancel-task-CugcIeIi.mjs → cancel-task-Bggzn4JL.mjs} +5 -7
- package/dist/capabilities-DrDJo_ng.mjs +684 -0
- package/dist/{card-DEmcRlNO.mjs → card-B8G5jQQT.mjs} +24 -18
- package/dist/card-DHCcmpgr.mjs +26 -0
- package/dist/{cards-BGkz5BeZ.mjs → cards-D0hvA13L.mjs} +7 -8
- package/dist/cli.mjs +175 -29
- package/dist/{collection-DrLpA1SO.mjs → collection-CFoLPrY5.mjs} +1 -1
- package/dist/collection-D0O9gp3S.mjs +23 -0
- package/dist/{collection-namespace-BP_LJrAD.mjs → collection-namespace-DqPNrCdQ.mjs} +2 -2
- package/dist/{create-kWzqvTGR.mjs → create-05rX4oL-.mjs} +11 -12
- package/dist/{create-wpvDXSSY.mjs → create-BR7x66KW.mjs} +12 -13
- package/dist/{create-D8KA4zJA.mjs → create-C17Fh1_X.mjs} +9 -10
- package/dist/{create-DhrftYre.mjs → create-C8ndg3g4.mjs} +14 -14
- package/dist/{create-DzyMvAVy.mjs → create-CZ9KFnbi.mjs} +8 -9
- package/dist/{create-Cztp5kES.mjs → create-Cii_utzV.mjs} +5 -7
- package/dist/{create-CkRFKtFG.mjs → create-Cyv7vHV_.mjs} +8 -9
- package/dist/{create-YfGzANNB.mjs → create-DKuixGJ2.mjs} +8 -9
- package/dist/{create-B4HAEEE0.mjs → create-E6L3WMqV.mjs} +8 -9
- package/dist/{create-BOmmMSjF.mjs → create-a3s1S2Dw.mjs} +11 -12
- package/dist/{create-branch-DsoMfx_2.mjs → create-branch-Dxn6UnV_.mjs} +5 -7
- package/dist/{create-CD9Rp8qs.mjs → create-oLb0E-ZP.mjs} +14 -14
- package/dist/csv-T6_vlLJS.mjs +58 -0
- package/dist/{current-task-WuKPZpZ6.mjs → current-task-DxWbw-bU.mjs} +5 -7
- package/dist/{dashboard-DOplbKyQ.mjs → dashboard-B-MTpfeS.mjs} +35 -15
- package/dist/dashboard-BpSPoeAn.mjs +35 -0
- package/dist/{database-D9fftP-i.mjs → database-CIbVSfua.mjs} +2 -2
- package/dist/db-DBRijnh4.mjs +27 -0
- package/dist/{delete-Buai0_e_.mjs → delete--P1xFX37.mjs} +6 -8
- package/dist/{delete-CmGh0jo1.mjs → delete-BBOIUl0D.mjs} +6 -8
- package/dist/{delete-BCitmugk.mjs → delete-Ce2EBQYA.mjs} +6 -8
- package/dist/{delete-runtime-B0ha5QR4.mjs → delete-runtime-B-8I9V1g.mjs} +2 -3
- package/dist/{delete-table-BOkYxdjA.mjs → delete-table-Bj32NsXn.mjs} +6 -8
- package/dist/{dependencies-XZrEvHUA.mjs → dependencies-ixzjVjUz.mjs} +5 -7
- package/dist/{dirty-B-5NDbG9.mjs → dirty-CH70h5m5.mjs} +5 -7
- package/dist/{document-1W7NRaO_.mjs → document-CL4ML5FN.mjs} +20 -4
- package/dist/document-dZpuFu3I.mjs +22 -0
- package/dist/{eid-BCuJRv7a.mjs → eid-XjkBbyb_.mjs} +10 -11
- package/dist/embedding-CKdw8q7p.mjs +11 -0
- package/dist/{export-Dod2gdyE.mjs → export-CChMg-mL.mjs} +7 -9
- package/dist/field-B1heFeCz.mjs +21 -0
- package/dist/{field-CMY_LWUe.mjs → field-DsXTeqBy.mjs} +6 -4
- package/dist/{fields-B0yttrzR.mjs → fields-C7h2QwUp.mjs} +6 -8
- package/dist/{get-Dz7fcqoG.mjs → get-AvGH_oph.mjs} +8 -9
- package/dist/{get-BkGh9BPd.mjs → get-B6ZJCJ8H.mjs} +5 -7
- package/dist/{get-k6M5nGMC.mjs → get-BWHJDa0B.mjs} +5 -7
- package/dist/{get-CfeYa0v5.mjs → get-BsyccuCH.mjs} +5 -7
- package/dist/{get-B0OsW6jk.mjs → get-C98IFgFi.mjs} +5 -7
- package/dist/{get-D-pNrQGA.mjs → get-Cj90oyxG.mjs} +5 -7
- package/dist/{get-DBY5esTW.mjs → get-D9r2znrn.mjs} +5 -7
- package/dist/{get-BpZ81hX8.mjs → get-DRZENkCj.mjs} +5 -7
- package/dist/{get-D7QMqPOK.mjs → get-DWWmpQ87.mjs} +5 -7
- package/dist/{get-CbpHt4Hs.mjs → get-Dg1J0wxb.mjs} +5 -7
- package/dist/{get-DJ8huA8y.mjs → get-DrWYvefc.mjs} +7 -8
- package/dist/{get-u5Uq9vms.mjs → get-KVN9ANVh.mjs} +4 -6
- package/dist/get-RlP_xiUd.mjs +67 -0
- package/dist/{get-9p0Gt1c7.mjs → get-cyR67Lmq.mjs} +5 -7
- package/dist/{get-DISgP66L.mjs → get-kqY2lwhO.mjs} +16 -9
- package/dist/{get-run-DQJVpDw1.mjs → get-run-C4C_QQqO.mjs} +5 -7
- package/dist/git-sync-JHa7bIyY.mjs +31 -0
- package/dist/{group-BNE_RiH5.mjs → group-CILtQqCL.mjs} +2 -1
- package/dist/{has-remote-changes-DvQBXudi.mjs → has-remote-changes-dLUGr0MD.mjs} +5 -7
- package/dist/{import-PGS8-DwE.mjs → import-Byull6jF.mjs} +7 -9
- package/dist/{input-7Sj85_K7.mjs → input-m9ctfLxZ.mjs} +6 -3
- package/dist/is-dirty-Bb2dfEYs.mjs +8 -0
- package/dist/{is-dirty-DyEVFQVJ.mjs → is-dirty-CU3ovgdG.mjs} +3 -4
- package/dist/{items-CkFEy2Du.mjs → items-CEGDYWuF.mjs} +7 -9
- package/dist/{key-bltP32Pm.mjs → key-Ge4VwWvS.mjs} +1 -1
- package/dist/{library-1AAVbk-K.mjs → library-DHWWa4Tt.mjs} +6 -6
- package/dist/{list-Bb8YRON_.mjs → list-3z1ZChTG.mjs} +4 -6
- package/dist/{list-BY4S32Lg.mjs → list-B9TyELob.mjs} +4 -6
- package/dist/{list-Sgo3RfDY.mjs → list-BFm4iEBt.mjs} +4 -6
- package/dist/{list-BVzu2RIZ.mjs → list-BliCJAjt.mjs} +4 -6
- package/dist/{list-CKzpoTgP.mjs → list-Bpv06V24.mjs} +6 -8
- package/dist/{list-BWAYDSbQ.mjs → list-Br48kL09.mjs} +4 -6
- package/dist/{list-pQ22nXhQ.mjs → list-BtcpNl4-.mjs} +4 -6
- package/dist/{list-82NkvRpI.mjs → list-BuyRG3GB.mjs} +7 -8
- package/dist/{list-CjF12k1G.mjs → list-CMb03cv3.mjs} +5 -7
- package/dist/{list-BCYTTCFD.mjs → list-CmCJwaGT.mjs} +4 -6
- package/dist/{list-CK0p7vvK.mjs → list-Cur_72xZ.mjs} +5 -7
- package/dist/{list-D-rgDFa5.mjs → list-D9FY30xH.mjs} +8 -9
- package/dist/{list-BBxRjuMn.mjs → list-DEkPxVZu.mjs} +4 -6
- package/dist/{list-B9wXg3qi.mjs → list-O2w5xd1q.mjs} +4 -6
- package/dist/{list-CJx5q-Yn.mjs → list-th_Ym6Cv.mjs} +6 -8
- package/dist/{login-C6ZAnGHz.mjs → login-hKlYsAa1.mjs} +8 -10
- package/dist/{logout-CWjyY3Y8.mjs → logout-DO8GVC6b.mjs} +4 -6
- package/dist/measure-R3T20wnB.mjs +25 -0
- package/dist/{measure-DoJvtCaA.mjs → measure-S9WszHre.mjs} +5 -4
- package/dist/{parameter-values-DmDOuE-j.mjs → parameter-values-BJb2GuLz.mjs} +5 -7
- package/dist/{parse-enum-BL9i_brN.mjs → parse-enum-Cfne2suT.mjs} +1 -1
- package/dist/{parse-id-DlXnOcmP.mjs → parse-id-DfY0Lugw.mjs} +1 -1
- package/dist/{parse-ref-CB_KvF9h.mjs → parse-ref-C_MsXYI6.mjs} +1 -1
- package/dist/{path-D8IJ4YrW.mjs → path-DzhQVCH8.mjs} +4 -6
- package/dist/{poll-hgnrHBoh.mjs → poll-D1Yg78c3.mjs} +2 -2
- package/dist/{poll-task-NQNLT_aA.mjs → poll-task-DLUZaglY.mjs} +2 -2
- package/dist/{preflight-DvaPQHHf.mjs → preflight-Cy2jUSca.mjs} +4 -5
- package/dist/{process-j8UHMHc2.mjs → process-D5HN1wpT.mjs} +1 -1
- package/dist/{prompt-C85xd9HR.mjs → prompt-ZG9Drin_.mjs} +1 -1
- package/dist/{publish-BntmFR6g.mjs → publish-3hmHoaX-.mjs} +7 -9
- package/dist/{query-BQfgKV68.mjs → query-DTASj9Zu.mjs} +9 -10
- package/dist/{query-DSKQZu91.mjs → query-DkZViD_3.mjs} +15 -15
- package/dist/{query-result-D6mfoVfQ.mjs → query-result-CbTFdlSf.mjs} +1 -1
- package/dist/{remove-collection-BguaI3-6.mjs → remove-collection-D3wH9H6R.mjs} +7 -9
- package/dist/replace-CFzqkZXs.mjs +42 -0
- package/dist/requests-KBiY9UYy.mjs +96 -0
- package/dist/{rescan-values-DjD6IW3J.mjs → rescan-values-B1WycObS.mjs} +7 -9
- package/dist/{resolve-Dj2MTBkn.mjs → resolve-Ct084wx3.mjs} +1 -1
- package/dist/{run-Bp1yxkBN.mjs → run-B8qEEdC8.mjs} +4 -6
- package/dist/{run-RQfQj7Rk.mjs → run-cw0qTEQ7.mjs} +7 -9
- package/dist/{runs-CSsatfWb.mjs → runs-BOA4kK_X.mjs} +6 -8
- package/dist/{runtime-oxjmrYoP.mjs → runtime-B-c-Fc2i.mjs} +3 -4
- package/dist/{schema-tables-5I5pCxHl.mjs → schema-tables-DRYzSVcW.mjs} +6 -8
- package/dist/{schemas-CfzFCfBt.mjs → schemas-BiMjD25L.mjs} +4 -6
- package/dist/{search-Vo-BqliA.mjs → search-DjKxRXO5.mjs} +4 -6
- package/dist/{segment-TXktTCfU.mjs → segment-BPb1H6DW.mjs} +6 -5
- package/dist/segment-CZkk0g79.mjs +25 -0
- package/dist/{selectors-DBnJsKlW.mjs → selectors-B7MJUn3I.mjs} +3 -3
- package/dist/{set-active-C0mUZlNN.mjs → set-active-CF868qdW.mjs} +4 -6
- package/dist/{set-1Vh0AF-T.mjs → set-kyoORFG3.mjs} +10 -10
- package/dist/setting-BZgjURQ_.mjs +20 -0
- package/dist/{setup-CzYFvFK5.mjs → setup-D9joJYPb.mjs} +11 -12
- package/dist/{skills-B6gfH0iR.mjs → skills-BqI05u72.mjs} +1 -1
- package/dist/{skills-CR2xyV33.mjs → skills-D8NrJxjp.mjs} +3 -3
- package/dist/{snippet-CtA2Pkoa.mjs → snippet-DWiXNy4T.mjs} +7 -4
- package/dist/snippet-y_FzKxaQ.mjs +22 -0
- package/dist/{stash-CQHXwBu_.mjs → stash-BVMerTaF.mjs} +7 -9
- package/dist/{status-C_7aqTvB.mjs → status-C-0jFjFn.mjs} +4 -6
- package/dist/{status-DXQkM18v.mjs → status-x8bDOa1i.mjs} +6 -8
- package/dist/{summary-1aNpQc8j.mjs → summary-B-R9SdMF.mjs} +5 -7
- package/dist/{sync-schema-BqLp5uTS.mjs → sync-schema-wne2KXIW.mjs} +9 -11
- package/dist/{table-DE3i82T_.mjs → table-C3RIKiYM.mjs} +16 -4
- package/dist/table-CS2-2INi.mjs +21 -0
- package/dist/transform-6hqM1DXA.mjs +31 -0
- package/dist/{transform-DEF38FWe.mjs → transform-JQel7e5H.mjs} +31 -5
- package/dist/transform-job-DuERhLaj.mjs +25 -0
- package/dist/transform-tag-DaNKreDj.mjs +21 -0
- package/dist/{transforms-BelyllUL.mjs → transforms-DB2WNP2R.mjs} +5 -7
- package/dist/{tree-YvmwGql7.mjs → tree-BIOphGVs.mjs} +4 -6
- package/dist/{unpublish-CHjGLMu9.mjs → unpublish-BWM36ZTg.mjs} +5 -7
- package/dist/{update-BACl_bJS.mjs → update-6umfSz5t.mjs} +9 -10
- package/dist/{update-txUfAJxy.mjs → update-7Ts7KrB8.mjs} +9 -10
- package/dist/{update-D7vc8GBF.mjs → update-BCbv880u.mjs} +12 -13
- package/dist/{update-K-jjQ0Aw.mjs → update-BchtHlbH.mjs} +10 -11
- package/dist/{update-BGMJTpA6.mjs → update-BiUeEGU-.mjs} +12 -13
- package/dist/{update-BKhekuqr.mjs → update-BlzcZwRQ.mjs} +15 -15
- package/dist/{update-BnHYSu96.mjs → update-CTZg2Lia.mjs} +13 -14
- package/dist/{update-C9fndCqb.mjs → update-DJDuIhYG.mjs} +9 -10
- package/dist/{update-CrRz47aj.mjs → update-HxYcvpSq.mjs} +15 -15
- package/dist/{update-Zz01Woxj.mjs → update-Sz0QRGWB.mjs} +9 -10
- package/dist/{update-dashcard-Dvth-yLC.mjs → update-dashcard-CfDpy7Lz.mjs} +11 -11
- package/dist/{update-BWlN3QDo.mjs → update-zfLbmC-H.mjs} +9 -10
- package/dist/{upgrade-DsXlfPef.mjs → upgrade-BWl0VjMK.mjs} +5 -7
- package/dist/upload-CPzOhGeX.mjs +16 -0
- package/dist/{uuid-ByJmWV7b.mjs → uuid-D_YeqDui.mjs} +3 -5
- package/dist/{validate-BqNW4Sk1.mjs → validate-clAWO3X-.mjs} +1 -2
- package/dist/{validate-query-CcZVKYPV.mjs → validate-query-CsK2_2_u.mjs} +2 -3
- package/dist/{values-CIjJI4sz.mjs → values-DSk8ZJ3B.mjs} +5 -7
- package/dist/{verify-Jsuc2dat.mjs → verify-DkQdLjf3.mjs} +2 -2
- package/dist/{wait-5ltTFvSa.mjs → wait-DvSsMjea.mjs} +6 -8
- package/dist/{wait-flags-D6kd_G7c.mjs → wait-flags-dXGThljd.mjs} +2 -2
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +27 -21
- package/skill-data/dashboard/SKILL.md +26 -3
- package/skill-data/data-workflow/SKILL.md +17 -15
- 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-CtVziW85.mjs} +0 -0
- /package/dist/{transform-tag-rsIrckCM.mjs → transform-tag-wFiWmiyO.mjs} +0 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
10
|
-
import { TransformJob, TransformJobUpdateInput, transformJobView } from "./transform-job-CtixL4An.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import "./input-m9ctfLxZ.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
6
|
+
import { readBody } from "./body-C1_AaTS4.mjs";
|
|
7
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
8
|
+
import { TransformJob, TransformJobUpdateInput, transformJobView } from "./transform-job-CtVziW85.mjs";
|
|
11
9
|
|
|
12
10
|
//#region src/commands/transform-job/update.ts
|
|
13
11
|
var update_default = defineMetabaseCommand({
|
|
@@ -27,6 +25,7 @@ var update_default = defineMetabaseCommand({
|
|
|
27
25
|
required: true
|
|
28
26
|
}
|
|
29
27
|
},
|
|
28
|
+
inputSchema: TransformJobUpdateInput,
|
|
30
29
|
outputSchema: TransformJob,
|
|
31
30
|
examples: [
|
|
32
31
|
"cat patch.json | mb transform-job update 1",
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import "./validate-
|
|
14
|
-
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CcZVKYPV.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import "./input-m9ctfLxZ.mjs";
|
|
5
|
+
import "./embedding-CKdw8q7p.mjs";
|
|
6
|
+
import "./field-DsXTeqBy.mjs";
|
|
7
|
+
import "./parameter-BZ6y-Gfs.mjs";
|
|
8
|
+
import { Card, CardUpdateInput, cardView } from "./card-B8G5jQQT.mjs";
|
|
9
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
10
|
+
import { readBody } from "./body-C1_AaTS4.mjs";
|
|
11
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
12
|
+
import "./validate-clAWO3X-.mjs";
|
|
13
|
+
import { CARD_DATASET_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CsK2_2_u.mjs";
|
|
15
14
|
|
|
16
15
|
//#region src/commands/card/update.ts
|
|
17
16
|
var update_default = defineMetabaseCommand({
|
|
@@ -19,7 +18,7 @@ var update_default = defineMetabaseCommand({
|
|
|
19
18
|
name: "update",
|
|
20
19
|
description: "Update a card by id (partial)"
|
|
21
20
|
},
|
|
22
|
-
details: "Patches only the fields you send (any of `name`, `display`, `dataset_query`, `collection_id`, `archived`, …). When `dataset_query` is an MBQL 5 query it is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
|
|
21
|
+
details: "Patches only the fields you send (any of `name`, `display`, `dataset_query`, `collection_id`, `archived`, …). When `dataset_query` is an MBQL 5 query it is checked against a bundled JSON Schema (print it with `mb query --print-schema`) before sending; pass --skip-validate to bypass.",
|
|
23
22
|
skills: [{
|
|
24
23
|
skill: "mbql",
|
|
25
24
|
purpose: "author the dataset_query"
|
|
@@ -40,6 +39,7 @@ var update_default = defineMetabaseCommand({
|
|
|
40
39
|
required: true
|
|
41
40
|
}
|
|
42
41
|
},
|
|
42
|
+
inputSchema: CardUpdateInput,
|
|
43
43
|
outputSchema: Card,
|
|
44
44
|
examples: [
|
|
45
45
|
"cat patch.json | mb card update 1",
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
10
|
-
import { Snippet, SnippetUpdateInput, snippetView } from "./snippet-CtA2Pkoa.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import "./input-m9ctfLxZ.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
6
|
+
import { readBody } from "./body-C1_AaTS4.mjs";
|
|
7
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
8
|
+
import { Snippet, SnippetUpdateInput, snippetView } from "./snippet-DWiXNy4T.mjs";
|
|
11
9
|
|
|
12
10
|
//#region src/commands/snippet/update.ts
|
|
13
11
|
var update_default = defineMetabaseCommand({
|
|
@@ -27,6 +25,7 @@ var update_default = defineMetabaseCommand({
|
|
|
27
25
|
required: true
|
|
28
26
|
}
|
|
29
27
|
},
|
|
28
|
+
inputSchema: SnippetUpdateInput,
|
|
30
29
|
outputSchema: Snippet,
|
|
31
30
|
examples: [
|
|
32
31
|
"cat patch.json | mb snippet update 1",
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { DashboardDetail, Dashcard, DashcardPatchInput, dashcardView } from "./dashboard-DOplbKyQ.mjs";
|
|
1
|
+
import { ConfigError, connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import "./input-m9ctfLxZ.mjs";
|
|
5
|
+
import "./embedding-CKdw8q7p.mjs";
|
|
6
|
+
import "./parameter-BZ6y-Gfs.mjs";
|
|
7
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
8
|
+
import { readBody } from "./body-C1_AaTS4.mjs";
|
|
9
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
10
|
+
import { DashboardDetail, Dashcard, DashcardPatchInput, dashcardView } from "./dashboard-B-MTpfeS.mjs";
|
|
12
11
|
|
|
13
12
|
//#region src/commands/dashboard/update-dashcard.ts
|
|
14
13
|
var update_dashcard_default = defineMetabaseCommand({
|
|
@@ -33,6 +32,7 @@ var update_dashcard_default = defineMetabaseCommand({
|
|
|
33
32
|
required: true
|
|
34
33
|
}
|
|
35
34
|
},
|
|
35
|
+
inputSchema: DashcardPatchInput,
|
|
36
36
|
outputSchema: Dashcard,
|
|
37
37
|
examples: [
|
|
38
38
|
"mb dashboard update-dashcard 1 5 --body '{\"row\":2,\"col\":0}'",
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
|
|
10
|
-
import { TransformTag, TransformTagUpdateInput, transformTagView } from "./transform-tag-rsIrckCM.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import "./input-m9ctfLxZ.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
6
|
+
import { readBody } from "./body-C1_AaTS4.mjs";
|
|
7
|
+
import { bodyInputFlags } from "./body-flags-CgHgJBRC.mjs";
|
|
8
|
+
import { TransformTag, TransformTagUpdateInput, transformTagView } from "./transform-tag-wFiWmiyO.mjs";
|
|
11
9
|
|
|
12
10
|
//#region src/commands/transform-tag/update.ts
|
|
13
11
|
var update_default = defineMetabaseCommand({
|
|
@@ -27,6 +25,7 @@ var update_default = defineMetabaseCommand({
|
|
|
27
25
|
required: true
|
|
28
26
|
}
|
|
29
27
|
},
|
|
28
|
+
inputSchema: TransformTagUpdateInput,
|
|
30
29
|
outputSchema: TransformTag,
|
|
31
30
|
examples: [
|
|
32
31
|
"mb transform-tag update 5 --body '{\"name\":\"renamed\"}'",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { AbortError, NetworkError, TimeoutError, UnknownError, errorMessage } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { promptConfirm } from "./prompt-C85xd9HR.mjs";
|
|
7
|
-
import { streamProcess } from "./process-j8UHMHc2.mjs";
|
|
1
|
+
import { AbortError, NetworkError, TimeoutError, UnknownError, errorMessage, outputFlags, package_default, renderItem, writeText } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { HttpError, USER_AGENT, combineAborts, defineMetabaseCommand, parseJson, throwIfAborted } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import { promptConfirm } from "./prompt-ZG9Drin_.mjs";
|
|
5
|
+
import { streamProcess } from "./process-D5HN1wpT.mjs";
|
|
8
6
|
import { z } from "zod";
|
|
9
7
|
import { realpathSync } from "node:fs";
|
|
10
8
|
import { compare, valid } from "semver";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
2
|
+
import { defineCommandGroup } from "./group-CILtQqCL.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/upload/index.ts
|
|
5
|
+
var upload_default = defineCommandGroup({
|
|
6
|
+
name: "upload",
|
|
7
|
+
description: "Upload CSV files into Metabase",
|
|
8
|
+
subCommands: {
|
|
9
|
+
csv: () => import("./csv-T6_vlLJS.mjs").then((m) => m.default),
|
|
10
|
+
append: () => import("./append-DY1-O789.mjs").then((m) => m.default),
|
|
11
|
+
replace: () => import("./replace-CFzqkZXs.mjs").then((m) => m.default)
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { upload_default as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { defineMetabaseCommand, parseInteger } from "./runtime-oxjmrYoP.mjs";
|
|
5
|
-
import { writeJson, writeText } from "./capabilities-N0jo5U7S.mjs";
|
|
1
|
+
import { ConfigError, outputFlags, writeJson, writeText } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand, parseInteger } from "./runtime-B-c-Fc2i.mjs";
|
|
6
4
|
import { z } from "zod";
|
|
7
5
|
import { randomUUID } from "node:crypto";
|
|
8
6
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ConfigError, escapeJsonPointerSegment } from "./
|
|
2
|
-
import { isPlainObject } from "./capabilities-N0jo5U7S.mjs";
|
|
1
|
+
import { ConfigError, escapeJsonPointerSegment, isPlainObject } from "./capabilities-DrDJo_ng.mjs";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
import Ajv2020 from "ajv/dist/2020.js";
|
|
5
4
|
import addFormats from "ajv-formats";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ConfigError } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { assertNotLegacyEnvelopeWrappingMbql5, isMbql5Query, validateQuery } from "./validate-BqNW4Sk1.mjs";
|
|
1
|
+
import { ConfigError, writeJson } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import { assertNotLegacyEnvelopeWrappingMbql5, isMbql5Query, validateQuery } from "./validate-clAWO3X-.mjs";
|
|
4
3
|
|
|
5
4
|
//#region src/commands/validate-query.ts
|
|
6
5
|
const skipValidateFlag = { "skip-validate": {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { FieldValues, fieldValuesView } from "./field-CMY_LWUe.mjs";
|
|
7
|
-
import { parseId } from "./parse-id-DlXnOcmP.mjs";
|
|
1
|
+
import { connectionFlags, formatScalar, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import { FieldValues, fieldValuesView } from "./field-DsXTeqBy.mjs";
|
|
5
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/commands/field/values.ts
|
|
10
8
|
var values_default = defineMetabaseCommand({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MetabaseError, NetworkError, TimeoutError, errorMessage } from "./
|
|
2
|
-
import { HttpError, createClient, probeServer } from "./runtime-
|
|
1
|
+
import { MetabaseError, NetworkError, TimeoutError, errorMessage } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import { HttpError, createClient, probeServer } from "./runtime-B-c-Fc2i.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/domain/user.ts
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-hgnrHBoh.mjs";
|
|
8
|
-
import { SyncTaskOrIdle, formatSyncTask, pollSyncTask, syncTaskIdleView, syncTaskView, throwIfFailedTask } from "./poll-task-NQNLT_aA.mjs";
|
|
1
|
+
import { connectionFlags, outputFlags, profileFlag, renderSummary } from "./capabilities-DrDJo_ng.mjs";
|
|
2
|
+
import "./command-augment-D9pI9Vbh.mjs";
|
|
3
|
+
import { defineMetabaseCommand } from "./runtime-B-c-Fc2i.mjs";
|
|
4
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
5
|
+
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-D1Yg78c3.mjs";
|
|
6
|
+
import { SyncTaskOrIdle, formatSyncTask, pollSyncTask, syncTaskIdleView, syncTaskView, throwIfFailedTask } from "./poll-task-DLUZaglY.mjs";
|
|
9
7
|
|
|
10
8
|
//#region src/commands/git-sync/wait.ts
|
|
11
9
|
const WaitResult = SyncTaskOrIdle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseId } from "./parse-id-
|
|
2
|
-
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-
|
|
1
|
+
import { parseId } from "./parse-id-DfY0Lugw.mjs";
|
|
2
|
+
import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-D1Yg78c3.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/commands/wait-flags.ts
|
|
5
5
|
const waitScheduleFlags = {
|
package/package.json
CHANGED
package/skill-data/core/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: core
|
|
3
|
-
description: Foundations for driving Metabase from the terminal with the `mb` CLI — authentication and named profiles, the flag/output/`--json` conventions every command shares, JSON body input, command discovery via `
|
|
3
|
+
description: Foundations for driving Metabase from the terminal with the `mb` CLI — authentication and named profiles, the flag/output/`--json` conventions every command shares, JSON body input, command discovery via `--help` (add `--json` for machine-readable schemas), and the per-resource footguns (db, table, field, upload, card, dashboard, collection, segment, measure, library, setting, search, eid). Load first for any `mb` task; it routes to the specialized skills for deeper work.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,11 +11,11 @@ The official Metabase CLI (`mb`) drives a Metabase instance over its REST API: a
|
|
|
11
11
|
Top-level command groups (run `mb <group> --help` to discover verbs):
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
auth | db | table | field | query | card | dashboard | snippet | segment | measure | collection | library
|
|
14
|
+
auth | db | table | field | upload | query | card | dashboard | snippet | segment | measure | collection | library
|
|
15
15
|
document | transform | transform-job | transform-tag | setting | search | git-sync | setup | eid | uuid | upgrade | skills
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The conventions below — auth, flags, output, body input — hold across **every** group. Per-command flags
|
|
18
|
+
The conventions below — auth, flags, output, body input — hold across **every** group. Per-command flags and examples live in each command's `--help`; add `--json` for the machine-readable form with the output JSON Schema. A few flows have their own skills (see "Specialized skills"). When a card needs a query, prefer MBQL over native SQL (portable, pre-flight-validated — load `mbql`); fall back to native SQL when MBQL can't express it.
|
|
19
19
|
|
|
20
20
|
## Auth & profiles
|
|
21
21
|
|
|
@@ -59,22 +59,25 @@ Every list/get verb supports the same output flags:
|
|
|
59
59
|
- `--json` — emit the full JSON envelope, safe for `jq`. Default is human-readable text.
|
|
60
60
|
- `--full` — include every field (the compact projection is the default, and is the agent-facing contract).
|
|
61
61
|
- `--fields a,b.c.d` — project specific dot-paths. Mutually exclusive with `--full`. **Paths are relative to each `data[]` item on list verbs, and to the root on single-item verbs.** So it's `--fields id,name` on `… list` / `database schema-tables` (`data.id` and `data[].id` both fail with `unknown field path: "data.id"`), and `--fields id,name,display` on `card get`, `--fields data.rows` on `mb query` (whose `data` is an object).
|
|
62
|
-
- `--max-bytes <n>` — cap **list** output size (drops trailing items, sets `truncated`). Default
|
|
62
|
+
- `--max-bytes <n>` — cap **list** output size (drops trailing items, sets `truncated`). Default 24576 (sized to fit under agent-harness tool-output limits); `0` disables. Single-item commands (`get`) never truncate — when their output exceeds the cap they throw a `ConfigError` (exit 2: "output is N bytes, over the M-byte --max-bytes cap; …") whose tail names the remedy: on schema-shaped commands it is the exact narrower command to run instead — follow it rather than raising the cap.
|
|
63
|
+
- JSON output is a single line when stdout is piped (pretty-printed only at a TTY) — always parse it, never scrape by line position.
|
|
63
64
|
|
|
64
|
-
List envelope shape:
|
|
65
|
+
List envelope shape (metadata first, so counts and the truncation marker survive if a consumer cuts the tail):
|
|
65
66
|
|
|
66
67
|
```json
|
|
67
68
|
{
|
|
68
|
-
"data": [
|
|
69
|
-
/* items */
|
|
70
|
-
],
|
|
71
69
|
"returned": 10,
|
|
72
70
|
"total": 42,
|
|
73
71
|
"limit": 50,
|
|
74
|
-
"truncated":
|
|
72
|
+
"truncated": { "reason": "max_bytes", "bytes": 123456 },
|
|
73
|
+
"data": [
|
|
74
|
+
/* items */
|
|
75
|
+
]
|
|
75
76
|
}
|
|
76
77
|
```
|
|
77
78
|
|
|
79
|
+
`truncated` is present only when the cap dropped trailing items.
|
|
80
|
+
|
|
78
81
|
`total` is best-effort and may be `null` (empty / permissions-filtered collections, or `--limit` early-stop); use `returned` for the count you got and `data.length` for the rendered slice.
|
|
79
82
|
|
|
80
83
|
## Body input (create / update / run)
|
|
@@ -99,28 +102,31 @@ Single-quoted `'EOF'` stops the shell interpolating `$vars` inside the JSON.
|
|
|
99
102
|
|
|
100
103
|
Write working files to **`./.scratch`** in the current directory (`mkdir -p ./.scratch` first), never `/tmp` — better permissions, they persist across the session, and the user can review them.
|
|
101
104
|
|
|
102
|
-
##
|
|
105
|
+
## Discovering commands and schemas
|
|
106
|
+
|
|
107
|
+
Cheapest source that answers the question wins:
|
|
103
108
|
|
|
104
|
-
|
|
109
|
+
- What groups/verbs exist? → `mb --help`, then `mb <group> --help`. Add `--json` for a machine-readable `{command, description}` index (`mb --help --json` lists every command).
|
|
110
|
+
- What flags does a command take? → `mb <command> --help` — flags with enums and defaults, examples, ~1 KB.
|
|
111
|
+
- Output JSON Schema before parsing, JSON-body input schema before authoring, machine-readable arg types, min server version? → `mb <command> --help --json` — that command's full entry (`inputSchema` is the exact validator the command runs on the body; `null` when it takes none).
|
|
105
112
|
|
|
106
113
|
```bash
|
|
107
|
-
mb
|
|
108
|
-
mb
|
|
109
|
-
mb
|
|
110
|
-
mb
|
|
114
|
+
mb card query --help # flags, enums, defaults, examples
|
|
115
|
+
mb card list --help --json | jq .outputSchema # output schema before parsing
|
|
116
|
+
mb card create --help --json | jq .inputSchema # body schema before authoring
|
|
117
|
+
mb transform --help --json | jq -r '.commands[].command' # verbs under "transform"
|
|
111
118
|
```
|
|
112
119
|
|
|
113
|
-
The leading `__` hides it from `--help`, but it's stable. Reach for it instead of per-command `--help` to enumerate verbs, validate flag names, or read an output schema before parsing.
|
|
114
|
-
|
|
115
120
|
## Resource quirks worth memorizing
|
|
116
121
|
|
|
117
|
-
Routine verb shapes (list / get / create / update), every flag, and output schemas live in `
|
|
122
|
+
Routine verb shapes (list / get / create / update), every flag, and output schemas live in each command's `--help` (add `--json` for output schemas). Below is only what help does _not_ tell you: footguns and non-obvious behaviors.
|
|
118
123
|
|
|
119
|
-
- **db traversal
|
|
120
|
-
- **table fields.** `table get` never returns fields on its own — pass `--include fields` (compact) or use `table fields <id>` (list envelope). `table
|
|
124
|
+
- **db traversal: the hydration ladder.** Start with `database 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 `table fields <table-id>` per table (bounded: fields are per-table). `--include tables.fields` is the full rollup — small databases only; when either outgrows the cap the error message names the next command down the ladder. Hundreds of tables? Traverse by schema (`database schemas <db-id>` → `database schema-tables <db-id> <schema>`) or look tables up by name (`search <term> --models table --db-id <db-id> --limit 10`). `sync-schema` / `rescan-values` queue async work and return `{status:"ok"}` immediately; `sync-schema --wait` blocks until `initial_sync_status: complete`.
|
|
125
|
+
- **table fields.** `table get` never returns fields on its own — pass `--include fields` (compact; the underlying query_metadata response also carries FK targets and dimensions, visible under `--full`) or use `table fields <id>` (list envelope). `table update` patches table-level metadata only; physical columns aren't editable.
|
|
121
126
|
- **field has no `list`.** Fields are per-table — get them via `table get <id> --include fields`. Never enumerate fields across a whole db (context blow-up). `field summary` is live cardinality `{field_id, count, distincts}`; `field values` is the cached distinct set (`has_more_values: true` ⇒ truncated cache). `field update` patches metadata only (`base_type` isn't editable) — this is where you set a column's `semantic_type` or foreign-key target.
|
|
127
|
+
- **upload (CSV → tables).** `upload csv --file <path>` creates a new table + model (prints `{model_id, table_id}`); `upload append <table-id>` / `upload replace <table-id> --file <path>` add to / overwrite a table **previously created by upload** (columns must match). The destination db+schema is admin-configured, not per-call — check with `mb setting get uploads-settings --json` (`db_id: null` ⇒ uploads off/unconfigured; needs admin to read). `--collection <id|root>` only sets the model's collection. Max 50 MB. Errors: **"The uploads database is not configured."** = no db has uploads enabled; **"Uploads are not enabled."** = the append/replace target isn't an uploaded table.
|
|
122
128
|
- **card.** `dataset_query` is the **flat** `mbql/query` value, not a legacy `{type:"query",query:…}` envelope (→ `mbql`). `--export-format csv|xlsx` streams the raw export (pipe to a file), bypassing the JSON envelope. `archive` is the only delete; unarchive with `update --body '{"archived":false}'`. `visualization_settings` keys are scoped by `display` and aren't pre-flighted — see `visualization`.
|
|
123
|
-
- **dashboard.** Dashcards round-trip through `PUT /api/dashboard/:id` (no per-dashcard endpoint): `update-dashcard <dash-id> <dashcard-id>` patches one safely; `update --body '{"dashcards":[…]}'` replaces the whole set (omitted ids are deleted server-side; negative ids for new cards). `create` accepts the **same** `dashcards` array in its initial body — lay out the whole dashboard in one call: negative ids for new cards, and `card_id:null` plus a `visualization_settings.virtual_card` block (`{display:"text"|"heading"|"link"|…}`) for non-question cards. `create`/`update` pre-flight every positive `card_id` and exit **2** with `{ok:false,errors:[…]}` on a bad ref (non-bypassable). `dashboard get <id>` (or `--full`) hydrates dashcards/tabs; `list` omits them. **The grid is 24 columns wide:** each dashcard's `{col, row, size_x, size_y}` is in grid units — **full-width is `size_x: 24`** (`size_x: 12` is half a row, the usual cause of a card filling only half the width). Keep `col + size_x ≤ 24`, start a full-width stack's `col` at 0, and don't overlap (the server stores collisions as sent — no auto-fix).
|
|
129
|
+
- **dashboard.** Dashcards round-trip through `PUT /api/dashboard/:id` (no per-dashcard endpoint): `update-dashcard <dash-id> <dashcard-id>` patches one safely; `update --body '{"dashcards":[…]}'` replaces the whole set (omitted ids are deleted server-side; negative ids for new cards). `create` accepts the **same** `dashcards` array in its initial body — lay out the whole dashboard in one call: negative ids for new cards, and `card_id:null` plus a `visualization_settings.virtual_card` block (`{display:"text"|"heading"|"link"|…}`) for non-question cards. `create`/`update` pre-flight every positive `card_id` and exit **2** with `{ok:false,errors:[…]}` on a bad ref (non-bypassable). `dashboard get <id>` (or `--full`) hydrates dashcards/tabs; `list` omits them. **The grid is 24 columns wide:** each dashcard's `{col, row, size_x, size_y}` is in grid units — **full-width is `size_x: 24`** (`size_x: 12` is half a row, the usual cause of a card filling only half the width). Keep `col + size_x ≤ 24`, start a full-width stack's `col` at 0, and don't overlap (the server stores collisions as sent — no auto-fix). Layout patterns and per-chart default sizes → the `dashboard` skill; load it before composing any `dashcards` array.
|
|
124
130
|
- **dashboard parameters (filters).** A dashboard's `parameters` array holds its filter widgets; they're part of the dashboard record, so read them with `dashboard get <id> --fields parameters --json` (no separate verb). **Editing replaces the _whole_ array** (like dashcards), so it's a read-modify-write loop: pull the current set with `dashboard get <id> --fields parameters --json`, add/change entries, and send the full array back via `dashboard update --body '{"parameters":[…]}'` (or supply it in `create`). Omitting a parameter deletes it. Each parameter is `{id, type, …}`. **`id` is a descriptive slug-like string you pick (e.g. `order_status`), unique within this dashboard — Metabase stores any non-blank string verbatim. Do NOT invent a random/opaque id by guessing; reuse the `slug`. If you genuinely need an opaque id, mint one with `mb uuid` — never fabricate one.** `type` is a **closed enum**; an unlisted value is a hard parse error that echoes the full allowed set back to you: string ops `string/=` `string/!=` `string/contains` `string/does-not-contain` `string/starts-with` `string/ends-with`; number ops `number/=` `number/!=` `number/between` `number/>=` `number/<=`; date `date/single` `date/range` `date/relative` `date/month-year` `date/quarter-year` `date/all-options`; plus `category`, `id`, `boolean/=`, `temporal-unit`, and bare `number`/`text`/`date`/`boolean`. A parameter only filters a card once it is **mapped**: each dashcard's `parameter_mappings` is `[{parameter_id, target}]` where `parameter_id` must match a parameter's `id` exactly, and `target` is `["dimension", ["field", <field-id>, null]]` for an MBQL card column, `["dimension", ["template-tag", "<tag>"]]` for a native field-filter tag, or `["variable", ["template-tag", "<tag>"]]` for a native raw-value tag. Populate a dropdown with `values_source_type`: `"static-list"` + `values_source_config.values`, or `"card"` + `{card_id, value_field, label_field}`; omit it to pull live distinct values from the mapped field. `dashboard parameter-values <id> <parameter-id> [--query <substr>]` fetches those selectable values (`{values, has_more_values}`); `--query` is a case-insensitive substring search.
|
|
125
131
|
- **snippet `--archived` is a swap, not a union** — list returns _either_ active _or_ archived rows, never both. (Same for `--filter archived` on dashboard/collection.)
|
|
126
132
|
- **segment / measure.** `update` and `archive` require a non-blank `revision_message` (audit-logged); the CLI does not synthesize it on `update`. `archive` defaults to `"Archived via mb CLI"` — override with `--revision-message`. `definition` is a flat MBQL clause (→ `mbql`): segment = a filter, measure = exactly one aggregation.
|
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dashboard
|
|
3
|
-
description: Build
|
|
3
|
+
description: Build Metabase dashboards via the `mb` CLI — lay out dashcards on the 24-column grid (`{col,row,size_x,size_y}` math, per-chart default sizes) and turn cards into a filterable, cross-linked app. Covers wiring filters to cards (parameters + parameter_mappings), the field-filter vs. raw-variable target grammar, linked/cascading filters and their foreign-key requirement, cross-filtering, click-through, multi-series overlays, and tabs. The parameter type enum and whole-array replace semantics live in `core`. Triggers — "build a dashboard from these cards", "my dashboard is squished into half the width", "wire a filter to these cards", "make a filter cascade", "click a bar to filter the other charts", "add a dashboard tab", "add a second series", "why isn't my filter showing".
|
|
4
4
|
allowed-tools: Read, Write, Edit, Bash, AskUserQuestion
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Dashboard
|
|
8
8
|
|
|
9
|
-
A dashboard starts as cards on a grid; it becomes an **app** when filters drive the cards, charts cross-filter each other, and clicks navigate. This skill
|
|
9
|
+
A dashboard starts as cards on a grid; it becomes an **app** when filters drive the cards, charts cross-filter each other, and clicks navigate. This skill owns both: the grid layout and the interactive layer.
|
|
10
10
|
|
|
11
|
-
**`core` owns the mechanics** — the
|
|
11
|
+
**`core` owns the transport mechanics** — the whole-array replace semantics (editing `dashcards` or `parameters` replaces the entire set; omitted entries are deleted; new cards use negative ids), `update-dashcard` for a single safe patch vs. `update --body` for a full replace, the closed `parameter.type` enum, and the `parameter-values` verb. Read it first (`mb skills get core`). **`visualization`** owns each card's chart and the full `click_behavior` key catalog.
|
|
12
12
|
|
|
13
13
|
Inspect before you wire: `mb dashboard get <id> --json` hydrates `parameters`, `dashcards`, and `tabs`; `mb dashboard cards <id>` lists just the dashcards.
|
|
14
14
|
|
|
15
|
+
## Layout: the grid is 24 columns — not 12
|
|
16
|
+
|
|
17
|
+
Every dashcard carries `{col, row, size_x, size_y}` in grid units: `col` is 0-indexed from the left edge, `row` grows downward, and `col + size_x ≤ 24`. **Full-width is `size_x: 24` — Metabase's per-chart _default_ width of 12 is half a row.** A layout authored on the usual 12-column web-grid assumption crams the whole dashboard into the left half of the viewport. The server stores whatever geometry you send — overlaps and gaps included, no auto-fix.
|
|
18
|
+
|
|
19
|
+
Default sizes (w×h): `scalar`/`smartscalar` 6×3, `pie` 12×8, `table`/`pivot`/`object` 12×9, `waterfall` 14×6, `sankey` 16×10, `heading` 24×1, `text` 12×3, every other chart 12×6.
|
|
20
|
+
|
|
21
|
+
The standard shape — a KPI row of scalars across the full 24, charts in halves or thirds below, wide tables full-width:
|
|
22
|
+
|
|
23
|
+
```jsonc
|
|
24
|
+
"dashcards": [
|
|
25
|
+
{ "id": -1, "card_id": 101, "col": 0, "row": 0, "size_x": 6, "size_y": 3 }, // 4 KPIs × 6 = 24
|
|
26
|
+
{ "id": -2, "card_id": 102, "col": 6, "row": 0, "size_x": 6, "size_y": 3 },
|
|
27
|
+
{ "id": -3, "card_id": 103, "col": 12, "row": 0, "size_x": 6, "size_y": 3 },
|
|
28
|
+
{ "id": -4, "card_id": 104, "col": 18, "row": 0, "size_x": 6, "size_y": 3 },
|
|
29
|
+
{ "id": -5, "card_id": 105, "col": 0, "row": 3, "size_x": 12, "size_y": 6 }, // two halves
|
|
30
|
+
{ "id": -6, "card_id": 106, "col": 12, "row": 3, "size_x": 12, "size_y": 6 },
|
|
31
|
+
{ "id": -7, "card_id": 107, "col": 0, "row": 9, "size_x": 24, "size_y": 9 } // full-width table
|
|
32
|
+
]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Sanity-check before sending:** rows should fill to 24 and at least one card must end at `col + size_x = 24`. If nothing in the array crosses column 12, you've authored a 12-column layout — double every width.
|
|
36
|
+
|
|
15
37
|
## The wiring loop: a filter is a parameter + a mapping per card
|
|
16
38
|
|
|
17
39
|
A dashboard filter is one entry in the dashboard's `parameters` array **plus** a `parameter_mappings` entry on every dashcard it should control. A parameter with no mapping is an inert widget — the most common "my filter does nothing" cause.
|
|
@@ -101,6 +123,7 @@ Set the **driver** chart's whole-card click behavior to `crossfilter`, mapping t
|
|
|
101
123
|
|
|
102
124
|
## Don't
|
|
103
125
|
|
|
126
|
+
- Don't lay out on a 12-column assumption — full-width is `size_x: 24`; a layout where no card crosses column 12 renders in the left half of the viewport.
|
|
104
127
|
- Don't declare a parameter and forget the per-card `parameter_mappings` — the widget won't filter anything.
|
|
105
128
|
- Don't expect a linked filter to work off a model/question join, a custom column, or with a static/card value source — it needs a metadata FK and a live source.
|
|
106
129
|
- Don't hand-author a complex `click_behavior` — copy a UI-built one.
|
|
@@ -10,14 +10,14 @@ The front door for turning a raw database into clean tables, reusable definition
|
|
|
10
10
|
|
|
11
11
|
A data project moves through stages. A user can start at any of them — detect where their data already is, don't assume.
|
|
12
12
|
|
|
13
|
-
| Stage | What it does | Where the method lives
|
|
14
|
-
| --------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
15
|
-
| **Build clean tables** | Raw, normalized source DB → a small set of wide, clean, analysis-ready tables (built as transforms) | `references/building-clean-tables.md`
|
|
16
|
-
| **Define reusable metrics** | Clean tables → shared segments (saved filters), measures (saved calculations), metrics (official numbers) | `references/reusable-definitions.md`
|
|
17
|
-
| **Answer questions** | Clean tables → a trustworthy plain-language written answer | `references/answering-questions.md`
|
|
18
|
-
| **Build dashboards** | Clean tables / definitions → charts and dashboards people look at | the `visualization` skill (charts) + `dashboard` skill (
|
|
13
|
+
| Stage | What it does | Where the method lives |
|
|
14
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
15
|
+
| **Build clean tables** | Raw, normalized source DB → a small set of wide, clean, analysis-ready tables (built as transforms) | `references/building-clean-tables.md` |
|
|
16
|
+
| **Define reusable metrics** | Clean tables → shared segments (saved filters), measures (saved calculations), metrics (official numbers) | `references/reusable-definitions.md` |
|
|
17
|
+
| **Answer questions** | Clean tables → a trustworthy plain-language written answer | `references/answering-questions.md` |
|
|
18
|
+
| **Build dashboards** | Clean tables / definitions → charts and dashboards people look at | the `visualization` skill (charts) + `dashboard` skill (grid layout, filters, interactivity) |
|
|
19
19
|
|
|
20
|
-
The first three methods are references in this skill — read **only the one the current stage needs**: run `mb skills path data-workflow` and Read `references/<file>.md`. (`mb skills get data-workflow --full` appends all three at once — heavier; prefer the single Read.) "Build dashboards" lives in two standalone skills — `visualization` for authoring each chart, `dashboard` for wiring filters and interactivity
|
|
20
|
+
The first three methods are references in this skill — read **only the one the current stage needs**: run `mb skills path data-workflow` and Read `references/<file>.md`. (`mb skills get data-workflow --full` appends all three at once — heavier; prefer the single Read.) "Build dashboards" lives in two standalone skills — `visualization` for authoring each chart, `dashboard` for laying cards out on the grid and wiring filters and interactivity — both CLI capabilities in their own right. Load `dashboard` before composing any dashboard, even a plain no-filter layout: the grid geometry lives there.
|
|
21
21
|
|
|
22
22
|
CLI mechanics come from the reference skills, not from here: `mb skills get core` (auth, inspection, the `field`/`table`/`library`/`segment`/`measure` verbs), `mbql` (query and definition bodies), `transform` (creating/running transforms). This skill owns the _judgment_ — which tables, which definitions, what to keep — and the conventions below.
|
|
23
23
|
|
|
@@ -88,19 +88,21 @@ The rules every stage follows. The reference files assume this contract rather t
|
|
|
88
88
|
|
|
89
89
|
Don't make the user name a _stage_ — but do find out _where their data lives_ before going looking.
|
|
90
90
|
|
|
91
|
+
**Data not in a database yet?** A local CSV gets in via `mb upload csv --file <path>` (creates a table + model); treat the result as a starting table and clean it with a transform if needed. Uploads must be admin-enabled — check `mb setting get uploads-settings --json` (`db_id: null` ⇒ not configured). See `core`'s **upload** quirk for the rest.
|
|
92
|
+
|
|
91
93
|
**Ask before you crawl.** If you don't already know which database/schema/table the user means, ask — one plain question short-circuits a dozen tool calls. The asymmetry: if they name a **database**, ask which **schema**; if they name a **table**, ask which **database**. "If you don't know, no problem — I'll look" is the fallback, not the opener.
|
|
92
94
|
|
|
93
|
-
**When you do crawl,** use `core`'s cheap, narrowest-first ladder (never whole-warehouse rollups): `mb db list` → `db schemas <id>` → `db schema-tables <id> <schema>` → `table list [--db-id]` → `table fields <id>` (or `table
|
|
95
|
+
**When you do crawl,** use `core`'s cheap, narrowest-first ladder (never whole-warehouse rollups): `mb db list` → `db schemas <id>` → `db schema-tables <id> <schema>` → `table list [--db-id]` → `table fields <id>` (or `table get <id> --include fields --full` for FK targets and dimensions). Have a _name_ rather than a tree to walk? `mb search <query> [--models] [--db-id]`. Need to know what's in a column? `mb field summary <id>` (counts) and `field values <id>` (sample values). If a database looks freshly connected or an expected table is missing, offer `mb db sync-schema <id> --wait` before concluding it doesn't exist.
|
|
94
96
|
|
|
95
97
|
**Read the shape to pick a stage.** Raw, normalized, SaaS-synced tables (many tables, coded columns, `*_field`/`*_choice` lookups)? → **build clean tables** first. Already wide, clean, human-readable ones? Then it depends on the goal:
|
|
96
98
|
|
|
97
|
-
| What the user wants / what's there | Stage
|
|
98
|
-
| -------------------------------------------------------------------------------------------------------------- |
|
|
99
|
-
| "Clean up / flatten / make sense of" raw, normalized data; no clean tables yet | Build clean tables → `references/building-clean-tables.md`
|
|
100
|
-
| Clean tables exist; "make this reusable", "define active customers / revenue / MRR officially" | Define reusable metrics → `references/reusable-definitions.md`
|
|
101
|
-
| Clean tables exist; "answer this question", "who registered", "analyze / report on X" (wants a written answer) | Answer questions → `references/answering-questions.md`
|
|
102
|
-
| Clean tables (and maybe definitions) exist; "chart this", "build a dashboard", "show me X over time" | Build dashboards → `visualization` (charts) + `dashboard` (interactivity) |
|
|
103
|
-
| "Do the whole thing" / "set up analytics for X" from raw data | Start at build-clean-tables, then continue down the stages
|
|
99
|
+
| What the user wants / what's there | Stage |
|
|
100
|
+
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
101
|
+
| "Clean up / flatten / make sense of" raw, normalized data; no clean tables yet | Build clean tables → `references/building-clean-tables.md` |
|
|
102
|
+
| Clean tables exist; "make this reusable", "define active customers / revenue / MRR officially" | Define reusable metrics → `references/reusable-definitions.md` |
|
|
103
|
+
| Clean tables exist; "answer this question", "who registered", "analyze / report on X" (wants a written answer) | Answer questions → `references/answering-questions.md` |
|
|
104
|
+
| Clean tables (and maybe definitions) exist; "chart this", "build a dashboard", "show me X over time" | Build dashboards → `visualization` (charts) + `dashboard` (layout, interactivity) |
|
|
105
|
+
| "Do the whole thing" / "set up analytics for X" from raw data | Start at build-clean-tables, then continue down the stages |
|
|
104
106
|
|
|
105
107
|
**Answer and dashboard are alternative endpoints, not a sequence.** Once tables are clean (and maybe defined), answering in prose and building a dashboard are two different things you can do with the data — route to whichever the goal calls for; neither has to precede the other.
|
|
106
108
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./notice-DyVl5aYB.mjs";
|
|
2
|
-
import "./error-BaBm-UrT.mjs";
|
|
3
|
-
import "./command-augment-DdZIfx1V.mjs";
|
|
4
|
-
import "./runtime-oxjmrYoP.mjs";
|
|
5
|
-
import "./capabilities-N0jo5U7S.mjs";
|
|
6
|
-
import "./parse-id-DlXnOcmP.mjs";
|
|
7
|
-
import "./poll-hgnrHBoh.mjs";
|
|
8
|
-
import "./poll-task-NQNLT_aA.mjs";
|
|
9
|
-
import { SyncSettingsUpdateResult, add_collection_default, setCollectionRemoteSynced, syncSettingsUpdateView } from "./add-collection-CRZAFCZy.mjs";
|
|
10
|
-
|
|
11
|
-
export { add_collection_default as default };
|
package/dist/auth--PWX0oj5.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "./command-augment-DdZIfx1V.mjs";
|
|
2
|
-
import { defineCommandGroup } from "./group-BNE_RiH5.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-C6ZAnGHz.mjs").then((m) => m.default),
|
|
15
|
-
status: () => import("./status-C_7aqTvB.mjs").then((m) => m.default),
|
|
16
|
-
list: () => import("./list-CjF12k1G.mjs").then((m) => m.default),
|
|
17
|
-
logout: () => import("./logout-CWjyY3Y8.mjs").then((m) => m.default)
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { auth_default as default };
|