@metabase/cli 0.1.17 → 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.
Files changed (224) hide show
  1. package/README.md +61 -35
  2. package/dist/{add-collection-C-t9SQBk.mjs → add-collection-BTSGp4f9.mjs} +4 -5
  3. package/dist/add-collection-DlAwt2Z3.mjs +9 -0
  4. package/dist/append-DY1-O789.mjs +42 -0
  5. package/dist/{archive-wNXwIiF0.mjs → archive-BOEEMrYL.mjs} +6 -8
  6. package/dist/{archive-CaoUUTIb.mjs → archive-CJ9rElKn.mjs} +6 -8
  7. package/dist/{archive-DS-KEB4a.mjs → archive-CWtUzlHO.mjs} +5 -7
  8. package/dist/{archive-LG8u7ec5.mjs → archive-DCPw3df6.mjs} +5 -7
  9. package/dist/{archive-D1FX-sbU.mjs → archive-DOa1u1aJ.mjs} +5 -7
  10. package/dist/{archive-C7dnyzVY.mjs → archive-pHsa4dL0.mjs} +8 -9
  11. package/dist/{archive-qSOcACQo.mjs → archive-w6TX-zEk.mjs} +7 -8
  12. package/dist/auth-BrQtY0pO.mjs +22 -0
  13. package/dist/{body-IcJ5kFtk.mjs → body-C1_AaTS4.mjs} +3 -3
  14. package/dist/{branches-BlNCTmFB.mjs → branches-BsBzaGIf.mjs} +5 -7
  15. package/dist/{cancel-BnveTPNw.mjs → cancel-BNM0yyx-.mjs} +4 -6
  16. package/dist/{cancel-task-CSVI8Zgl.mjs → cancel-task-Bggzn4JL.mjs} +5 -7
  17. package/dist/capabilities-DrDJo_ng.mjs +684 -0
  18. package/dist/{card-DEmcRlNO.mjs → card-B8G5jQQT.mjs} +24 -18
  19. package/dist/card-DHCcmpgr.mjs +26 -0
  20. package/dist/{cards-CMgGA8OZ.mjs → cards-D0hvA13L.mjs} +7 -8
  21. package/dist/cli.mjs +175 -29
  22. package/dist/{collection-DrLpA1SO.mjs → collection-CFoLPrY5.mjs} +1 -1
  23. package/dist/collection-D0O9gp3S.mjs +23 -0
  24. package/dist/{collection-namespace-CsaxEqOb.mjs → collection-namespace-DqPNrCdQ.mjs} +2 -2
  25. package/dist/{create-I5Cv-MBa.mjs → create-05rX4oL-.mjs} +11 -12
  26. package/dist/{create-B6LQutd0.mjs → create-BR7x66KW.mjs} +12 -13
  27. package/dist/{create-B79M8YpX.mjs → create-C17Fh1_X.mjs} +9 -10
  28. package/dist/{create-FZOrCw5k.mjs → create-C8ndg3g4.mjs} +28 -21
  29. package/dist/{create-C7u3umLj.mjs → create-CZ9KFnbi.mjs} +8 -9
  30. package/dist/{create-B1xfaZJB.mjs → create-Cii_utzV.mjs} +5 -7
  31. package/dist/{create-SHKlj0z3.mjs → create-Cyv7vHV_.mjs} +8 -9
  32. package/dist/{create-Bg_uMu0p.mjs → create-DKuixGJ2.mjs} +8 -9
  33. package/dist/{create-AeWNv0v-.mjs → create-E6L3WMqV.mjs} +8 -9
  34. package/dist/{create-LHqwcVbS.mjs → create-a3s1S2Dw.mjs} +11 -12
  35. package/dist/{create-branch-CGyT99Ny.mjs → create-branch-Dxn6UnV_.mjs} +5 -7
  36. package/dist/{create-BpkWlgoR.mjs → create-oLb0E-ZP.mjs} +17 -14
  37. package/dist/csv-T6_vlLJS.mjs +58 -0
  38. package/dist/{current-task-C-0hw2Ae.mjs → current-task-DxWbw-bU.mjs} +5 -7
  39. package/dist/{dashboard-DOplbKyQ.mjs → dashboard-B-MTpfeS.mjs} +35 -15
  40. package/dist/dashboard-BpSPoeAn.mjs +35 -0
  41. package/dist/{database-D9fftP-i.mjs → database-CIbVSfua.mjs} +2 -2
  42. package/dist/db-DBRijnh4.mjs +27 -0
  43. package/dist/{delete-tCVrYjKD.mjs → delete--P1xFX37.mjs} +6 -8
  44. package/dist/{delete-Do3nn9sl.mjs → delete-BBOIUl0D.mjs} +6 -8
  45. package/dist/{delete--NYYN6wv.mjs → delete-Ce2EBQYA.mjs} +6 -8
  46. package/dist/{delete-runtime-B0ha5QR4.mjs → delete-runtime-B-8I9V1g.mjs} +2 -3
  47. package/dist/{delete-table-CWSGPw0i.mjs → delete-table-Bj32NsXn.mjs} +6 -8
  48. package/dist/{dependencies-CyFocD8I.mjs → dependencies-ixzjVjUz.mjs} +5 -7
  49. package/dist/{dirty-BXM0YJ_a.mjs → dirty-CH70h5m5.mjs} +5 -7
  50. package/dist/{document-1W7NRaO_.mjs → document-CL4ML5FN.mjs} +20 -4
  51. package/dist/document-dZpuFu3I.mjs +22 -0
  52. package/dist/{eid-p-zn_1RJ.mjs → eid-XjkBbyb_.mjs} +10 -11
  53. package/dist/embedding-CKdw8q7p.mjs +11 -0
  54. package/dist/{export-B_8wghyo.mjs → export-CChMg-mL.mjs} +7 -9
  55. package/dist/field-B1heFeCz.mjs +21 -0
  56. package/dist/{field-CMY_LWUe.mjs → field-DsXTeqBy.mjs} +6 -4
  57. package/dist/{fields-BsufL9kv.mjs → fields-C7h2QwUp.mjs} +6 -8
  58. package/dist/{get-Cl5Ak73C.mjs → get-AvGH_oph.mjs} +8 -9
  59. package/dist/{get-DurjkUKJ.mjs → get-B6ZJCJ8H.mjs} +5 -7
  60. package/dist/{get-68P-L4ja.mjs → get-BWHJDa0B.mjs} +5 -7
  61. package/dist/{get-B67pe00Z.mjs → get-BsyccuCH.mjs} +5 -7
  62. package/dist/{get-C7mq17-2.mjs → get-C98IFgFi.mjs} +5 -7
  63. package/dist/{get-BTKeO4vE.mjs → get-Cj90oyxG.mjs} +5 -7
  64. package/dist/{get-BJoZkATD.mjs → get-D9r2znrn.mjs} +5 -7
  65. package/dist/{get-D3k2JUsa.mjs → get-DRZENkCj.mjs} +5 -7
  66. package/dist/{get-4lufgahL.mjs → get-DWWmpQ87.mjs} +5 -7
  67. package/dist/{get-CPw0ROO4.mjs → get-Dg1J0wxb.mjs} +5 -7
  68. package/dist/{get-B45uYMAs.mjs → get-DrWYvefc.mjs} +7 -8
  69. package/dist/{get-DTqBuIf3.mjs → get-KVN9ANVh.mjs} +4 -6
  70. package/dist/get-RlP_xiUd.mjs +67 -0
  71. package/dist/{get-Df_3LCVC.mjs → get-cyR67Lmq.mjs} +5 -7
  72. package/dist/{get-DeLnNVQE.mjs → get-kqY2lwhO.mjs} +16 -9
  73. package/dist/{get-run-Dq4qfGfD.mjs → get-run-C4C_QQqO.mjs} +5 -7
  74. package/dist/git-sync-JHa7bIyY.mjs +31 -0
  75. package/dist/{group-BNE_RiH5.mjs → group-CILtQqCL.mjs} +2 -1
  76. package/dist/{has-remote-changes-E-4N_O_t.mjs → has-remote-changes-dLUGr0MD.mjs} +5 -7
  77. package/dist/{import-Dg0j3HCP.mjs → import-Byull6jF.mjs} +7 -9
  78. package/dist/{input-7Sj85_K7.mjs → input-m9ctfLxZ.mjs} +6 -3
  79. package/dist/is-dirty-Bb2dfEYs.mjs +8 -0
  80. package/dist/{is-dirty-DWw1yBeR.mjs → is-dirty-CU3ovgdG.mjs} +3 -4
  81. package/dist/{items-CQtt9X4M.mjs → items-CEGDYWuF.mjs} +7 -9
  82. package/dist/{key-bltP32Pm.mjs → key-Ge4VwWvS.mjs} +1 -1
  83. package/dist/{library-B5AvpACG.mjs → library-DHWWa4Tt.mjs} +6 -6
  84. package/dist/{list-BFVuPodI.mjs → list-3z1ZChTG.mjs} +4 -6
  85. package/dist/{list-D3TSAqwl.mjs → list-B9TyELob.mjs} +4 -6
  86. package/dist/{list-BAOTQHst.mjs → list-BFm4iEBt.mjs} +4 -6
  87. package/dist/{list-BKUvhAs4.mjs → list-BliCJAjt.mjs} +4 -6
  88. package/dist/{list-BgUWqZa2.mjs → list-Bpv06V24.mjs} +6 -8
  89. package/dist/{list-DG0FIhTK.mjs → list-Br48kL09.mjs} +4 -6
  90. package/dist/{list-BHAWYZ1z.mjs → list-BtcpNl4-.mjs} +4 -6
  91. package/dist/{list-B1uVWy6A.mjs → list-BuyRG3GB.mjs} +7 -8
  92. package/dist/{list-CvhVYOVl.mjs → list-CMb03cv3.mjs} +5 -7
  93. package/dist/{list-CfqpDTna.mjs → list-CmCJwaGT.mjs} +4 -6
  94. package/dist/{list-C4bALfCs.mjs → list-Cur_72xZ.mjs} +5 -7
  95. package/dist/{list-BF-W4jOZ.mjs → list-D9FY30xH.mjs} +8 -9
  96. package/dist/{list-D5Gdz8hi.mjs → list-DEkPxVZu.mjs} +4 -6
  97. package/dist/{list-C9O2RY5u.mjs → list-O2w5xd1q.mjs} +4 -6
  98. package/dist/{list-KxQNqp4T.mjs → list-th_Ym6Cv.mjs} +6 -8
  99. package/dist/{login-Bt6j6yBM.mjs → login-hKlYsAa1.mjs} +8 -10
  100. package/dist/{logout-ANkL02p0.mjs → logout-DO8GVC6b.mjs} +4 -6
  101. package/dist/measure-R3T20wnB.mjs +25 -0
  102. package/dist/{measure-DoJvtCaA.mjs → measure-S9WszHre.mjs} +5 -4
  103. package/dist/{parameter-values-D4J8Ctu0.mjs → parameter-values-BJb2GuLz.mjs} +7 -9
  104. package/dist/{parse-enum-BL9i_brN.mjs → parse-enum-Cfne2suT.mjs} +1 -1
  105. package/dist/{parse-id-D4LeTUsP.mjs → parse-id-DfY0Lugw.mjs} +1 -1
  106. package/dist/{parse-ref-CB_KvF9h.mjs → parse-ref-C_MsXYI6.mjs} +1 -1
  107. package/dist/{path-5nQgdvrs.mjs → path-DzhQVCH8.mjs} +4 -6
  108. package/dist/{poll-BpAJpvb-.mjs → poll-D1Yg78c3.mjs} +2 -2
  109. package/dist/{poll-task-TilgciQn.mjs → poll-task-DLUZaglY.mjs} +2 -2
  110. package/dist/{preflight-OfHU3Toi.mjs → preflight-Cy2jUSca.mjs} +4 -5
  111. package/dist/{process-j8UHMHc2.mjs → process-D5HN1wpT.mjs} +1 -1
  112. package/dist/{prompt-C85xd9HR.mjs → prompt-ZG9Drin_.mjs} +1 -1
  113. package/dist/{publish-DKiqyDwo.mjs → publish-3hmHoaX-.mjs} +7 -9
  114. package/dist/{query-CQ3xXa9P.mjs → query-DTASj9Zu.mjs} +9 -10
  115. package/dist/{query-BWJ5h1g3.mjs → query-DkZViD_3.mjs} +15 -15
  116. package/dist/{query-result-D6mfoVfQ.mjs → query-result-CbTFdlSf.mjs} +1 -1
  117. package/dist/{remove-collection-CO-aMzTO.mjs → remove-collection-D3wH9H6R.mjs} +7 -9
  118. package/dist/replace-CFzqkZXs.mjs +42 -0
  119. package/dist/requests-KBiY9UYy.mjs +96 -0
  120. package/dist/{rescan-values-DpL6LGAK.mjs → rescan-values-B1WycObS.mjs} +7 -9
  121. package/dist/{resolve-Dj2MTBkn.mjs → resolve-Ct084wx3.mjs} +1 -1
  122. package/dist/{run-DUcdaZs3.mjs → run-B8qEEdC8.mjs} +4 -6
  123. package/dist/{run-QYJ-mAaG.mjs → run-cw0qTEQ7.mjs} +7 -9
  124. package/dist/{runs-DgasTnGd.mjs → runs-BOA4kK_X.mjs} +6 -8
  125. package/dist/{runtime-BJtuxWM8.mjs → runtime-B-c-Fc2i.mjs} +3 -4
  126. package/dist/{schema-tables-ooYjimrV.mjs → schema-tables-DRYzSVcW.mjs} +6 -8
  127. package/dist/{schemas-HjFPzsd-.mjs → schemas-BiMjD25L.mjs} +4 -6
  128. package/dist/{search-vaT5EwhG.mjs → search-DjKxRXO5.mjs} +4 -6
  129. package/dist/{segment-TXktTCfU.mjs → segment-BPb1H6DW.mjs} +6 -5
  130. package/dist/segment-CZkk0g79.mjs +25 -0
  131. package/dist/{selectors-DlmZpo2L.mjs → selectors-B7MJUn3I.mjs} +3 -3
  132. package/dist/{set-active-oZOUe9V7.mjs → set-active-CF868qdW.mjs} +4 -6
  133. package/dist/{set-CLHJauzG.mjs → set-kyoORFG3.mjs} +10 -10
  134. package/dist/setting-BZgjURQ_.mjs +20 -0
  135. package/dist/{setup-D1de5Sbc.mjs → setup-D9joJYPb.mjs} +11 -12
  136. package/dist/{skills-B6gfH0iR.mjs → skills-BqI05u72.mjs} +1 -1
  137. package/dist/{skills-NhgVypJ7.mjs → skills-D8NrJxjp.mjs} +3 -3
  138. package/dist/{snippet-CtA2Pkoa.mjs → snippet-DWiXNy4T.mjs} +7 -4
  139. package/dist/snippet-y_FzKxaQ.mjs +22 -0
  140. package/dist/{stash-DoRwelwY.mjs → stash-BVMerTaF.mjs} +7 -9
  141. package/dist/{status-CmRgHTrV.mjs → status-C-0jFjFn.mjs} +4 -6
  142. package/dist/{status-BpMOlfsA.mjs → status-x8bDOa1i.mjs} +6 -8
  143. package/dist/{summary-BEu7pmpq.mjs → summary-B-R9SdMF.mjs} +5 -7
  144. package/dist/{sync-schema-DTUXubMg.mjs → sync-schema-wne2KXIW.mjs} +9 -11
  145. package/dist/{table-DE3i82T_.mjs → table-C3RIKiYM.mjs} +16 -4
  146. package/dist/table-CS2-2INi.mjs +21 -0
  147. package/dist/transform-6hqM1DXA.mjs +31 -0
  148. package/dist/{transform-DEF38FWe.mjs → transform-JQel7e5H.mjs} +31 -5
  149. package/dist/transform-job-DuERhLaj.mjs +25 -0
  150. package/dist/transform-tag-DaNKreDj.mjs +21 -0
  151. package/dist/{transforms-CWvMpLc9.mjs → transforms-DB2WNP2R.mjs} +5 -7
  152. package/dist/{tree-D18vYSe4.mjs → tree-BIOphGVs.mjs} +4 -6
  153. package/dist/{unpublish-CJbL4ZsC.mjs → unpublish-BWM36ZTg.mjs} +5 -7
  154. package/dist/{update-mr9todHq.mjs → update-6umfSz5t.mjs} +9 -10
  155. package/dist/{update-BjjZIe2W.mjs → update-7Ts7KrB8.mjs} +9 -10
  156. package/dist/{update-Doia9MP_.mjs → update-BCbv880u.mjs} +12 -13
  157. package/dist/{update-CSxwZ2us.mjs → update-BchtHlbH.mjs} +10 -11
  158. package/dist/{update-BvsvyBw9.mjs → update-BiUeEGU-.mjs} +12 -13
  159. package/dist/{update-DhOfrW1j.mjs → update-BlzcZwRQ.mjs} +18 -15
  160. package/dist/{update-Bos8nnv0.mjs → update-CTZg2Lia.mjs} +13 -14
  161. package/dist/{update-DV7IY7IQ.mjs → update-DJDuIhYG.mjs} +9 -10
  162. package/dist/{update-Dxa_6H2A.mjs → update-HxYcvpSq.mjs} +15 -15
  163. package/dist/{update-Ck0Kxv8u.mjs → update-Sz0QRGWB.mjs} +9 -10
  164. package/dist/{update-dashcard-CZUWZhal.mjs → update-dashcard-CfDpy7Lz.mjs} +11 -11
  165. package/dist/{update-7DacwIvi.mjs → update-zfLbmC-H.mjs} +9 -10
  166. package/dist/{upgrade-CBW8V9qZ.mjs → upgrade-BWl0VjMK.mjs} +5 -7
  167. package/dist/upload-CPzOhGeX.mjs +16 -0
  168. package/dist/{uuid-D6JVJ-R1.mjs → uuid-D_YeqDui.mjs} +3 -5
  169. package/dist/{validate-BqNW4Sk1.mjs → validate-clAWO3X-.mjs} +1 -2
  170. package/dist/{validate-query-CcZVKYPV.mjs → validate-query-CsK2_2_u.mjs} +2 -3
  171. package/dist/{values-DBvuGnnA.mjs → values-DSk8ZJ3B.mjs} +5 -7
  172. package/dist/{verify-LIShMNZ2.mjs → verify-DkQdLjf3.mjs} +2 -2
  173. package/dist/{wait-DUHze3_B.mjs → wait-DvSsMjea.mjs} +6 -8
  174. package/dist/{wait-flags-Ybpt98PK.mjs → wait-flags-dXGThljd.mjs} +2 -2
  175. package/package.json +1 -1
  176. package/skill-data/core/SKILL.md +31 -22
  177. package/skill-data/dashboard/SKILL.md +130 -0
  178. package/skill-data/data-workflow/SKILL.md +17 -15
  179. package/skill-data/data-workflow/references/building-clean-tables.md +1 -1
  180. package/skill-data/document/SKILL.md +3 -3
  181. package/skill-data/git-sync/SKILL.md +5 -5
  182. package/skill-data/mbql/SKILL.md +17 -17
  183. package/skill-data/mbql/references/operators.md +4 -3
  184. package/skill-data/metadata/SKILL.md +78 -0
  185. package/skill-data/metadata/references/semantic-types.md +83 -0
  186. package/skill-data/native-sql/SKILL.md +118 -0
  187. package/skill-data/native-sql/references/template-tags.md +178 -0
  188. package/skill-data/transform/SKILL.md +6 -6
  189. package/skill-data/visualization/SKILL.md +3 -3
  190. package/skill-data/visualization/references/settings.md +2 -0
  191. package/dist/add-collection-Dek6kiRI.mjs +0 -11
  192. package/dist/auth-Kv2MRkRk.mjs +0 -22
  193. package/dist/capabilities-N0jo5U7S.mjs +0 -239
  194. package/dist/card-Bp58WEUF.mjs +0 -26
  195. package/dist/collection-D8TI20Ir.mjs +0 -23
  196. package/dist/dashboard-C9pQCnX6.mjs +0 -28
  197. package/dist/db-DWykmBOh.mjs +0 -28
  198. package/dist/document-DNDm8_Py.mjs +0 -22
  199. package/dist/error-5H_tcfL8.mjs +0 -227
  200. package/dist/field-CFt1-KDR.mjs +0 -21
  201. package/dist/get-CDLa6LiC.mjs +0 -50
  202. package/dist/git-sync-ByvjqSiy.mjs +0 -31
  203. package/dist/is-dirty-D7UMN0mt.mjs +0 -10
  204. package/dist/manifest-BVf8P4bl.mjs +0 -126
  205. package/dist/measure-CgFwtL1r.mjs +0 -25
  206. package/dist/metadata-ClehtgZj.mjs +0 -39
  207. package/dist/metadata-DplshwI3.mjs +0 -38
  208. package/dist/notice-DyVl5aYB.mjs +0 -206
  209. package/dist/segment-BPC725mo.mjs +0 -25
  210. package/dist/setting-DHYO-W5g.mjs +0 -20
  211. package/dist/snippet-DtLmHr2J.mjs +0 -22
  212. package/dist/table-B1iBqmNu.mjs +0 -22
  213. package/dist/transform-BuIooRQh.mjs +0 -31
  214. package/dist/transform-job-C3yz0krA.mjs +0 -25
  215. package/dist/transform-tag-CJD6mJUe.mjs +0 -21
  216. /package/dist/{body-flags-DWTTxJpP.mjs → body-flags-CgHgJBRC.mjs} +0 -0
  217. /package/dist/{command-augment-DdZIfx1V.mjs → command-augment-D9pI9Vbh.mjs} +0 -0
  218. /package/dist/{paginate-FVZUxL4J.mjs → paginate-CMqbqhMC.mjs} +0 -0
  219. /package/dist/{parameter-CiJ4CwWE.mjs → parameter-BZ6y-Gfs.mjs} +0 -0
  220. /package/dist/{render-BTKnWL0d.mjs → render-CkuFkWlQ.mjs} +0 -0
  221. /package/dist/{revision-message-flag-CHrJgFFx.mjs → revision-message-flag-CHzX0cqV.mjs} +0 -0
  222. /package/dist/{setting-m46MUtW5.mjs → setting-Cko6bE_w.mjs} +0 -0
  223. /package/dist/{transform-job-CtixL4An.mjs → transform-job-CtVziW85.mjs} +0 -0
  224. /package/dist/{transform-tag-rsIrckCM.mjs → transform-tag-wFiWmiyO.mjs} +0 -0
