@xano/sdk 1.0.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 (336) hide show
  1. package/CHANGELOG.md +788 -0
  2. package/LICENSE +21 -0
  3. package/README.md +541 -0
  4. package/dist/.build-fingerprint +1 -0
  5. package/dist/agent-file-refresh-ZEMK33AX.js +38 -0
  6. package/dist/answer-shape-K67TAAPY.js +33 -0
  7. package/dist/backend-dir-2U53CIAL.js +39 -0
  8. package/dist/backend-slot-7QXW2QYC.js +28 -0
  9. package/dist/bin.d.ts +1 -0
  10. package/dist/bin.js +255 -0
  11. package/dist/branch-NCRNWQBQ.js +61 -0
  12. package/dist/branch-commands-ACIRCEQJ.js +79 -0
  13. package/dist/bundle.d.ts +223 -0
  14. package/dist/bundle.js +153 -0
  15. package/dist/capture-WAXPD7DR.js +41 -0
  16. package/dist/chunk-27GWNP2I.js +23 -0
  17. package/dist/chunk-2CMJZDCL.js +177 -0
  18. package/dist/chunk-2EZ3ZJZZ.js +302 -0
  19. package/dist/chunk-2GNFDZA2.js +390 -0
  20. package/dist/chunk-2MNLRIOX.js +11 -0
  21. package/dist/chunk-2TFRR6JV.js +104 -0
  22. package/dist/chunk-2ZUEE4EK.js +408 -0
  23. package/dist/chunk-36JUQZVQ.js +22 -0
  24. package/dist/chunk-3DRXWLJ5.js +83 -0
  25. package/dist/chunk-3JDU4VRL.js +137 -0
  26. package/dist/chunk-3KZCLN4Z.js +241 -0
  27. package/dist/chunk-3LDULPRE.js +168 -0
  28. package/dist/chunk-3M4LFYNQ.js +111 -0
  29. package/dist/chunk-3XI5CTUE.js +22 -0
  30. package/dist/chunk-3YW23UFH.js +50 -0
  31. package/dist/chunk-45UIT5T2.js +862 -0
  32. package/dist/chunk-4BW2SG2N.js +46 -0
  33. package/dist/chunk-4KHEMC32.js +79 -0
  34. package/dist/chunk-4POWHT2K.js +321 -0
  35. package/dist/chunk-4Q2GN7NW.js +192 -0
  36. package/dist/chunk-5A2PLKZB.js +70 -0
  37. package/dist/chunk-5FBYXK5P.js +159 -0
  38. package/dist/chunk-5HVXPTU4.js +323 -0
  39. package/dist/chunk-5QU2P5CA.js +304 -0
  40. package/dist/chunk-5V5XU32D.js +191 -0
  41. package/dist/chunk-5ZSO4T2G.js +10 -0
  42. package/dist/chunk-622HUCZT.js +10 -0
  43. package/dist/chunk-65HWOMGV.js +177 -0
  44. package/dist/chunk-6ELFRN3P.js +365 -0
  45. package/dist/chunk-6HO3NCSJ.js +1055 -0
  46. package/dist/chunk-6IUMKYWI.js +457 -0
  47. package/dist/chunk-6KEB3C3U.js +65 -0
  48. package/dist/chunk-6MR5TI5V.js +987 -0
  49. package/dist/chunk-6NNTNXN7.js +157 -0
  50. package/dist/chunk-6PBR37LN.js +97 -0
  51. package/dist/chunk-6QXLMMT3.js +155 -0
  52. package/dist/chunk-6ZGJCBZS.js +224 -0
  53. package/dist/chunk-73IVBKMA.js +250 -0
  54. package/dist/chunk-7G3CTU7I.js +286 -0
  55. package/dist/chunk-A3UDOZB6.js +222 -0
  56. package/dist/chunk-A6E77GDW.js +85 -0
  57. package/dist/chunk-AHJWCYQO.js +660 -0
  58. package/dist/chunk-AKNCFVKZ.js +36 -0
  59. package/dist/chunk-AM4FKL4J.js +237 -0
  60. package/dist/chunk-AN6BL47T.js +26 -0
  61. package/dist/chunk-AOSYVMUS.js +147 -0
  62. package/dist/chunk-APWXY5SL.js +182 -0
  63. package/dist/chunk-AWEIIR2U.js +218 -0
  64. package/dist/chunk-AWQ7BQTQ.js +73 -0
  65. package/dist/chunk-BAUZOWGX.js +393 -0
  66. package/dist/chunk-BHACRS6R.js +940 -0
  67. package/dist/chunk-BWPNT55T.js +680 -0
  68. package/dist/chunk-C6RIMRU4.js +187 -0
  69. package/dist/chunk-CGVQZXYG.js +263 -0
  70. package/dist/chunk-CIMQZRRE.js +162 -0
  71. package/dist/chunk-CJHQKJU4.js +113 -0
  72. package/dist/chunk-CTMO46PK.js +1897 -0
  73. package/dist/chunk-D53J55C5.js +106 -0
  74. package/dist/chunk-D7VGG3WS.js +90 -0
  75. package/dist/chunk-DAD3ONIS.js +245 -0
  76. package/dist/chunk-DGWHAVRG.js +162 -0
  77. package/dist/chunk-DX4QR4B2.js +483 -0
  78. package/dist/chunk-EHP3WPEG.js +21 -0
  79. package/dist/chunk-ELP2HMXC.js +432 -0
  80. package/dist/chunk-ERVIASGL.js +21 -0
  81. package/dist/chunk-ET4Y4XCB.js +865 -0
  82. package/dist/chunk-ETO6LGLD.js +4750 -0
  83. package/dist/chunk-EUUUMY7J.js +24 -0
  84. package/dist/chunk-FQJ2TTHP.js +218 -0
  85. package/dist/chunk-FQOF7E2E.js +133 -0
  86. package/dist/chunk-FWD7AL6N.js +21 -0
  87. package/dist/chunk-FXFV3KU6.js +138 -0
  88. package/dist/chunk-FXRQOWTE.js +171 -0
  89. package/dist/chunk-G554NZNI.js +210 -0
  90. package/dist/chunk-GSGDWJB5.js +13 -0
  91. package/dist/chunk-H2V3N23D.js +66 -0
  92. package/dist/chunk-H5C7MBCR.js +159 -0
  93. package/dist/chunk-HHN734BU.js +371 -0
  94. package/dist/chunk-HRVBLCVJ.js +243 -0
  95. package/dist/chunk-HVRUQXGD.js +1264 -0
  96. package/dist/chunk-I4F5TCJH.js +130 -0
  97. package/dist/chunk-IDOTCMDV.js +57 -0
  98. package/dist/chunk-IGOLHKWF.js +427 -0
  99. package/dist/chunk-JGE7CAWB.js +148 -0
  100. package/dist/chunk-JTUKLCXS.js +92 -0
  101. package/dist/chunk-JZGVVJSI.js +66 -0
  102. package/dist/chunk-K4WX6UUU.js +923 -0
  103. package/dist/chunk-K5BBGTYZ.js +217 -0
  104. package/dist/chunk-K6RXBGUB.js +427 -0
  105. package/dist/chunk-KTSDSD36.js +165 -0
  106. package/dist/chunk-L5JYN3NM.js +1038 -0
  107. package/dist/chunk-LIEOKXKD.js +354 -0
  108. package/dist/chunk-LLNZGEFK.js +51 -0
  109. package/dist/chunk-LPECSJ2J.js +55 -0
  110. package/dist/chunk-LQCMKAJ7.js +413 -0
  111. package/dist/chunk-LRN4ZJCQ.js +1145 -0
  112. package/dist/chunk-MJ4ZVHKN.js +17 -0
  113. package/dist/chunk-MXHSQOC4.js +3061 -0
  114. package/dist/chunk-N5GKCWE5.js +367 -0
  115. package/dist/chunk-NA3PXMEF.js +10 -0
  116. package/dist/chunk-NAQDMEHV.js +76 -0
  117. package/dist/chunk-NWKXM5RD.js +109 -0
  118. package/dist/chunk-NZOWWHU5.js +196 -0
  119. package/dist/chunk-OHX6MIUZ.js +184 -0
  120. package/dist/chunk-OOXWYAA4.js +15 -0
  121. package/dist/chunk-OPHB5ORL.js +1990 -0
  122. package/dist/chunk-OXA6PSZT.js +1725 -0
  123. package/dist/chunk-P2HAGF6H.js +73 -0
  124. package/dist/chunk-PTHVMXZI.js +3036 -0
  125. package/dist/chunk-PZ5AY32C.js +10 -0
  126. package/dist/chunk-Q325JKYB.js +189 -0
  127. package/dist/chunk-Q7DGTQ5G.js +255 -0
  128. package/dist/chunk-QCNYHBL7.js +601 -0
  129. package/dist/chunk-QO6BVGS5.js +145 -0
  130. package/dist/chunk-QXTKSOFI.js +76 -0
  131. package/dist/chunk-ROY4YAEQ.js +66 -0
  132. package/dist/chunk-RTJRZFFY.js +447 -0
  133. package/dist/chunk-SAVJUS2X.js +128 -0
  134. package/dist/chunk-SFLHVCKX.js +173 -0
  135. package/dist/chunk-STSFNCY4.js +127 -0
  136. package/dist/chunk-SWBF2LTK.js +170 -0
  137. package/dist/chunk-T5KELPAR.js +109 -0
  138. package/dist/chunk-TFFGOFVZ.js +1481 -0
  139. package/dist/chunk-TLHIFK4M.js +256 -0
  140. package/dist/chunk-TLQE7ZN3.js +156 -0
  141. package/dist/chunk-TPHWJ7UG.js +1981 -0
  142. package/dist/chunk-TRJCALW3.js +291 -0
  143. package/dist/chunk-TTEIYD5P.js +133 -0
  144. package/dist/chunk-U64O2MXY.js +407 -0
  145. package/dist/chunk-UCQ2VUTG.js +630 -0
  146. package/dist/chunk-UTI5G6OJ.js +44 -0
  147. package/dist/chunk-UVHDMMIP.js +188 -0
  148. package/dist/chunk-UZ6QQWJT.js +120 -0
  149. package/dist/chunk-VAX3UZOY.js +686 -0
  150. package/dist/chunk-W3HBUKFO.js +57 -0
  151. package/dist/chunk-WKQLGKCL.js +2823 -0
  152. package/dist/chunk-WQFNASK4.js +560 -0
  153. package/dist/chunk-WRBKLYSJ.js +224 -0
  154. package/dist/chunk-WTPZRR4I.js +17 -0
  155. package/dist/chunk-WZDJ2LLX.js +2385 -0
  156. package/dist/chunk-X2NL4KUO.js +14 -0
  157. package/dist/chunk-X4DVXBFY.js +38 -0
  158. package/dist/chunk-X677DMZM.js +7050 -0
  159. package/dist/chunk-XBKMWY7F.js +612 -0
  160. package/dist/chunk-XNCP4KYO.js +78 -0
  161. package/dist/chunk-XVBGLISP.js +35 -0
  162. package/dist/chunk-XW6KISBB.js +1192 -0
  163. package/dist/chunk-YGZHHAAB.js +8156 -0
  164. package/dist/chunk-YHEFQUQB.js +186 -0
  165. package/dist/chunk-YLDALTWZ.js +653 -0
  166. package/dist/chunk-YU4HSQW7.js +229 -0
  167. package/dist/chunk-ZDPP6RKB.js +27 -0
  168. package/dist/chunk-ZFDZKNGG.js +194 -0
  169. package/dist/chunk-ZIY7RNUT.js +49 -0
  170. package/dist/chunk-ZYJP6BOO.js +30 -0
  171. package/dist/cli.d.ts +1111 -0
  172. package/dist/cli.js +165 -0
  173. package/dist/codegen-command-VR2GWR6C.js +173 -0
  174. package/dist/codegen.d.ts +115 -0
  175. package/dist/codegen.js +19 -0
  176. package/dist/commands-GJMJ4XYZ.js +76 -0
  177. package/dist/completion-ZQLO6PB6.js +738 -0
  178. package/dist/config-MBYGCAFK.js +136 -0
  179. package/dist/deploy-command-JVZPWHMK.js +180 -0
  180. package/dist/deploy-source-3W45CXMP.js +81 -0
  181. package/dist/dev-env-sync-HN44K4D5.js +188 -0
  182. package/dist/diagnostics-UEAAHWVF.js +30 -0
  183. package/dist/display-name-hint-ABBPVQIR.js +46 -0
  184. package/dist/emit-CyhBDxli.d.ts +7007 -0
  185. package/dist/env-example-refresh-ET5HMMDW.js +126 -0
  186. package/dist/env-pull-command-TNMNB3CV.js +323 -0
  187. package/dist/env-target-O4HRKTGZ.js +40 -0
  188. package/dist/env-var-command-ZIRDCAZA.js +427 -0
  189. package/dist/ephemeral-P7F3PMAD.js +54 -0
  190. package/dist/ephemeral-command-CLJJKOFT.js +592 -0
  191. package/dist/ephemeral-state-PYCBSOGX.js +61 -0
  192. package/dist/file-lock-PT74GWYW.js +10 -0
  193. package/dist/generate-command-AYEOLA26.js +510 -0
  194. package/dist/gitignore-3SJ3WNRG.js +51 -0
  195. package/dist/guards-4EBNCZDC.js +162 -0
  196. package/dist/hosted-file-PSHJB3HX.js +28 -0
  197. package/dist/impersonate-command-5JAS3WSV.js +152 -0
  198. package/dist/import-EQSFU6JC.js +19 -0
  199. package/dist/index.d.ts +5470 -0
  200. package/dist/index.js +371 -0
  201. package/dist/init-command-X2FR4UAK.js +125 -0
  202. package/dist/init-modules-RY7UHAOL.js +50 -0
  203. package/dist/init-web-M4YZSZK6.js +42 -0
  204. package/dist/internal.d.ts +179 -0
  205. package/dist/internal.js +2634 -0
  206. package/dist/io-RC56QSN5.js +26 -0
  207. package/dist/keep-data-merge-7MPLVAVI.js +1119 -0
  208. package/dist/lambda-config-reconcile-OUZ4OYAB.js +116 -0
  209. package/dist/landed-753YLJ5H.js +40 -0
  210. package/dist/landing-record-SU52SKXU.js +61 -0
  211. package/dist/live-diff-YONW2VI3.js +65 -0
  212. package/dist/local-engine-choice-CH5X3W7E.js +79 -0
  213. package/dist/local-engine-command-Z3OL7VOD.js +766 -0
  214. package/dist/local-engine-config-5U3SC434.js +39 -0
  215. package/dist/local-engine-deploy-PCQ4SNPB.js +39 -0
  216. package/dist/local-engine-process-EHTE5LLU.js +63 -0
  217. package/dist/local-engine-state-A4FTRFAF.js +32 -0
  218. package/dist/local-engine-update-check-6L645VBL.js +162 -0
  219. package/dist/lock-MRRHW5GS.js +87 -0
  220. package/dist/lock-commands-2QG25HL7.js +963 -0
  221. package/dist/login-command-QPYRWOXZ.js +538 -0
  222. package/dist/logout-command-WOIQLDP6.js +56 -0
  223. package/dist/loop-ALIZLOSX.js +191 -0
  224. package/dist/marketplace-command-K5YL42NO.js +977 -0
  225. package/dist/marketplace-resolve-LY32JES5.js +40 -0
  226. package/dist/meta-client-YXGPW53C.js +244 -0
  227. package/dist/module-manifest-JFGHU2TC.js +38 -0
  228. package/dist/near-key.d.ts +13 -0
  229. package/dist/near-key.js +8 -0
  230. package/dist/node.d.ts +95 -0
  231. package/dist/node.js +969 -0
  232. package/dist/operation-outcome-TZSESNC7.js +51 -0
  233. package/dist/output-target-AL3I44GG.js +47 -0
  234. package/dist/package-manager-PRAHUSCN.js +34 -0
  235. package/dist/plan-disclosure-6G4MLZKD.js +114 -0
  236. package/dist/plugin-contributions-WRNY5ABG.js +28 -0
  237. package/dist/plugin-prompt-4VA3B4FF.js +20 -0
  238. package/dist/plugin-questions-JTSYA74Q.js +24 -0
  239. package/dist/plugin.d.ts +396 -0
  240. package/dist/plugin.js +1 -0
  241. package/dist/preflight-command-2T5Z36MI.js +321 -0
  242. package/dist/profile-command-AH3PIM4X.js +800 -0
  243. package/dist/profile-pointer-GRWJU3YD.js +31 -0
  244. package/dist/profile-select-74TRDEPD.js +23 -0
  245. package/dist/project-dependency-KSH63ODT.js +35 -0
  246. package/dist/project-sdk-REPPOIBD.js +24 -0
  247. package/dist/promote-command-PCWT5N6S.js +140 -0
  248. package/dist/prompt-II3F3LND.js +27 -0
  249. package/dist/publish-command-TTDUUJI5.js +414 -0
  250. package/dist/pull-command-VBO7C4S3.js +161 -0
  251. package/dist/pull-superseded-GJWLG7XO.js +20 -0
  252. package/dist/release-command-N4ZPKMHR.js +146 -0
  253. package/dist/release-ns-command-3KFDMZ6G.js +1745 -0
  254. package/dist/response-HlXahv4K.d.ts +925 -0
  255. package/dist/retry-command-AS5EVREX.js +34 -0
  256. package/dist/routes-manifest-SNWUVBT6.js +43 -0
  257. package/dist/runtime-XETHVF33.js +14 -0
  258. package/dist/scaffold.d.ts +1911 -0
  259. package/dist/scaffold.js +107 -0
  260. package/dist/secrets-file-LVZD6IIM.js +56 -0
  261. package/dist/secrets-fill-command-TTCPSVXN.js +218 -0
  262. package/dist/seed-VU7C3QYS.js +46 -0
  263. package/dist/sent-writes-N7X4OVXT.js +22 -0
  264. package/dist/source-resolve-S2XA3XZF.js +83 -0
  265. package/dist/static-host-B2Y6AG3W.js +352 -0
  266. package/dist/status-command-RUDXTF7I.js +554 -0
  267. package/dist/store-6VNCD4D7.js +20 -0
  268. package/dist/store-ARM6VMO5.js +98 -0
  269. package/dist/store-DuYfzKlW.d.ts +3144 -0
  270. package/dist/suggest-6FOOYKHG.js +12 -0
  271. package/dist/sveltekit.d.ts +154 -0
  272. package/dist/sveltekit.js +109 -0
  273. package/dist/sync-contributions-UCEROO26.js +415 -0
  274. package/dist/table-ENAVMITR.js +42 -0
  275. package/dist/tables-command-GUPXXSB5.js +156 -0
  276. package/dist/tenant-IIHPOHGP.js +42 -0
  277. package/dist/tenant-command-D5HGI2X4.js +965 -0
  278. package/dist/test-command-TIKZMDPZ.js +476 -0
  279. package/dist/tests-BGGIOK3L.js +26 -0
  280. package/dist/token-NICJUTMT.js +72 -0
  281. package/dist/toolchain-hooks-GHKLUJOH.js +96 -0
  282. package/dist/toolchain-modules-5EAZUONB.js +24 -0
  283. package/dist/tracked-backend-EIBUMDZA.js +80 -0
  284. package/dist/update-check-2W2NLDTC.js +136 -0
  285. package/dist/upgrade-command-QHNFWM7O.js +531 -0
  286. package/dist/verify-rollout-DRCK5TDD.js +61 -0
  287. package/dist/whoami-command-STGINTXH.js +51 -0
  288. package/dist/workspace-2CLHU2LK.js +93 -0
  289. package/dist/workspace-binding-56PIIPCP.js +54 -0
  290. package/dist/workspace-command-JEXQETJD.js +535 -0
  291. package/dist/workspace-env-F2RFMSC5.js +70 -0
  292. package/dist/workspace-export-OJSH2HIW.js +21 -0
  293. package/dist/writable-VA7OISSK.js +25 -0
  294. package/dist/xano-ICFUSPFR.js +42 -0
  295. package/dist/xanosdk-import-GN42TO2B.js +56 -0
  296. package/dist/xanosdk-project-S6DXJONQ.js +41 -0
  297. package/dist/xdo-CxDr2Q1C.d.ts +1371 -0
  298. package/guides/README.md +33 -0
  299. package/guides/authoring.md +921 -0
  300. package/guides/cli.md +401 -0
  301. package/guides/codegen.md +177 -0
  302. package/guides/codes.md +404 -0
  303. package/guides/coverage.md +74 -0
  304. package/guides/deploying.md +1525 -0
  305. package/guides/environment.md +400 -0
  306. package/guides/marketplace.md +415 -0
  307. package/guides/module-contract.md +558 -0
  308. package/guides/object-kinds.md +433 -0
  309. package/guides/project-structure.md +43 -0
  310. package/guides/scaffold.md +351 -0
  311. package/guides/typed-frontend.md +242 -0
  312. package/llms/client.md +63 -0
  313. package/llms/errors.md +56 -0
  314. package/llms/fields.md +176 -0
  315. package/llms/filters.md +183 -0
  316. package/llms/kinds-agent-mcp.md +30 -0
  317. package/llms/kinds-core.md +100 -0
  318. package/llms/kinds-knowledge.md +20 -0
  319. package/llms/kinds-realtime.md +76 -0
  320. package/llms/lambda.md +94 -0
  321. package/llms/legacy.md +44 -0
  322. package/llms/lock.md +40 -0
  323. package/llms/object-kinds.md +34 -0
  324. package/llms/statements-calls.md +62 -0
  325. package/llms/statements-catalog.md +320 -0
  326. package/llms/statements-data.md +66 -0
  327. package/llms/statements-runtime.md +68 -0
  328. package/llms/tests.md +59 -0
  329. package/llms/toolchain.md +16 -0
  330. package/llms/triggers.md +36 -0
  331. package/llms/values.md +29 -0
  332. package/llms-full.txt +2085 -0
  333. package/llms.txt +493 -0
  334. package/manifest.json +11224 -0
  335. package/package.json +162 -0
  336. package/types/lambda-globals.d.ts +129 -0