@@ -1,16 +1,14 @@
1
- import "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
8
- import { readBody } from "./body-IcJ5kFtk.mjs";
9
- import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
10
- import "./validate-BqNW4Sk1.mjs";
11
- import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CcZVKYPV.mjs";
12
- import { Transform, TransformUpdateInput, transformView } from "./transform-DEF38FWe.mjs";
13
- import { enrichTransformCollectionError } from "./collection-namespace-CsaxEqOb.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 "./validate-clAWO3X-.mjs";
9
+ import { TRANSFORM_SOURCE_QUERY_LABELS, preflightMbql5Query, skipValidateFlag } from "./validate-query-CsK2_2_u.mjs";
10
+ import { Transform, TransformUpdateInput, transformView } from "./transform-JQel7e5H.mjs";
11
+ import { enrichTransformCollectionError } from "./collection-namespace-DqPNrCdQ.mjs";
14
12
 
15
13
  //#region src/commands/transform/update.ts
16
14
  var update_default = defineMetabaseCommand({
@@ -18,7 +16,7 @@ var update_default = defineMetabaseCommand({
18
16
  name: "update",
19
17
  description: "Update a transform by id (partial)"
20
18
  },
21
- details: "Patches only the fields you send (any of `name`, `source`, `target`, `tag_ids`, …). When a new `source.query` is an MBQL 5 query it is checked against a bundled JSON Schema before sending; pass --skip-validate to bypass.",
19
+ details: "Patches only the fields you send (any of `name`, `source`, `target`, `tag_ids`, …). When a new `source.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.",
22
20
  skills: [{
23
21
  skill: "mbql",
24
22
  purpose: "MBQL source.query bodies"
@@ -36,6 +34,7 @@ var update_default = defineMetabaseCommand({
36
34
  },
37
35
  ...skipValidateFlag
38
36
  },
37
+ inputSchema: TransformUpdateInput,
39
38
  outputSchema: Transform,
40
39
  examples: [
41
40
  "cat patch.json | mb transform update 1",
@@ -1,13 +1,11 @@
1
- import "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
8
- import { readBody } from "./body-IcJ5kFtk.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import "./field-CMY_LWUe.mjs";
8
- import "./parameter-CiJ4CwWE.mjs";
9
- import { Card, CardUpdateInput, cardView } from "./card-DEmcRlNO.mjs";
10
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
11
- import { readBody } from "./body-IcJ5kFtk.mjs";
12
- import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
13
- import "./validate-BqNW4Sk1.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
8
- import { readBody } from "./body-IcJ5kFtk.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import "./parameter-CiJ4CwWE.mjs";
8
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
9
- import { readBody } from "./body-IcJ5kFtk.mjs";
10
- import { bodyInputFlags } from "./body-flags-DWTTxJpP.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import "./input-7Sj85_K7.mjs";
7
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
8
- import { readBody } from "./body-IcJ5kFtk.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { outputFlags, package_default } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { HttpError, USER_AGENT, combineAborts, defineMetabaseCommand, parseJson, throwIfAborted } from "./runtime-BJtuxWM8.mjs";
5
- import { renderItem, writeText } from "./capabilities-N0jo5U7S.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { outputFlags } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand, parseInteger } from "./runtime-BJtuxWM8.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 "./notice-DyVl5aYB.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { writeJson } from "./capabilities-N0jo5U7S.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { formatScalar, renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import { FieldValues, fieldValuesView } from "./field-CMY_LWUe.mjs";
7
- import { parseId } from "./parse-id-D4LeTUsP.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 "./notice-DyVl5aYB.mjs";
2
- import { HttpError, createClient, probeServer } from "./runtime-BJtuxWM8.mjs";
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 "./notice-DyVl5aYB.mjs";
2
- import { connectionFlags, outputFlags, profileFlag } from "./error-5H_tcfL8.mjs";
3
- import "./command-augment-DdZIfx1V.mjs";
4
- import { defineMetabaseCommand } from "./runtime-BJtuxWM8.mjs";
5
- import { renderSummary } from "./capabilities-N0jo5U7S.mjs";
6
- import { parseId } from "./parse-id-D4LeTUsP.mjs";
7
- import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-BpAJpvb-.mjs";
8
- import { SyncTaskOrIdle, formatSyncTask, pollSyncTask, syncTaskIdleView, syncTaskView, throwIfFailedTask } from "./poll-task-TilgciQn.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-D4LeTUsP.mjs";
2
- import { DEFAULT_INTERVAL_MS, DEFAULT_TIMEOUT_MS } from "./poll-BpAJpvb-.mjs";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metabase/cli",
3
- "version": "0.1.17",
3
+ "version": "0.2.0",
4
4
  "description": "Metabase CLI",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -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 `mb __manifest`, and the per-resource footguns (db, table, field, card, dashboard, collection, segment, measure, library, setting, search, eid). Load first for any `mb` task; it routes to the specialized skills for deeper work.
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, examples, and output schemas live in `mb __manifest`. 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.
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 65536; `0` disables. Single-item commands (`get`, `metadata`) 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…"); raise `--max-bytes` or narrow with `--fields`.
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": false
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
- ## Discover the full surface: `mb __manifest`
105
+ ## Discovering commands and schemas
106
+
107
+ Cheapest source that answers the question wins:
103
108
 
104
- The canonical, machine-readable inventory of every command — name, description, per-command `details`, examples, every flag with type and default, and the output JSON Schema:
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 __manifest | jq -r '.commands[].command' # every command name
108
- mb __manifest | jq -r '.commands[] | select(.command | startswith("transform")) | .command' # verbs under "transform"
109
- mb __manifest | jq '.commands[] | select(.command == "card query") | .args' # flags + types for a command
110
- mb __manifest | jq '.commands[] | select(.command == "card list") | .outputSchema' # output schema before parsing
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 `mb __manifest`. Below is only what the manifest does _not_ tell you: footguns and non-obvious behaviors.
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 vs. rollup.** Default to granular: `database list` → `database schemas <db-id>` → `database schema-tables <db-id> <schema>` → `table get <table-id> --include fields`. The rollup endpoints (`database get --include tables.fields`, `database metadata <db-id>`) pull megabytes and blow the context window on any real warehouse — use them only on a small/dev db. `sync-schema` / `rescan-values` queue async work and return `{status:"ok"}` immediately; `sync-schema --wait` blocks until `initial_sync_status: complete`.
120
- - **table fields.** `table get` never returns fields on its own — pass `--include fields` (compact) or use `table fields <id>` (list envelope). `table metadata <id>` adds FKs + dimensions (heavier). `table update` patches table-level metadata only; physical columns aren't editable.
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.
@@ -131,14 +137,17 @@ Routine verb shapes (list / get / create / update), every flag, and output schem
131
137
  - **setup is one-shot.** `mb setup` walks `/api/setup` for a **fresh** instance only — errors against an already-configured one. Mostly for bootstrapping local / e2e instances.
132
138
  - **eid** translates a string entity id → numeric id: `mb eid --model <model> <eid1,eid2> --json`. Entity ids are NanoIDs that can start with `-`, which the positional form misreads as a flag (shell quotes don't help) — for those, use `--body '{"entity_ids":{"card":["-…"]}}'` (the id is a JSON string value, immune to flag parsing).
133
139
  - **library.** EE-only (`library` premium feature, v59+). The Library is a curated subtree (`library-data` "Data" + `library-metrics` "Metrics" under a `library` root): tables published to **Data** appear first in data pickers and rank up in search; metrics saved to **Metrics** are prioritized in nav, search, and the query builder — it's how you tell people (and agents) "start from these, they're trusted." `library get` shows the Library and its Data/Metrics collection ids; `library create` provisions it (idempotent). `library publish --table-ids/--db-ids/--schemas` publishes tables into Data — it **resolves the Data collection itself and creates the Library if absent** (no collection id to find); each `--schemas` entry is `<db-id>:<schema>` (e.g. `1:public`), not a bare name. `publish` cascades to upstream FK dependencies, `unpublish` to downstream dependents; both need **admin or data-analyst** (Curate alone won't publish) and exit **403** without write **and** query permission on every affected table. Publish status shows on the table: `table get`/`table list` carry `is_published` (`collection_id` under `--full`). Good candidates are finished, analysis-ready tables — clean/combine via transforms first, then publish the polished result.
134
- - **query / uuid.** `mb query` is the ad-hoc MBQL surface (`--print-schema` → `--dry-run` → run); `mb uuid --count <n>` mints the `lib/uuid` values every MBQL 5 clause needs. Both live in `mbql`.
140
+ - **query / uuid.** `mb query` is the ad-hoc MBQL surface (`--print-schema` → `--dry-run` → run); `mb uuid --count <n>` mints the `lib/uuid` values MBQL clauses need. Both live in `mbql`.
135
141
 
136
142
  ## Specialized skills (load on demand)
137
143
 
138
144
  This file is enough for any single-command task. For anything deeper, load the relevant skill **proactively** — don't wing an MBQL body, a transform body, or the git-sync workflow from this overview. Load via `mb skills get <name>`.
139
145
 
140
146
  - **`mbql`** — authoring/fixing any MBQL query body (`mb query`, card `dataset_query`, transform `source.query`, measure/segment `definition`); reading `--dry-run` errors. The query-body reference.
147
+ - **`native-sql`** — authoring a native SQL `dataset_query` with parameters: template tags, field filters vs. raw variables, snippets, card references, and wiring a tag to a dashboard filter. The SQL fallback when MBQL can't express it (`mbql` first).
141
148
  - **`visualization`** — choosing a card's `display` and authoring `visualization_settings`. The presentation counterpart to `mbql`.
149
+ - **`dashboard`** — building interactive dashboards: wiring filters (parameters + mappings), linked/cascading filters, cross-filtering, click behavior, series, and tabs. Load beyond a plain card-layout task.
150
+ - **`metadata`** — setting field/table metadata: semantic types, foreign-key targets, dropdown/scan behavior, and column visibility, and the downstream features each unlocks. Load when editing what a column _means_, not its data.
142
151
  - **`transform`** — transform body JSON, create + run-with-wait, run inspection, tags, jobs.
143
152
  - **`document`** — Metabase documents (TipTap body, embedding cards).
144
153
  - **`git-sync`** — round-tripping content to/from a git remote.