@@ -0,0 +1,415 @@
1
+ # The marketplace
2
+
3
+ Finding published add-ons, adding one to the project you are standing in, and what the CLI does that `npm install` does not.
4
+
5
+ An **add-on** is an ordinary npm package that declares itself to Xano SDK in its own
6
+ `package.json`. The marketplace is the public catalogue of them, plus the six `xanosdk
7
+ marketplace` verbs that find one and change what your project has installed.
8
+
9
+ ```bash
10
+ xanosdk marketplace list # every published add-on, newest first
11
+ xanosdk marketplace search auth # narrow by keyword
12
+ xanosdk marketplace details @xano-sdk/auth # what it installs, and how to register it
13
+ xanosdk marketplace details @xano-sdk/auth --prompt # ...as instructions for a coding agent
14
+
15
+ xanosdk marketplace install @xano-sdk/auth # add it to the project you are in
16
+ xanosdk marketplace reinstall <toolchain-package> # re-ask a toolchain module its questions
17
+ xanosdk marketplace remove <toolchain-package> # uninstall it and drop what it contributed
18
+ ```
19
+
20
+ The split is deliberate. The three read verbs hit a public catalogue: no token, no
21
+ credential file, and they work signed out, so discovery is a first-class verb rather than
22
+ something you do in a browser before you can use the CLI. The three writing verbs touch no
23
+ network of their own and shell out to npm, so changing what a project has installed keeps
24
+ working when the catalogue does not.
25
+
26
+ ## The two kinds of module
27
+
28
+ Every add-on is one of two kinds, and which one it is decides everything about how you use
29
+ it. The kind comes from the module's own `package.json`:
30
+
31
+ ```json
32
+ { "xanosdk": { "kind": "toolchain" } }
33
+ ```
34
+
35
+ A **workspace module** (`@xano-sdk/auth`, `@xano-sdk/vector`, `@xano-sdk/chatbot`) adds tables and
36
+ endpoints to the bundle you deploy. You install it, import it in `xano/index.ts`, and call
37
+ its register function. What it contributes ships to your instance. This is the default: a
38
+ module that declares no `kind` is a workspace module, which is why every add-on published
39
+ before the toolchain kind existed still works.
40
+
41
+ A **toolchain module** (`@xano-sdk/xanoscript`) extends the **CLI** instead. It adds nothing to
42
+ the workspace, and registering it in `xano/index.ts` would be meaningless because there is
43
+ nothing to register. What it does is participate in commands: it declares questions the
44
+ CLI asks you, contributes lines to files your project owns, and runs hooks when a bundle
45
+ is compiled or a workspace is checked.
46
+
47
+ `install` tells you which one arrived, because the next step differs:
48
+
49
+ ```
50
+ ✓ Installed @xano-sdk/auth.
51
+ Import it in your backend (`xano/index.ts`) and register it onto your workspace.
52
+ ```
53
+
54
+ ```
55
+ ✓ Installed @xano-sdk/xanoscript.
56
+ Extends the CLI (nothing to register). Configured in this project's package.json "xanosdk" block.
57
+ ```
58
+
59
+ A module whose `kind` is a string the CLI does not recognize is reported and read as an
60
+ ordinary package rather than defaulted to one kind or the other. That is a typo in the
61
+ module's own manifest, and guessing which loader it meant would run code the manifest did
62
+ not describe.
63
+
64
+ ## Finding an add-on
65
+
66
+ `list` prints the whole catalogue, newest first. `search` matches a keyword across title,
67
+ slug, package name, tagline and description, and extra terms are joined into one phrase
68
+ rather than dropped, so `search ai agent` searches for "ai agent".
69
+
70
+ Both print a formatted summary to a terminal and stable JSON to a pipe. There is no flag to
71
+ discover: an agent gets the machine shape by doing what an agent already does.
72
+
73
+ ```bash
74
+ xanosdk marketplace search auth | jq -r '.modules[].npm_package'
75
+ ```
76
+
77
+ Each JSON row is the whole record `details` returns — `description`, `includes`,
78
+ `requirements`, `register_snippet`, `agent_prompt` — so one `list` fills a catalogue without a
79
+ `details` call per module. A row also carries `kind` (`workspace` or `toolchain`) when the
80
+ catalogue records it; a row without it says nothing about the kind until the package is
81
+ installed.
82
+
83
+ The headline field in a listing is `npm_package`, because that is the string you retype into
84
+ `install`. The `slug` names the module's web page and is deliberately absent from the
85
+ terminal rendering: printing it beside an install line invites someone to install it.
86
+
87
+ `details` is the one to reach for when wiring an add-on. It prints the long description, the
88
+ objects the module puts on your workspace, what you have to supply yourself, the
89
+ `xano/index.ts` registration to copy, and the install line:
90
+
91
+ The rendering has a fixed shape, filled from the module's own catalogue record:
92
+
93
+ ```
94
+ <Title>
95
+ <tagline>
96
+
97
+ <the long description>
98
+
99
+ Package @scope/name
100
+ Tags a · b
101
+ Docs <docs_url>
102
+ Repo <repo_url>
103
+
104
+ Installs
105
+ table <name> — <item summary>
106
+ endpoint <name> — <item summary>
107
+
108
+ You supply
109
+ • <what the module cannot provide for you>
110
+
111
+ Register it
112
+ <the xano/index.ts snippet, verbatim>
113
+
114
+ xanosdk marketplace install @scope/name
115
+ xanosdk marketplace details @scope/name --prompt to hand the wiring to a coding agent
116
+ ```
117
+
118
+ The `Installs` rows carry one of `table`, `endpoint`, `function`, `task`, `trigger`, `agent`,
119
+ `mcp`, `middleware`. A toolchain module lists none of them, because it puts nothing on the
120
+ workspace.
121
+
122
+ `--prompt` emits the publisher's own wiring instructions, raw and alone, written to be piped
123
+ straight into a coding agent. It belongs to `details` and is refused on every other verb: a
124
+ flag that parses cleanly and then does nothing is worse than one that fails.
125
+
126
+ `details` takes an npm package name or a slug. A miss prints the catalogue's own sentence
127
+ plus a pointer at `search`, because a miss is usually a half-remembered name.
128
+
129
+ A module that has been **removed** from the marketplace keeps its name reserved and is
130
+ warned about before every output mode, `--prompt` included, on stderr so a piped prompt is
131
+ unaffected. Soft-deleted modules are dropped from `list` entirely.
132
+
133
+ ### Pointing the reads somewhere else
134
+
135
+ `XANOSDK_MARKETPLACE_URL` repoints all three read verbs. The catalogue host is otherwise
136
+ hardcoded in a published package, so a move would break every installed copy of the CLI at
137
+ once and only a release would fix it. See [Environment & identity](environment.md).
138
+
139
+ ## Installing
140
+
141
+ ```bash
142
+ xanosdk marketplace install @xano-sdk/auth
143
+ ```
144
+
145
+ The argument is resolved through the marketplace the way `details` resolves it, before npm
146
+ runs: a module's npm name or its slug (`xanosdk marketplace install auth` installs
147
+ `@xano-sdk/auth`), keeping any version or tag (`auth@next`). The install is then
148
+ `npm install` of that module's package. A name the marketplace does not list is refused
149
+ before npm runs, whatever its scope, with the not-found **exit 8** `details` uses
150
+ (`xanosdk marketplace search <name>` finds the real one) — `install` adds marketplace modules,
151
+ not arbitrary npm packages. When the catalogue cannot be
152
+ reached, an `@xano-sdk/` name still installs as typed and any other name is refused. `file:`
153
+ paths, tarball URLs and git specs are installed as given, without a lookup.
154
+
155
+ What the command adds over typing `npm install` yourself is three things npm will not do:
156
+
157
+ 1. **Add-ons are on the CLI's map.** `xanosdk --help` says they exist.
158
+ 2. **It refuses before npm runs when you are not in a project.** This is the oldest reason
159
+ the command exists: run `npm install` from a parent directory and npm cheerfully creates
160
+ or mutates the wrong `package.json` and tells you it succeeded.
161
+ 3. **It reconciles afterwards.** A toolchain module that arrived is asked its questions, and
162
+ the project records the answers.
163
+
164
+ The reconcile reads **every** dependency rather than the name you just typed. So a module
165
+ that arrived some other way is configured by this run too: a plain `npm install`, a merged
166
+ pull request, a `git pull` that changed `package.json`. It also means nothing has to recover
167
+ a package name out of a `file:` or tarball specifier in order to configure it.
168
+
169
+ `init` takes the same names and resolves them the same way — `--marketplace auth` is
170
+ `@xano-sdk/auth`, and an unlisted name exits 8 before anything is written — so a project can be
171
+ scaffolded with its add-ons already installed and registered:
172
+
173
+ ```bash
174
+ xanosdk init my-app --marketplace @xano-sdk/auth,@xano-sdk/vector
175
+ ```
176
+
177
+ `reinstall` and `remove` take those names too: `xanosdk marketplace remove auth` removes the
178
+ `@xano-sdk/auth` that `install auth` added. A name the project already depends on is taken as
179
+ typed, with no catalogue lookup, so both keep working offline. A name that is neither in the
180
+ project nor in the catalogue exits 8, as `install` does. `remove` is idempotent: removing a
181
+ marketplace module the project does not have succeeds (exit 0, `alreadyGone: true` under
182
+ `--json`), so a retried script does not fail.
183
+
184
+ See [The scaffolded project](scaffold.md) for what that writes and when a module is left
185
+ unregistered.
186
+
187
+ ### Peer ranges
188
+
189
+ Every module published today peers on `@xano/sdk` with a range that names no prerelease,
190
+ and npm excludes prereleases from those. An install that npm refuses over a peer range is
191
+ retried once with `--legacy-peer-deps`, and the retry is reported out loud even when it
192
+ succeeds: that is a tree npm deliberately declined, in a project you have been running.
193
+
194
+ That retry is why the SDK asks the question again itself, after npm. It reads the module's
195
+ declared range against the running version with a comparison that knows the difference — a
196
+ prerelease CLI and a range shape it cannot parse are both "no opinion", never a mismatch — so
197
+ only a version you are **definitively** outside of is refused.
198
+
199
+ What happens then depends on whether the module predates the command:
200
+
201
+ | Situation | What you get |
202
+ |---|---|
203
+ | `install` added it this run | Refused and **uninstalled again**, so the project is exactly as it was. Upgrade the SDK and re-run. |
204
+ | `install` re-run over a module already in `dependencies`, or `reinstall` | Refused and **left alone**, settings included, because deleting a module you already had over a version mismatch is not a repair. Upgrade the SDK, or `marketplace remove` it. |
205
+ | `init --marketplace` | Reported as a module that was not added and taken back off disk. The scaffold itself completes and works. |
206
+
207
+ The point of undoing the install is that the alternative is worse: a module whose hooks were
208
+ built against a contract this SDK does not have registers and applies **nothing**, so
209
+ `Installed` would be followed by a project where every command that loads modules refuses it.
210
+
211
+ ## Configuration lives in your package.json
212
+
213
+ A toolchain module's per-project settings live in the consuming project's `package.json`,
214
+ under the `"xanosdk"` key, namespaced by package name:
215
+
216
+ ```json
217
+ {
218
+ "xanosdk": {
219
+ "@xano-sdk/xanoscript": { "enabled": true, "dir": "xanoscript" }
220
+ }
221
+ }
222
+ ```
223
+
224
+ That block is written from your answers to the module's questions and read back on every
225
+ later run, which is what makes a choice made once survive every run after it. It is also the
226
+ only memory a module has.
227
+
228
+ **Absent config means enabled.** A package in `dependencies` with no block is enabled with
229
+ no settings: the next `deploy` fires its hooks with an empty config and it runs on its own
230
+ fallbacks with nothing you chose. `export` and `deploy` report that state on every run,
231
+ because the likeliest way a module reaches it is a plain `npm install` or a merged PR,
232
+ neither of which runs a xanosdk verb:
233
+
234
+ ```
235
+ ! A toolchain module is installed but never configured, so it runs on its own
236
+ defaults with nothing this project chose.
237
+ @xano-sdk/xanoscript — configure it with `xanosdk marketplace install @xano-sdk/xanoscript`
238
+ ```
239
+
240
+ Running `install` on a package that is already installed reads as a no-op until you know it
241
+ reconciles. It is the fix.
242
+
243
+ **`"enabled": false` switches a module off.** It is then never imported at all, which is why
244
+ reading config first matters: a disabled module costs nothing on every `compile`, `export`,
245
+ `deploy` and `preflight` that does not use it.
246
+
247
+ A module also contributes lines to your `.gitattributes`, in its own marked block:
248
+
249
+ ```
250
+ # xanosdk:begin @xano-sdk/xanoscript
251
+ # xanosdk 1.2.0 — generated; edits inside this block are overwritten
252
+ xanoscript/** linguist-generated
253
+ # xanosdk:end @xano-sdk/xanoscript
254
+ ```
255
+
256
+ Each module's lines land in a block naming it and stamped with the version that wrote them,
257
+ so re-answering one module's questions rewrites exactly that span and nothing around it.
258
+ Two installed modules cannot clobber each other's lines, because neither module writes the
259
+ file.
260
+
261
+ ### Answering questions without a terminal
262
+
263
+ Each question a module declares derives a long flag that answers it, so a non-interactive run
264
+ does not have to accept defaults:
265
+
266
+ ```bash
267
+ xanosdk marketplace install @xano-sdk/xanoscript --xanoscript --xanoscript-dir=generated
268
+ ```
269
+
270
+ A `string` or `choice` question takes `--flag=value`, not `--flag value`. The CLI cannot know
271
+ a contributed flag takes a value, because the module is not loaded when the arguments are
272
+ parsed, so it never consumes the following token. A `boolean` question takes the bare
273
+ `--flag`, or `--no-flag` to decline one whose default is true.
274
+
275
+ A flag no question claims is refused by name, naming the verb you actually typed.
276
+
277
+ `--json` makes the run non-interactive, and so does a stdin or a stderr that is not a TTY:
278
+ prompts are drawn on stderr, so a run whose stderr is redirected has nowhere to ask even
279
+ when stdin is a terminal. That is said once, up front, rather than question by question:
280
+
281
+ ```
282
+ Not a terminal, so nothing was prompted — each setting is this project's stored
283
+ value or the module's declared default.
284
+ ```
285
+
286
+ The machine output names where every answer came from (`flag`, `prompt`, `config`,
287
+ `default`) and which flag answers each question, so an agent reading it can change one
288
+ setting on the next run.
289
+
290
+ ## Re-asking: reinstall
291
+
292
+ ```bash
293
+ xanosdk marketplace reinstall @xano-sdk/xanoscript
294
+ ```
295
+
296
+ `reinstall` re-runs npm, then re-asks one module its questions and reconciles, offering your
297
+ project's **current** settings as the defaults rather than the ones the module shipped.
298
+ Stored answers outrank declared defaults, so a repeated run never quietly resets a directory
299
+ you chose.
300
+
301
+ It says four things before any of that runs, because each is a different mistake with a
302
+ different way out:
303
+
304
+ | State | What happens |
305
+ |---|---|
306
+ | Not a dependency | Refused before npm, so a typo never installs. Use `install` (a name no catalogue lists exits 8). |
307
+ | A dependency but not installed | Refused: the tree is broken, not the settings. Run `npm install`. |
308
+ | Not a toolchain module | Refused: there are no questions to re-ask. |
309
+ | `"enabled": false` | Announced, then switched back on. |
310
+
311
+ The last one would otherwise be a silent no-op, because a disabled module is never imported
312
+ and a reconcile would find nothing to ask. Re-asking a module its questions is asking
313
+ whether you want it, so the only coherent reading is "turn it back on and ask". Answer no to
314
+ its own enabling question and it goes straight back off.
315
+
316
+ npm runs before every check but the first, so `reinstall` also repairs a half-installed
317
+ module rather than refusing to work on one.
318
+
319
+ If a module does not map its stored settings back to answers, the re-ask starts from the
320
+ defaults it ships, and the command says so rather than letting you discover it by accepting
321
+ every prompt and finding your chosen directory reverted.
322
+
323
+ ## Removing
324
+
325
+ ```bash
326
+ xanosdk marketplace remove @xano-sdk/xanoscript
327
+ ```
328
+
329
+ `remove` uninstalls the package and then drops the settings and the contributed lines
330
+ together. The order is the whole design: the reconciler derives a removal from
331
+ `dependencies`, so the block can only go once the dependency has.
332
+
333
+ **A plain `npm uninstall` is not the same thing, and the leftover is not cosmetic.** The
334
+ package goes; the `"xanosdk"` block and the contributed lines do not. Nothing reports that
335
+ leftover, either: the loader only visits packages the project still declares, so once npm has
336
+ taken the name out of `dependencies`, the module is invisible and its check is simply not
337
+ run. A `--frozen-lock` run in that state exits 0 having verified less than it did yesterday,
338
+ and says nothing. Only the next `install`, `reinstall` or `remove` drops the stale block.
339
+
340
+ The state that does fail **every** `--frozen-lock` run is the other one: a module still
341
+ declared in `dependencies` but missing from `node_modules`, which is what `npm uninstall
342
+ --no-save`, a deleted `node_modules/<pkg>` or a drifted lockfile leaves behind. There the
343
+ project still says the module is expected, so its absence is reported rather than assumed
344
+ away:
345
+
346
+ ```
347
+ A toolchain module could not be loaded, so whatever it checks was not checked — and
348
+ this run was asked to verify, not to write:
349
+ @xano-sdk/xanoscript — it is configured in this project's package.json but is not installed
350
+ ```
351
+
352
+ That half-removed project is a first-class input to this verb, not a refusal. A package that
353
+ is no longer a dependency but is still configured skips npm (there is nothing to uninstall)
354
+ and the reconcile does the repair.
355
+
356
+ These states are refused before npm touches anything:
357
+
358
+ | State | Why |
359
+ |---|---|
360
+ | A workspace module your backend still imports | Refused, naming the files that import it: uninstalling under that import breaks the next export. Drop the import and registration, then re-run. A workspace module nothing imports is uninstalled, the inverse of its install. |
361
+ | An ordinary npm package | Nothing here contributed settings. `npm uninstall` is the honest instruction. |
362
+ | A dependency that is not installed, and not configured either | Nothing on disk to read and no stored settings, so there is no way to tell whether it ever contributed anything. npm owns the whole job. |
363
+ | Neither a dependency nor configured | A marketplace module: already removed, exit 0. A name the catalogue does not list: exit 8. |
364
+ | `"enabled": false` | Switched off is not removed. It is still installed and still in `dependencies`. |
365
+
366
+ A failed uninstall costs nothing. The dependency is still there, so a reconcile would derive
367
+ no removal, and the project is byte-for-byte what it was. Fix what npm reported and re-run.
368
+
369
+ `remove` does not offer to delete a directory the module generated. That is the module's
370
+ data, the contract names no such directory, and a removal that deletes rendered source is not
371
+ one you can undo.
372
+
373
+ ## What a reconcile guarantees
374
+
375
+ Every one of these verbs ends in the same idempotent pass. The correct on-disk state is a
376
+ pure function of your `dependencies` plus your stored `"xanosdk"` block, so it can be rebuilt
377
+ from scratch at any moment, however a module arrived.
378
+
379
+ - **Nothing is written until every target has been checked.** An unparseable `package.json`,
380
+ a `"xanosdk"` key that is not an object, an unbalanced managed block, a contribution the
381
+ contract refuses: each aborts before any write, so a refusal never leaves one of two files
382
+ patched.
383
+ - **An unchanged file is not rewritten.** Mtimes included. A tool that rewrites two
384
+ version-controlled files on every install fills a repository with no-op diffs.
385
+ - **A module whose hook throws loses its contributions, not your command.** Every byte it
386
+ owns is left exactly as it was, and it is reported.
387
+ - **A module that cannot be recomputed faithfully is carried forward untouched** rather than
388
+ re-derived from shipped defaults. The run reports it as carried.
389
+
390
+ The reconciler re-reads both files at the moment of writing and replays its decisions over
391
+ whatever is there now. The questionnaire blocks on a human, so the window between reading and
392
+ writing is unbounded: long enough for another verb, an `npm install` or a hand edit to land
393
+ in it. Every decision is keyed by package, so the replay touches only the packages that run
394
+ settled.
395
+
396
+ ## Under `--frozen-lock`
397
+
398
+ A frozen run is a guard, and a guard that silently stops running is worse than one that fails
399
+ loudly. So under `--frozen-lock` a toolchain module that fails to load is **fatal** rather
400
+ than a warning, and so is a hook that throws.
401
+
402
+ On a normal run both are reported and skipped, matching every other optional side effect in
403
+ the CLI. The asymmetry exists because if a plugin fails to resolve in CI (a partial install, a
404
+ stale plugin path after a version bump) then its hook never fires, nothing checks what it
405
+ checks, and `xanosdk export ./xano/index.ts --frozen-lock` exits 0 against a tree that is wrong. A red guard
406
+ gets fixed; a green one gets trusted.
407
+
408
+ A module's own check therefore rides on the same `--frozen-lock` run as `xano.lock`, so a
409
+ stale generated tree fails CI beside a stale lock. See [The scaffolded project](scaffold.md)
410
+ for the workflow `init` writes.
411
+
412
+ ## Writing your own
413
+
414
+ Both kinds of module are documented in [The module contract](module-contract.md): the
415
+ manifest fields, the `@xano/sdk/plugin` types, every hook, and what the SDK refuses.