@xano/sdk 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +28 -28
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-DAFGNMQX.js → agent-file-refresh-3J6YRVFL.js} +12 -11
- package/dist/{agent-skill-command-6M46ZGOL.js → agent-skill-command-VWDMQWCT.js} +51 -50
- package/dist/{answer-shape-CBUQRSXI.js → answer-shape-AVZSKBR6.js} +4 -4
- package/dist/{backend-dir-J2J7JNS6.js → backend-dir-ISP7RVF2.js} +11 -10
- package/dist/{backend-slot-X5AUX2TT.js → backend-slot-DZAUHLTS.js} +3 -3
- package/dist/bin.js +47 -46
- package/dist/{branch-YS2K3VOB.js → branch-IJTBZZFO.js} +8 -8
- package/dist/{branch-commands-BUKVE637.js → branch-commands-75IYFTBS.js} +26 -25
- package/dist/{chunk-UECNKDDA.js → chunk-2FDHIBEU.js} +8 -8
- package/dist/{chunk-P6HXDOFG.js → chunk-2KOB4QPW.js} +13 -13
- package/dist/{chunk-PCHIHVX6.js → chunk-2LF734YB.js} +4 -4
- package/dist/{chunk-R7XZW4SB.js → chunk-3H7R4ISR.js} +2 -2
- package/dist/{chunk-NMHTB346.js → chunk-3SZ7QRYA.js} +36 -10
- package/dist/{chunk-DB7P2SSK.js → chunk-45K2QZBR.js} +3 -3
- package/dist/{chunk-C2SAVXAB.js → chunk-4MX5LMPQ.js} +2 -2
- package/dist/{chunk-IZI3SYXH.js → chunk-5FJ4M4HB.js} +38 -38
- package/dist/{chunk-ZSMHS7BU.js → chunk-5TWLVFYB.js} +4 -4
- package/dist/{chunk-JKGRQW6D.js → chunk-5W7S2SCA.js} +4 -4
- package/dist/{chunk-F2NFNYCB.js → chunk-6ILHYSLR.js} +3 -3
- package/dist/{chunk-IFXPHVPY.js → chunk-6LJS4M6P.js} +3 -3
- package/dist/{chunk-CTUIMNEM.js → chunk-6X73VFCX.js} +2 -2
- package/dist/{chunk-DZUNF7IH.js → chunk-75QC66XI.js} +2 -2
- package/dist/{chunk-FBWMKHLO.js → chunk-7F3V6CFP.js} +3 -3
- package/dist/{chunk-5ONWBQ2C.js → chunk-B7CPSWQX.js} +7 -7
- package/dist/{chunk-4CS4DKQC.js → chunk-BEKEOXNG.js} +2 -2
- package/dist/{chunk-U4BGBU3R.js → chunk-BSGU4HS6.js} +44 -44
- package/dist/{chunk-ZGNWMGN3.js → chunk-CB67GIR3.js} +26 -8
- package/dist/{chunk-M7DIIJPW.js → chunk-DBDTQR23.js} +4 -4
- package/dist/{chunk-ENBGJJJH.js → chunk-DERQSEB5.js} +9 -9
- package/dist/{chunk-RZABQ4YH.js → chunk-DGYXCIBV.js} +4 -4
- package/dist/{chunk-BXVNRUDB.js → chunk-DLDYQNGP.js} +3 -3
- package/dist/{chunk-I2AVVARA.js → chunk-ECQXASG3.js} +2 -2
- package/dist/{chunk-2BHYGUTI.js → chunk-EQXHUWUO.js} +2 -2
- package/dist/{chunk-ONNSFD73.js → chunk-EYVIUX2T.js} +9 -9
- package/dist/{chunk-JFPLHK6Y.js → chunk-FBSGFPZ4.js} +2 -2
- package/dist/{chunk-EGEANMMK.js → chunk-FIERONKM.js} +2 -2
- package/dist/{chunk-K6BQPFRS.js → chunk-GBSHHNSD.js} +3 -3
- package/dist/{chunk-N3XSXGAL.js → chunk-GCINMMFL.js} +2 -2
- package/dist/{chunk-POZ6V4MU.js → chunk-GKQTXUOW.js} +2 -2
- package/dist/{chunk-SBS2IYTN.js → chunk-GOKRKTCX.js} +3 -3
- package/dist/{chunk-D4VKPOD4.js → chunk-GRXX2TOJ.js} +13 -112
- package/dist/{chunk-YJK4NPXC.js → chunk-GVHWIDEJ.js} +3 -3
- package/dist/{chunk-NZ7ML6LG.js → chunk-HINRE3UM.js} +5 -5
- package/dist/{chunk-H6VVSGKN.js → chunk-HK554MDD.js} +7 -7
- package/dist/{chunk-6HTXQAMG.js → chunk-HKI5Y5KW.js} +14 -14
- package/dist/{chunk-MLKJUEG3.js → chunk-HMYJOQXT.js} +23 -23
- package/dist/{chunk-DILYWJVP.js → chunk-HXFLHA5K.js} +2 -2
- package/dist/{chunk-A2AOUBJS.js → chunk-IHL2O7VY.js} +2 -2
- package/dist/{chunk-FLDFKG24.js → chunk-IKXXTRMN.js} +4 -4
- package/dist/{chunk-5XDKKE5Y.js → chunk-IWJ6GFST.js} +4 -4
- package/dist/{chunk-TANWE2ZY.js → chunk-J3XLCYTQ.js} +80 -80
- package/dist/{chunk-ENAUSLMP.js → chunk-J62TYONQ.js} +3 -3
- package/dist/{chunk-GRWYO2MS.js → chunk-KDEU5FUJ.js} +3 -3
- package/dist/{chunk-VA4JK4TW.js → chunk-KMKUH2IO.js} +3 -3
- package/dist/{chunk-VTMTIBKP.js → chunk-L34DM6QB.js} +2 -2
- package/dist/{chunk-6OOZJQJK.js → chunk-L4WG4BKJ.js} +68 -68
- package/dist/{chunk-QWWQM4XZ.js → chunk-LB76VK6D.js} +7 -7
- package/dist/{chunk-E763QI3G.js → chunk-LJZIBT75.js} +2 -2
- package/dist/{chunk-5SMUND4J.js → chunk-LPQZICYN.js} +6 -6
- package/dist/{chunk-UFFIU57H.js → chunk-LSJ3SQEU.js} +4 -4
- package/dist/{chunk-O6PWEJUV.js → chunk-LW7TOIS7.js} +8 -8
- package/dist/{chunk-XL7EA62X.js → chunk-MAXDJZQR.js} +5 -5
- package/dist/{chunk-7NNLRNXE.js → chunk-MIS6F4HM.js} +4 -4
- package/dist/{chunk-WZXEQUIM.js → chunk-MTBKTGZT.js} +2 -2
- package/dist/{chunk-WQZCFVAD.js → chunk-MYIIBV6A.js} +5 -5
- package/dist/{chunk-3RZ4UJWV.js → chunk-N6LGLNAC.js} +4 -4
- package/dist/{chunk-H7GMGZHI.js → chunk-NDV6CBR7.js} +2 -2
- package/dist/{chunk-HEMWBHQS.js → chunk-NOW522B4.js} +13 -13
- package/dist/{chunk-DFCYAEBE.js → chunk-NUZXSIEA.js} +3 -3
- package/dist/{chunk-DYGRTWAI.js → chunk-O44MJTLR.js} +3 -3
- package/dist/{chunk-EKS7SAZS.js → chunk-OLQN4Z5R.js} +53 -61
- package/dist/{chunk-CGZSF756.js → chunk-P4OWRYE7.js} +28 -28
- package/dist/{chunk-373AVIL2.js → chunk-QAEBBTYR.js} +7 -7
- package/dist/{chunk-UKC65HBQ.js → chunk-QJ25N4W6.js} +4 -4
- package/dist/{chunk-RAGFXELQ.js → chunk-QKHNJ7LE.js} +5 -5
- package/dist/{chunk-3ZVSOZZC.js → chunk-QRMKQYCB.js} +2 -2
- package/dist/{chunk-RQHXYL77.js → chunk-QX5XQEYB.js} +5 -7
- package/dist/{chunk-UDCKYLBW.js → chunk-RDZBXTZ3.js} +4 -4
- package/dist/{chunk-U4DSFCH5.js → chunk-RPBB7P4Q.js} +2 -2
- package/dist/{chunk-W5MKVFBQ.js → chunk-RV2BDU7V.js} +5 -5
- package/dist/{chunk-XFQAA2SU.js → chunk-RVAEPPRH.js} +2 -2
- package/dist/{chunk-6QJORUHC.js → chunk-RYWNNJK5.js} +2 -2
- package/dist/{chunk-VFRL4G72.js → chunk-SAEIVQLP.js} +3 -3
- package/dist/{chunk-H5FAYLCR.js → chunk-SPLRKCFV.js} +2 -2
- package/dist/{chunk-ZISPEBNM.js → chunk-SUKO4SZG.js} +60 -55
- package/dist/{chunk-B5N6EWOM.js → chunk-UQ2OD7D4.js} +3 -3
- package/dist/{chunk-DPSR5GRE.js → chunk-VBSCWV5H.js} +49 -49
- package/dist/chunk-VYJYDMY6.js +9 -0
- package/dist/{chunk-C4TZP5PQ.js → chunk-WS2X5BB2.js} +5 -5
- package/dist/{chunk-P5JF3U65.js → chunk-WS4BA75E.js} +37 -4
- package/dist/{chunk-XYVPF63S.js → chunk-XCFQLP6G.js} +8 -8
- package/dist/{chunk-OCNTMJSY.js → chunk-XPSDDTUZ.js} +3 -3
- package/dist/{chunk-OBRMA2VK.js → chunk-XY4OBD26.js} +3 -3
- package/dist/{chunk-XVOODRNK.js → chunk-Y5XAPLZS.js} +4 -4
- package/dist/{chunk-ZACMAKZE.js → chunk-YFQCDLCQ.js} +14 -14
- package/dist/{chunk-HDANNK4A.js → chunk-YL3WVBR5.js} +9 -9
- package/dist/{chunk-XM56DAM7.js → chunk-YR3MNGWZ.js} +8 -8
- package/dist/{chunk-HUEFVPYW.js → chunk-YTQYP7UJ.js} +3 -3
- package/dist/{chunk-KICERNAP.js → chunk-Z3DQ7ULY.js} +4 -4
- package/dist/{chunk-JHQAVWHW.js → chunk-Z4BQPABS.js} +2 -2
- package/dist/{chunk-6LECAG3Y.js → chunk-ZMJRAMLA.js} +4 -4
- package/dist/{chunk-AUYXBKGR.js → chunk-ZOHEHIFS.js} +2 -2
- package/dist/{chunk-A3CT26GX.js → chunk-ZRXDPCMN.js} +2 -2
- package/dist/cli.js +45 -44
- package/dist/{codegen-command-BAFON45M.js → codegen-command-JWOW6HE5.js} +63 -62
- package/dist/codegen.js +2 -2
- package/dist/{commands-IFRAGWGK.js → commands-5ILSWDSV.js} +2 -2
- package/dist/{completion-RTXCODHS.js → completion-UNKBVVDT.js} +2 -2
- package/dist/{config-EHFXNFSP.js → config-NTOASFCA.js} +3 -3
- package/dist/{deploy-command-JW7R3BPW.js → deploy-command-WESYWFJN.js} +52 -51
- package/dist/{deploy-source-ZUPLAL7L.js → deploy-source-ZQQNMDFX.js} +27 -26
- package/dist/{dev-env-sync-W7OTV7OD.js → dev-env-sync-4XJT7WOT.js} +46 -45
- package/dist/{display-name-hint-BKPMISQU.js → display-name-hint-MYXCCAOP.js} +10 -10
- package/dist/{env-example-refresh-TS7WBVZQ.js → env-example-refresh-4V2OCDJE.js} +64 -63
- package/dist/{env-pull-command-5IYXQ2WK.js → env-pull-command-SK5FS477.js} +42 -41
- package/dist/{env-target-TQBPLU2S.js → env-target-TEFSYACA.js} +9 -9
- package/dist/{env-var-command-AKCWYZPB.js → env-var-command-IJHKA2WJ.js} +37 -36
- package/dist/{ephemeral-CART6DIR.js → ephemeral-VLPRDNEJ.js} +8 -8
- package/dist/{ephemeral-command-SJYH6XRS.js → ephemeral-command-WCO5J4SN.js} +43 -42
- package/dist/{ephemeral-state-HPKSKC4Y.js → ephemeral-state-RUOU2GFS.js} +7 -7
- package/dist/{generate-command-FSCFZPOJ.js → generate-command-3WCOUOEQ.js} +68 -67
- package/dist/{gitignore-6IJ66XME.js → gitignore-WYS3GMOX.js} +15 -14
- package/dist/{guards-RU4C7TFG.js → guards-PPIBIMFZ.js} +6 -6
- package/dist/{impersonate-command-IH4HMSS3.js → impersonate-command-UMYVQTCG.js} +33 -32
- package/dist/{import-RUBCGLCA.js → import-T4ZTOTBT.js} +4 -4
- package/dist/index.js +11 -11
- package/dist/{init-command-STB4YSAK.js → init-command-UR5MSXIH.js} +50 -51
- package/dist/{init-modules-YIZYPCMM.js → init-modules-7KALFI5C.js} +7 -7
- package/dist/{init-web-OGKACAOC.js → init-web-DYE2FEXL.js} +2 -2
- package/dist/internal.js +68 -62
- package/dist/{keep-data-merge-VRKS64JK.js → keep-data-merge-OVHCIEBG.js} +24 -24
- package/dist/{lambda-config-reconcile-FXPDH2U5.js → lambda-config-reconcile-VOBVZPWS.js} +3 -3
- package/dist/{landing-record-5EFK7RI6.js → landing-record-AIHNW4AZ.js} +17 -16
- package/dist/{live-diff-HARRGFV4.js → live-diff-UMSOGPX3.js} +6 -6
- package/dist/{local-engine-choice-TRTEJVMV.js → local-engine-choice-XDGTATKJ.js} +30 -29
- package/dist/{local-engine-command-2FK2PE2P.js → local-engine-command-VQWNQ7UK.js} +35 -34
- package/dist/{local-engine-deploy-ZZVHBI2X.js → local-engine-deploy-4N4NFZ4T.js} +11 -11
- package/dist/{local-engine-lookup-QFRKO35F.js → local-engine-lookup-AQTUGSBT.js} +2 -2
- package/dist/{local-engine-mcp-bridge-T2EFRRAF.js → local-engine-mcp-bridge-AMYRH4SY.js} +9 -9
- package/dist/{local-engine-mcp-command-FB7EOGG6.js → local-engine-mcp-command-AIMNMXQG.js} +41 -48
- package/dist/{local-engine-process-XH35DURU.js → local-engine-process-OD5OSWDG.js} +6 -6
- package/dist/{local-engine-update-check-HAXE7BVG.js → local-engine-update-check-G3YCBXRE.js} +4 -4
- package/dist/{lock-commands-7PBZIRWR.js → lock-commands-H3YV2D6M.js} +50 -49
- package/dist/{login-command-2O6GRMTH.js → login-command-NMM3JNDZ.js} +23 -22
- package/dist/{logout-command-RZXGW3O2.js → logout-command-7DYC6G32.js} +13 -12
- package/dist/{loop-QHZD37KX.js → loop-DJNIHC7O.js} +6 -6
- package/dist/{marketplace-command-NCMLGIMS.js → marketplace-command-UCSHDZGO.js} +33 -33
- package/dist/{marketplace-resolve-HPCRNV5O.js → marketplace-resolve-JR4BBJ6K.js} +5 -5
- package/dist/{meta-client-DYYM5F5G.js → meta-client-CD3TXQP6.js} +10 -10
- package/dist/{module-manifest-EFE6JBZW.js → module-manifest-63I5GRK4.js} +3 -3
- package/dist/node.js +50 -49
- package/dist/{operation-outcome-SHNROAFA.js → operation-outcome-2ONIIDRU.js} +19 -19
- package/dist/{output-target-PSSR3E4N.js → output-target-67LHZKCO.js} +16 -15
- package/dist/{plan-disclosure-WEMB5ZJ2.js → plan-disclosure-T7DF4SRJ.js} +16 -16
- package/dist/{plugin-contributions-U5PAZKBE.js → plugin-contributions-YYEP7IWH.js} +4 -4
- package/dist/{plugin-prompt-O5PAMV5B.js → plugin-prompt-GKCQKNYI.js} +4 -4
- package/dist/{plugin-questions-ZVYNKDRB.js → plugin-questions-P7MA3TYI.js} +3 -3
- package/dist/{preflight-command-6F7JF3YQ.js → preflight-command-TJ7FURXB.js} +56 -55
- package/dist/{profile-command-5AOGD6GV.js → profile-command-LDPLTJEJ.js} +24 -23
- package/dist/{profile-pointer-VTOZDBHM.js → profile-pointer-JJ7K5O2R.js} +3 -3
- package/dist/{project-dependency-EZNTHMWI.js → project-dependency-X3KCWBK5.js} +6 -6
- package/dist/{project-sdk-ZGJM4WYQ.js → project-sdk-YHJZRCNB.js} +3 -3
- package/dist/promote-command-RURHOLNR.js +148 -0
- package/dist/{prompt-F7UVH4GP.js → prompt-QNMJIWNI.js} +3 -3
- package/dist/{publish-command-6VVSJPLI.js → publish-command-IIRN6NWN.js} +55 -54
- package/dist/{pull-command-GE2WUEUF.js → pull-command-ITO76ENU.js} +66 -65
- package/dist/{pull-superseded-77UZ7CHH.js → pull-superseded-6HADGGC5.js} +3 -3
- package/dist/{release-command-55RTR674.js → release-command-CVGIUD4M.js} +60 -59
- package/dist/{release-ns-command-5XPZ2B6N.js → release-ns-command-YLCQPVH3.js} +78 -77
- package/dist/{retry-command-S5QALD5Z.js → retry-command-LFZYEVRU.js} +7 -7
- package/dist/{routes-manifest-ET2TTSCL.js → routes-manifest-R3TQRB24.js} +6 -6
- package/dist/{routes-manifest-file-42FTJHRY.js → routes-manifest-file-GYNYFKAH.js} +9 -9
- package/dist/scaffold.d.ts +0 -5
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-N5IF265R.js → secrets-file-PCNAFXNV.js} +15 -14
- package/dist/{secrets-fill-command-35WKBURT.js → secrets-fill-command-G7NQMRXU.js} +49 -48
- package/dist/{seed-5YLQRT2D.js → seed-4CD55LB4.js} +6 -6
- package/dist/{source-resolve-JXGOVJD3.js → source-resolve-U4SJR7ZA.js} +17 -17
- package/dist/{static-host-TQP3FXPI.js → static-host-MO4VDHL7.js} +4 -4
- package/dist/{status-command-G3DFRMU7.js → status-command-CD72PXIT.js} +60 -34
- package/dist/{store-ZE5BXCOW.js → store-AJX4MC7Y.js} +5 -5
- package/dist/{sync-baseline-JGAAOS25.js → sync-baseline-BJDKG4F2.js} +7 -7
- package/dist/{sync-contributions-7T4CSPVQ.js → sync-contributions-XK6LHISZ.js} +8 -8
- package/dist/{sync-record-ILWS44DG.js → sync-record-NE62ERA3.js} +9 -9
- package/dist/{table-V3LTQUY6.js → table-WPRAM4VW.js} +8 -8
- package/dist/{tables-command-7NUOZBHX.js → tables-command-NMTKR52H.js} +35 -34
- package/dist/{tenant-7WUS7Q6V.js → tenant-IIYECNWO.js} +9 -9
- package/dist/{tenant-command-JGEHRKN7.js → tenant-command-XQAWT46C.js} +83 -82
- package/dist/{test-command-2LNEA6GK.js → test-command-W4AD4KT4.js} +32 -31
- package/dist/{tests-ENFUACKD.js → tests-JWQRHFCT.js} +5 -5
- package/dist/{token-DWNH44NW.js → token-P3VQ6ITJ.js} +9 -8
- package/dist/{toolchain-hooks-QIFGPGH2.js → toolchain-hooks-UAJBPSTC.js} +8 -8
- package/dist/{toolchain-modules-F4DUMWTO.js → toolchain-modules-S3MPHCUI.js} +4 -4
- package/dist/{toolchain-peers-K44IINPG.js → toolchain-peers-FQJBTKEB.js} +7 -7
- package/dist/{tracked-backend-ZFXVLBBJ.js → tracked-backend-WWEPNUD5.js} +30 -29
- package/dist/{update-check-KBHT63GJ.js → update-check-O7QC5TBB.js} +48 -47
- package/dist/{upgrade-command-CI543AZP.js → upgrade-command-J6LRNHYF.js} +51 -50
- package/dist/{whoami-command-77DXENWD.js → whoami-command-KWRP2CII.js} +12 -11
- package/dist/{workspace-RI5C77BZ.js → workspace-3YNK4XO4.js} +4 -4
- package/dist/{workspace-binding-PR57NBGH.js → workspace-binding-TTDNXHO5.js} +11 -10
- package/dist/{workspace-command-6HHVFQKW.js → workspace-command-W4ANGLCZ.js} +79 -78
- package/dist/{workspace-env-2APJEASO.js → workspace-env-6LJGCTZA.js} +12 -11
- package/dist/{workspace-export-GHMUSX2P.js → workspace-export-PUEXKZNS.js} +4 -4
- package/dist/{writable-Y6CE2CGK.js → writable-LMMG4AFZ.js} +3 -3
- package/dist/{xano-2A2GT7EH.js → xano-Z3SRHYOR.js} +7 -7
- package/dist/{xanosdk-import-HBQH3ZBS.js → xanosdk-import-PNNMZ4SF.js} +5 -5
- package/dist/{xanosdk-project-W45IR3Q7.js → xanosdk-project-YW3BQY2E.js} +13 -12
- package/guides/README.md +3 -3
- package/guides/authoring.md +11 -11
- package/guides/bundle.md +2 -2
- package/guides/cli.md +179 -176
- package/guides/codegen.md +17 -17
- package/guides/codes.md +3 -3
- package/guides/coverage.md +2 -2
- package/guides/deploying.md +123 -123
- package/guides/environment.md +30 -30
- package/guides/marketplace.md +24 -24
- package/guides/module-contract.md +9 -9
- package/guides/object-kinds.md +4 -4
- package/guides/project-structure.md +4 -4
- package/guides/scaffold.md +22 -22
- package/guides/typed-frontend.md +3 -3
- package/llms/client.md +4 -4
- package/llms/errors.md +2 -2
- package/llms/fields.md +1 -1
- package/llms/kinds-agent-mcp.md +1 -1
- package/llms/kinds-realtime.md +2 -2
- package/llms/lock.md +3 -3
- package/llms/statements-calls.md +1 -1
- package/llms/statements-runtime.md +2 -2
- package/llms/tests.md +3 -3
- package/llms/toolchain.md +2 -2
- package/llms-full.txt +56 -53
- package/llms.txt +35 -32
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/xano-backend/SKILL.md +7 -7
- package/dist/promote-command-O2NRRFLK.js +0 -147
package/guides/cli.md
CHANGED
|
@@ -1,158 +1,162 @@
|
|
|
1
1
|
# CLI
|
|
2
2
|
|
|
3
|
-
Every
|
|
3
|
+
Every CLI command, shell completion, and what the CLI prints when something fails.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Run every command here as `npx @xano/sdk …`. Inside a project, npx runs the project's installed
|
|
6
|
+
version; anywhere else it runs the latest release. In a project, the `npm run xano:*` scripts
|
|
7
|
+
`init` writes are shortcuts for the common ones.
|
|
8
|
+
|
|
9
|
+
The program inside the package is named `xanosdk`. That's what the `npm run xano:*` scripts
|
|
10
|
+
call, and what `npm i -g @xano/sdk` puts on your PATH. A global `xanosdk` ignores the project's
|
|
11
|
+
version, so inside a project use `npx @xano/sdk` or the scripts.
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
14
|
+
npx @xano/sdk init my-app # scaffold a full project (frontend/ + xano/)
|
|
15
|
+
npx @xano/sdk init my-app --framework svelte # SvelteKit instead of the default React
|
|
16
|
+
npx @xano/sdk init my-api --framework none # a new project with the backend only (no frontend/)
|
|
17
|
+
npx @xano/sdk init # inside an existing app: add xano/ and the xano:* scripts, no frontend (lists clashes and writes nothing; --force overwrites)
|
|
18
|
+
npx @xano/sdk init my-app --no-agents-md --no-install # skip AGENTS.md and npm install
|
|
19
|
+
npx @xano/sdk init my-app --theme zinc-blue --dark toggle --icons tabler # the look
|
|
20
|
+
npx @xano/sdk init my-app --marketplace @xano-sdk/auth,@xano-sdk/vector # install add-ons AND register them
|
|
21
|
+
|
|
22
|
+
npx @xano/sdk marketplace list # every published add-on (no login needed)
|
|
23
|
+
npx @xano/sdk marketplace search auth # narrow by keyword
|
|
24
|
+
npx @xano/sdk marketplace details @xano-sdk/auth # what it installs + the registration to copy
|
|
25
|
+
npx @xano/sdk marketplace details @xano-sdk/auth --prompt # …as a prompt for a coding agent
|
|
26
|
+
npx @xano/sdk marketplace install @xano-sdk/auth # add an add-on to the project you're in (and configure it)
|
|
27
|
+
npx @xano/sdk marketplace reinstall <toolchain-package> # re-ask a toolchain module its questions
|
|
28
|
+
npx @xano/sdk marketplace remove <toolchain-package> # uninstall it and drop what it contributed
|
|
29
|
+
|
|
30
|
+
npx @xano/sdk export ./xano/index.ts # bundle to stdout
|
|
31
|
+
npx @xano/sdk export ./xano/index.ts --out ws.json
|
|
32
|
+
npx @xano/sdk compile ./xano/functions/get-user.ts # a single function's JSON
|
|
33
|
+
npx @xano/sdk routes ./xano/index.ts # every route, realtime socket/channel and MCP server address (`paths` is an alias)
|
|
34
|
+
|
|
35
|
+
npx @xano/sdk export ./xano/index.ts --strict # CI: fail the build on any warning, don't just print it
|
|
36
|
+
npx @xano/sdk export ./xano/index.ts --no-lock # build with no xano.lock (one is written by default; refused once one exists)
|
|
37
|
+
npx @xano/sdk export ./xano/index.ts --frozen-lock # CI guard: fail if the export would change the lock, or if the lock carries an entry no object matches
|
|
38
|
+
npx @xano/sdk export ./xano/index.ts --check --strict # the same guard, writing nothing (no bundle, no lock) — needs no .env or .secrets.json; the scaffold's xano:check
|
|
39
|
+
npx @xano/sdk lock rename --entry=xano/index.ts table users members # move a lock entry after renaming in code
|
|
40
|
+
npx @xano/sdk lock prune ./xano/index.ts --yes # drop lock entries nothing exports anymore
|
|
41
|
+
npx @xano/sdk lock prune --identity-only --entry=xano/index.ts --yes dbo:notes # …or drop named keys without running the workspace
|
|
42
|
+
npx @xano/sdk lock import live-export.json --entry=xano/index.ts --yes # seed the lock from a live engine export
|
|
43
|
+
|
|
44
|
+
npx @xano/sdk login # OAuth sign-in (once) — pick the instance + workspace at consent
|
|
45
|
+
npx @xano/sdk login --paste # …when the browser can't reach this machine's 127.0.0.1 (remote shell, container, Codespace)
|
|
46
|
+
npx @xano/sdk login --scope "<list>" # request these OAuth scopes instead of the built-in set
|
|
47
|
+
npx @xano/sdk login --profile staging # sign in as a second named credential, leaving the others alone
|
|
48
|
+
npx @xano/sdk <command> --profile staging # act as that profile for one run (-p is the short form)
|
|
49
|
+
npx @xano/sdk workspace details # which instance/workspace am I bound to, and via which credential?
|
|
50
|
+
npx @xano/sdk deploy ./xano/index.ts # compile + import into the Xano Engine on this machine (the dev loop) → URL; no account needed
|
|
51
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral # …or into a live ephemeral on Xano's cloud → URL
|
|
52
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --static ./frontend/dist # also deploy a static frontend (onto the ephemeral)
|
|
53
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --static ./frontend/dist --static-env PK=pk_live_1 # + extra public config
|
|
54
|
+
npx @xano/sdk deploy --bundle ws.json # deploy an already-exported bundle
|
|
55
|
+
npx @xano/sdk deploy ./xano/index.ts --open # …and open the deployed URL in your browser
|
|
56
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --expires-hours 8 # the ephemeral's TTL when this deploy creates it: 1–24 hours (default: 1)
|
|
57
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --keep-data --static ./frontend/dist --static-host docs # publish to a named static host — merge only: a replace deletes it, and a deploy creates only `default` (create `docs` in the dashboard first)
|
|
58
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --static ./frontend/dist --static-routing spa # override URL resolution, spa|multipage (inferred from the bundle; rarely needed)
|
|
59
|
+
npx @xano/sdk deploy ./xano/index.ts --keep-data # redeploy but keep table rows (merge instead of replace; seeds aren't re-written)
|
|
60
|
+
npx @xano/sdk env pull --from workspace # fill xano/.env from a running backend (default: last deployed); lists what changes and confirms over an existing file (--yes off a terminal)
|
|
61
|
+
npx @xano/sdk env set STRIPE_KEY --to workspace --yes # set ONE env var on a running backend, value piped on stdin (no deploy; never printed)
|
|
62
|
+
npx @xano/sdk env unset STRIPE_KEY --to local # clear one (--to workspace|ephemeral[:<name>]|local[:<name>]|tenant:<name>, default: last deployed)
|
|
63
|
+
npx @xano/sdk secrets fill # mint a token in xano/.secrets.json for every documentation gate that has none (never replaces one)
|
|
64
|
+
npx @xano/sdk publish ./frontend/dist # publish a built frontend alone — no compile, no backend import (default: last deployed)
|
|
65
|
+
npx @xano/sdk publish ./frontend/dist --to ephemeral # …or onto an ephemeral instead (after a local deploy, bare publish goes to the engine)
|
|
66
|
+
npx @xano/sdk deploy ./xano/index.ts --static ./frontend/dist # on the Xano Engine, the engine serves the build at http://<prefix>.localhost:<port>
|
|
67
|
+
npx @xano/sdk publish ./frontend/dist --to workspace --branch v2 --yes # …onto the workspace, refused unless branch v2 is live
|
|
68
|
+
npx @xano/sdk deploy ./xano/index.ts --local # the default, spelled out: the Xano Engine on this machine (runs the version pinned in package.json)
|
|
69
|
+
npx @xano/sdk deploy ./xano/index.ts --local=~/Downloads/engine.tar.gz # override: run this archive, URL or version (v0.1.8), never touching the pin
|
|
66
70
|
XANOSDK_ENGINE_OVERRIDE=v0.1.8 npm run xano:deploy # the same override for every deploy in the shell
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
npx @xano/sdk local list # Xano Engines on this machine, marking the ones the SDK started
|
|
72
|
+
npx @xano/sdk local token # print its meta API bearer: XANO_META_TOKEN=$(npx @xano/sdk local token)
|
|
73
|
+
npx @xano/sdk local mcp # how a coding agent connects to its MCP server (url, command, config); never the bearer
|
|
74
|
+
npx @xano/sdk local mcp --stdio # the bridge an agent's .mcp.json launches: follows restarts, brings the current bearer
|
|
75
|
+
npx @xano/sdk local stop <name> # stop one (--all: every one the SDK started, and what a crashed one left running)
|
|
76
|
+
npx @xano/sdk local update # move this project's pinned engine to the latest (--version <v>: that one) and restart it — commit package.json
|
|
77
|
+
npx @xano/sdk local cache list # each cached engine version, its size, and the engines running on it
|
|
78
|
+
npx @xano/sdk local cache clear # remove every cached engine and its unpacked runtime (--version <v>: just that one); running ones are stopped first
|
|
79
|
+
npx @xano/sdk ephemeral list # list your ephemeral environments (--all-workspaces spans every workspace; --json: { ephemerals: [...] })
|
|
80
|
+
npx @xano/sdk ephemeral get <name> # base URL, state, and expiry for one (<name> = the tenant name, e.g. ewap-8wz9-9e13, NOT the display name — `ephemeral list` shows it in bold)
|
|
81
|
+
npx @xano/sdk ephemeral delete <name> --yes # destroy one
|
|
82
|
+
npx @xano/sdk tables # the last-deployed backend's tables: id, guid, name (for release create --seed)
|
|
83
|
+
npx @xano/sdk tables tenant:acme # …or name one
|
|
84
|
+
npx @xano/sdk test run-all # run the tests the last-deployed backend carries (exits 5 on a failure)
|
|
85
|
+
npx @xano/sdk test run-all --on local # …or name one (--on ephemeral:<name>|tenant:<name>|workspace)
|
|
86
|
+
npx @xano/sdk test list # list the tests a backend carries, without running any
|
|
87
|
+
npx @xano/sdk test run "<name>" # run one test by its name
|
|
88
|
+
npx @xano/sdk test run-all --kind unit # only one family (unit|workflow; default: both) — also on test list
|
|
89
|
+
npx @xano/sdk test run-all --concurrency 4 # run 4 at once (default: 1); tests share the backend's database, so only when yours don't share state
|
|
90
|
+
npx @xano/sdk impersonate # open what this project last deployed to in the builder (--guest = read-only; --url-only prints the URL; the URL is a session — treat it as a credential)
|
|
91
|
+
npx @xano/sdk impersonate ephemeral:<tenant> # …or name one: local[:<name>] or tenant:<name> (open your workspace from the Xano dashboard)
|
|
92
|
+
npx @xano/sdk deploy ./xano/index.ts --ephemeral --test # THE RELEASE FLOW, step 1: stand it up on an ephemeral and run its tests (a bare deploy goes to the Xano Engine, which release create cannot cut from)
|
|
93
|
+
npx @xano/sdk release create v1 # …2: cut a release from the ephemeral this project last deployed to (after a local deploy: --from ephemeral)
|
|
94
|
+
npx @xano/sdk release create v1 --from ephemeral:e4f2-9ab1 --description "what shipped" # …from a named source
|
|
95
|
+
npx @xano/sdk release create v1 --from workspace --branch staging # …or from a branch of your workspace (default: what it serves)
|
|
96
|
+
npx @xano/sdk release list # every release in this workspace, newest first, a description cut to one line (--json: { releases: [...] }, each with the origin show names)
|
|
97
|
+
npx @xano/sdk release show v1 # one release: when it was cut, from what (a cut from an environment records it in the description), what it carries
|
|
94
98
|
# --json origin: {kind:"branch",label} | {kind:"environment",name,type} | {kind:"copy",source:{host,workspaceId,release},from?:<branch or environment>} (transferred in) | null
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
npx @xano/sdk release export v1 # download it as a XanoScript multidoc (workspace block named "v1")
|
|
100
|
+
npx @xano/sdk release delete v1 --yes # remove one (a tenant may be running it — there is no undo)
|
|
101
|
+
npx @xano/sdk release transfer v1 --to-profile prod # copy a release to another workspace/instance, checked by content hash
|
|
102
|
+
npx @xano/sdk promote v1 # …3: land it in your workspace, as a new branch
|
|
103
|
+
npx @xano/sdk promote v1 --branch staging # …on a named branch instead of one named after the release (a taken label exits 2, SDK_BRANCH_TAKEN)
|
|
100
104
|
# (a label is letters, digits, _ . - and starts with a letter, digit or _; surrounding spaces are trimmed)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
105
|
+
npx @xano/sdk tenant list # every tenant under this workspace (--json: { tenants: [...] })
|
|
106
|
+
npx @xano/sdk tenant get acme # base URL and state for one
|
|
107
|
+
npx @xano/sdk tenant deploy acme v1 # …or 3: land it on a customer tenant instead
|
|
108
|
+
npx @xano/sdk tenant delete acme --yes # destroy one (by its NAME — a display name fails with exit 8 and names the tenant it belongs to)
|
|
109
|
+
npx @xano/sdk pull release:v1 # refresh xano/ from a release: rewrites decoded files, keeps and names files you added, lists and confirms (also workspace, ephemeral[:<name>], local, tenant:<name>)
|
|
110
|
+
npx @xano/sdk pull release:v1 --yes # …skip the confirmation and the dirty-tree refusal (CI)
|
|
111
|
+
npx @xano/sdk pull workspace --backend-dir ./backend # …when this project keeps its backend somewhere other than xano/ and nothing on disk says so (also on env pull)
|
|
112
|
+
npx @xano/sdk generate release:v1 --out ./backend # write ONLY the decoded xano/ tree, no project around it (any source above, or a bundle path; --force replaces the files an earlier generate wrote, asks first when that loses your edits (--yes answers), and keeps and lists any others)
|
|
113
|
+
npx @xano/sdk deploy ./xano/index.ts --to workspace --dry-run # ALTERNATIVE to the release flow: preview a merge of the local build
|
|
114
|
+
npx @xano/sdk deploy ./xano/index.ts --to workspace # …send it: add + update, never delete, never touch table data. Leaves no release to re-land
|
|
115
|
+
npx @xano/sdk deploy ./xano/index.ts --to workspace --prune # …also delete objects this project LANDED here and no longer defines (per xano.lock's `landed` record; commit it)
|
|
116
|
+
npx @xano/sdk deploy ./xano/index.ts --to workspace --branch staging # …land on a NEW branch instead of live (created; an existing label is refused, exit 2; stages LOGIC only — schema and workspace settings are shared, so not applied from a branch)
|
|
117
|
+
npx @xano/sdk deploy ./xano/index.ts --to workspace --branch staging --set-live # …and set it live the moment the import succeeds
|
|
118
|
+
npx @xano/sdk deploy ./xano/index.ts --to tenant:acme # …or merge into a customer tenant
|
|
119
|
+
npx @xano/sdk ephemeral export <name> # export a DEPLOYED ephemeral as a JSON bundle → .xano/exports/<name>.json
|
|
120
|
+
npx @xano/sdk ephemeral export <name> --format multidoc --name backend # …or as XanoScript → .xano/exports/backend.xs (--path picks elsewhere; a secret-bearing file git would commit is added to .gitignore)
|
|
121
|
+
npx @xano/sdk ephemeral export <name> --format multidoc --path - # …stream the multidoc to stdout (deploy first)
|
|
122
|
+
|
|
123
|
+
npx @xano/sdk workspace details # which workspace your token is scoped to (instance, id, name)
|
|
124
|
+
npx @xano/sdk workspace export --path ws.json # your REAL workspace as a JSON bundle (`--path -` streams to stdout)
|
|
125
|
+
npx @xano/sdk workspace diff ./xano/index.ts --branch staging # did my release land? which objects on the branch differ from your compile, are missing, or are unexpected (default: live), and which side changed each since the last sync (`changedThere`/`changedHere`/`changedBoth`); exits 2 when anything declared differs or is missing
|
|
126
|
+
npx @xano/sdk workspace reset-tables ./xano/index.ts --table <guid> --write # put named tables back to the seed rows your project compiles (a dry run without --write; every other table is left alone)
|
|
127
|
+
npx @xano/sdk workspace branch list # its branches, and which one is live
|
|
128
|
+
npx @xano/sdk workspace branch set-live staging # promote a branch (also the way back after --backup-branch)
|
|
129
|
+
npx @xano/sdk workspace branch delete staging --yes # remove a non-live branch (a label padded with spaces is found by the trimmed one; one not there exits 0, alreadyGone; the live branch exits 2, SDK_BRANCH_LIVE)
|
|
130
|
+
npx @xano/sdk init my-app --from workspace # …or as a runnable project (the pull direction)
|
|
131
|
+
npx @xano/sdk init my-app --from ephemeral:<tenant> # same, from an ephemeral (the env is named inside the flag)
|
|
132
|
+
npx @xano/sdk init my-app --from ./ws.json # …or from a bundle already on disk (offline, no auth)
|
|
133
|
+
|
|
134
|
+
npx @xano/sdk status # who am I, which workspace, and the env this project last deployed to
|
|
135
|
+
npx @xano/sdk whoami # print the scoped user + instance base URL (pretty on a TTY, JSON when piped)
|
|
136
|
+
npx @xano/sdk profile list # every stored credential profile, with the default and the active one marked
|
|
137
|
+
npx @xano/sdk profile show [name] # what one profile addresses — never its token
|
|
138
|
+
npx @xano/sdk profile use <name> # pin THIS PROJECT to a profile (writes a committed xano.profile.json)
|
|
139
|
+
npx @xano/sdk profile set-default <name> # set the profile THIS MACHINE falls back to
|
|
140
|
+
npx @xano/sdk profile add <name> --instance <url> --workspace-id <n> # store a meta API token (prompts, or reads it piped on stdin; checked before storing)
|
|
141
|
+
npx @xano/sdk profile delete <name> # revoke that session and remove the profile (xano.profile.json is kept, as logout keeps it)
|
|
142
|
+
npx @xano/sdk logout # revoke the active profile and remove it (--all for every profile)
|
|
139
143
|
# Both ask first (--yes off a terminal) when the profile is the one xano.profile.json pins, or the default while others stay.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
npx @xano/sdk version # print the installed @xano/sdk version
|
|
145
|
+
npx @xano/sdk upgrade --check # is a newer @xano/sdk published? exits 7 if so, 0 if current
|
|
146
|
+
npx @xano/sdk upgrade # install it: globally (npm i -g) for a global CLI; in a project, into the block that lists it (--save-prod or --save-dev)
|
|
147
|
+
npx @xano/sdk agent-skill install # put the xano-backend skill into each coding agent detected on this machine (--agent <id> to pick)
|
|
148
|
+
npx @xano/sdk agent-skill status # each copy: current, stale, edited or absent
|
|
149
|
+
npx @xano/sdk agent-skill uninstall # remove the copies install wrote (an edited copy is kept)
|
|
150
|
+
npx @xano/sdk help # grouped command reference (also the no-arg default)
|
|
151
|
+
npx @xano/sdk <command> --help # that command's usage, subcommands, and flags (`npx @xano/sdk deploy --help`)
|
|
152
|
+
npx @xano/sdk <noun> <verb> --help # scoped to one verb (`npx @xano/sdk workspace export --help`)
|
|
153
|
+
npx @xano/sdk <command> --json # force JSON on stdout (otherwise: whenever stdout isn't a terminal)
|
|
154
|
+
npx @xano/sdk <command> --no-refresh # don't refresh the managed blocks in AGENTS.md and the README (a build that writes nothing outside its output)
|
|
155
|
+
npx @xano/sdk completion zsh # shell completion script (also bash, fish) — see below
|
|
156
|
+
|
|
157
|
+
npx @xano/sdk preflight ./xano/index.ts # import into a live instance, diff each object back (needs auth + a throwaway tenant)
|
|
158
|
+
npx @xano/sdk preflight ./xano/index.ts --runtime # also run each deployed function on the engine
|
|
159
|
+
npx @xano/sdk preflight ./xano/index.ts --capture # write the fetched JSON as fixture candidates
|
|
156
160
|
```
|
|
157
161
|
|
|
158
162
|
The `marketplace` family has a guide of its own: [The marketplace](marketplace.md) for what
|
|
@@ -166,8 +170,8 @@ Every command that reads, writes or opens a running backend names it with one gr
|
|
|
166
170
|
| Spelling | What it is |
|
|
167
171
|
|---|---|
|
|
168
172
|
| `workspace` | Your real workspace — the one your login is scoped to |
|
|
169
|
-
| `ephemeral` / `ephemeral:<name>` | The ephemeral this project deployed to, or a named one — by its name (`e4f2-9ab1`, from `
|
|
170
|
-
| `local` / `local:<name>` | The engine this project deployed to, or a named one from `
|
|
173
|
+
| `ephemeral` / `ephemeral:<name>` | The ephemeral this project deployed to, or a named one — by its name (`e4f2-9ab1`, from `npx @xano/sdk ephemeral list`), not its display name |
|
|
174
|
+
| `local` / `local:<name>` | The engine this project deployed to, or a named one from `npx @xano/sdk local list`. Needs no Xano account |
|
|
171
175
|
| `tenant:<name>` | A tenant on your instance |
|
|
172
176
|
| `release:<name>` | A stored release — where a command reads one (`deploy`, `pull`, `generate`, `init --from`) |
|
|
173
177
|
| a bundle path | Where a command takes a file (`deploy`, `generate`, `init --from`) |
|
|
@@ -181,8 +185,8 @@ takes **`--on`**, and a command whose subject IS the backend takes it positional
|
|
|
181
185
|
in `.xano/deployed.json` by an ephemeral or local deploy, and never by a deploy to your
|
|
182
186
|
workspace or a tenant, so a bare command cannot reach something real unasked. With no record,
|
|
183
187
|
it falls back to the ephemeral recorded under your current credential, then to the engine
|
|
184
|
-
recorded for this directory, and otherwise refuses naming the flag, `
|
|
185
|
-
`
|
|
188
|
+
recorded for this directory, and otherwise refuses naming the flag, `npx @xano/sdk deploy` and
|
|
189
|
+
`npx @xano/sdk deploy --local`.
|
|
186
190
|
`deploy` is the exception: bare, it compiles the project and stands it up on the Xano Engine
|
|
187
191
|
on this machine unless `--ephemeral` or `--to` says otherwise, so it writes that record rather
|
|
188
192
|
than reading it. `generate` and `init --from` need a backend named.
|
|
@@ -222,7 +226,7 @@ only by each row's `type`, while a `tool` lands in `payload.tool`; matching on t
|
|
|
222
226
|
"toolset" alone picks the wrong array. A file format keeps the stored spelling too, so a
|
|
223
227
|
`xano.lock` key is `dbo:users`, not `table:users`.
|
|
224
228
|
|
|
225
|
-
This is also the format `
|
|
229
|
+
This is also the format `npx @xano/sdk lock import` reads, so both directions are user-facing.
|
|
226
230
|
|
|
227
231
|
|
|
228
232
|
**Build warnings, and `--strict`.** `export`/`deploy` print a warning (a `!` line) for the
|
|
@@ -279,37 +283,37 @@ string, `values` its whole closed set, `examples` a few values of a flag that ta
|
|
|
279
283
|
|
|
280
284
|
## Shell completion
|
|
281
285
|
|
|
282
|
-
`
|
|
286
|
+
`npx @xano/sdk completion <bash|zsh|fish>` prints a completion script covering every command, verb, flag,
|
|
283
287
|
and closed value set (`--on workspace|ephemeral|local`, `--format json|multidoc`, `--icons lucide|tabler|phosphor`).
|
|
284
288
|
A flag's value completes as what it takes: its closed set, file names for a path (`--config`,
|
|
285
289
|
`--secrets-file`), directories for a directory (`--backend-dir`), stored profile names for
|
|
286
290
|
`--profile`/`--to-profile`, and nothing for a free-form value (`--name`, `--expires-hours`).
|
|
287
|
-
`
|
|
291
|
+
`npx @xano/sdk help <Tab>` completes command names, then verbs.
|
|
288
292
|
It is generated from the CLI's own command table, so it never drifts from what the CLI accepts — but it
|
|
289
293
|
is baked at generation time, so re-run it after upgrading.
|
|
290
294
|
|
|
291
295
|
```bash
|
|
292
296
|
# zsh
|
|
293
|
-
|
|
297
|
+
npx @xano/sdk completion zsh > "${fpath[1]}/_xanosdk" # then restart your shell
|
|
294
298
|
|
|
295
299
|
# bash
|
|
296
|
-
|
|
300
|
+
npx @xano/sdk completion bash > ~/.xanosdk-completion.bash
|
|
297
301
|
echo 'source ~/.xanosdk-completion.bash' >> ~/.bashrc
|
|
298
302
|
|
|
299
303
|
# fish
|
|
300
|
-
|
|
304
|
+
npx @xano/sdk completion fish > ~/.config/fish/completions/xanosdk.fish
|
|
301
305
|
```
|
|
302
306
|
|
|
303
307
|
After a command succeeds the CLI checks npm (at most once an hour, cached in
|
|
304
308
|
`~/.xanosdk/update-check.json`) and prints a one-line nudge to **stderr** when a newer
|
|
305
309
|
`@xano/sdk` is published — never to stdout, so piped bundles stay clean. The suggested
|
|
306
310
|
command adapts to how you installed it: `npm i -g @xano/sdk@latest` for a global install,
|
|
307
|
-
`
|
|
311
|
+
`npx @xano/sdk upgrade` when it's a project dependency (it keeps the SDK in the `package.json` block
|
|
308
312
|
that lists it and restores the scaffolded range, which a raw `npm i` would not). The check is best-effort and bounded (a slow or offline
|
|
309
313
|
registry never delays a command), and stays silent under CI or when stderr isn't a terminal.
|
|
310
314
|
Opt out with `XANOSDK_NO_UPDATE_CHECK=1` (or the conventional `NO_UPDATE_NOTIFIER=1`).
|
|
311
315
|
|
|
312
|
-
`
|
|
316
|
+
`npx @xano/sdk upgrade` is the same question asked on purpose, and it answers under all the
|
|
313
317
|
conditions the nudge stays quiet for — CI, a piped stderr, the opt-out variables — reading the
|
|
314
318
|
registry live rather than serving the hourly cache. `--check` reports without installing and
|
|
315
319
|
exits **7** when a newer version is published, **0** when you are current or ahead of the
|
|
@@ -317,8 +321,8 @@ latest published version (a local build; `status: "ahead"`, and a bare `upgrade`
|
|
|
317
321
|
nothing), so a pipeline can branch on it:
|
|
318
322
|
|
|
319
323
|
```bash
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
npx @xano/sdk upgrade --check || echo "an upgrade is waiting"
|
|
325
|
+
npx @xano/sdk upgrade --check | jq -r .latest # piped stdout is JSON already
|
|
322
326
|
```
|
|
323
327
|
|
|
324
328
|
A registry it cannot reach is an error (exit 1), never a quiet "you are up to date". Without
|
|
@@ -356,7 +360,7 @@ silently ignored. `init --from` follows the same two modes
|
|
|
356
360
|
([Pulling an existing workspace](codegen.md#running-it)).
|
|
357
361
|
|
|
358
362
|
```bash
|
|
359
|
-
|
|
363
|
+
npx @xano/sdk init --json # inside the app; then run the command in `next`
|
|
360
364
|
```
|
|
361
365
|
|
|
362
366
|
`init --json` reports `mode` (`new` or `existing`), `files` (every file it wrote or merged
|
|
@@ -371,11 +375,11 @@ tells the agent when to set up a Xano backend and hands it to `init`, then to th
|
|
|
371
375
|
AI agents read. The package ships it at `skills/xano-backend/SKILL.md`.
|
|
372
376
|
|
|
373
377
|
```bash
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
378
|
+
npx @xano/sdk agent-skill install # every coding agent detected on this machine
|
|
379
|
+
npx @xano/sdk agent-skill install --agent claude-code # …or name one (repeatable)
|
|
380
|
+
npx @xano/sdk agent-skill install --dry-run # report what would change, write nothing
|
|
381
|
+
npx @xano/sdk agent-skill status --json # each copy, as data
|
|
382
|
+
npx @xano/sdk agent-skill uninstall
|
|
379
383
|
```
|
|
380
384
|
|
|
381
385
|
It writes at most two copies. Claude Code reads `~/.claude/skills/xano-backend/SKILL.md`
|
|
@@ -421,13 +425,13 @@ import manifest from "@xano/sdk/manifest.json" with { type: "json" };
|
|
|
421
425
|
const has = (cmd: string) => manifest.cli.some((c) => c.command === cmd);
|
|
422
426
|
```
|
|
423
427
|
|
|
424
|
-
Read the manifest from the install
|
|
428
|
+
Read the manifest from the install `npx @xano/sdk` will run: a project dependency and a
|
|
425
429
|
global install can be different versions.
|
|
426
430
|
|
|
427
431
|
- **Check each operation, not the whole feature.** A backend-only promotion needs `promote`,
|
|
428
432
|
and it should not be refused because `publish` is missing. Gate each command on its own entry.
|
|
429
|
-
- **When something is missing, name the command.** `This workflow needs \`
|
|
430
|
-
which the installed @xano/sdk (1.0.x) does not have. Run \`
|
|
433
|
+
- **When something is missing, name the command.** `This workflow needs \`npx @xano/sdk publish\`,
|
|
434
|
+
which the installed @xano/sdk (1.0.x) does not have. Run \`npx @xano/sdk upgrade\`.` is accurate. "This SDK has
|
|
431
435
|
no release support" is not, when `release create` and `promote` are right there.
|
|
432
436
|
- **The manifest describes the package, not the target.** Whether a particular workspace or
|
|
433
437
|
instance will accept an operation is decided when the command runs. The command's own
|
|
@@ -436,11 +440,10 @@ global install can be different versions.
|
|
|
436
440
|
## Commands the CLI prints
|
|
437
441
|
|
|
438
442
|
Every command the CLI prints for you to run next (a remedy, a rerun, a hint, `--help`) is spelled
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
scaffold's README, `AGENTS.md`, `.env.example`) always say `npx xanosdk …`.
|
|
443
|
+
`npx @xano/sdk …`, in the text and in `--json` fields such as `rerun` alike, and so is every file it
|
|
444
|
+
writes to disk (a scaffold's README, `AGENTS.md`, `.env.example`). Paths in it read from where you
|
|
445
|
+
typed — under `npm run`, the directory you ran npm in. Never `npx xanosdk`: outside a project,
|
|
446
|
+
npx would fetch the `xanosdk` package from the registry, which is only a placeholder.
|
|
444
447
|
|
|
445
448
|
## When something fails
|
|
446
449
|
|
|
@@ -453,7 +456,7 @@ what it could not reach and why (`workspace list could not reach https://…: fe
|
|
|
453
456
|
response body underneath — nothing is discarded, only folded away.
|
|
454
457
|
|
|
455
458
|
A malformed invocation fails before any work happens: a missing or misspelled entry file, an
|
|
456
|
-
argument the command has nowhere to put (`
|
|
459
|
+
argument the command has nowhere to put (`npx @xano/sdk export --lock xano.lock` — that flag takes
|
|
457
460
|
its value attached, as `--lock=xano.lock`), or a missing credential, each answered with the
|
|
458
461
|
command's usage block instead of a stack trace. `deploy` and `release` check that you are
|
|
459
462
|
signed in *before* compiling, so a lapsed session costs you a message, not a build.
|
|
@@ -480,4 +483,4 @@ the root so an agent scanning the package's exports sees the surface rather than
|
|
|
480
483
|
|
|
481
484
|
`emit`, `emitBundle` and the `@xano/sdk/node` writers run the same build-time checks, including seed validation of a literal
|
|
482
485
|
`seed: [...]` array. A **deferred** seed (a thunk, or `seedFile()`) needs an await or the
|
|
483
|
-
filesystem, so it is materialised and checked only by `
|
|
486
|
+
filesystem, so it is materialised and checked only by `npx @xano/sdk export` / `npx @xano/sdk deploy`.
|
package/guides/codegen.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pulling an existing workspace
|
|
2
2
|
|
|
3
|
-
What `
|
|
3
|
+
What `npx @xano/sdk init --from` writes, how faithful the pull is, and how to read its report.
|
|
4
4
|
|
|
5
5
|
## Running it
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ A pull is `init` with `xano/` filled from an existing backend instead of the emp
|
|
|
8
8
|
so it is the scaffold command with one extra flag:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
npx @xano/sdk init my-app --from workspace # your real workspace (the one your login is scoped to)
|
|
12
|
+
npx @xano/sdk init my-app --from ephemeral:my-env # a named ephemeral environment
|
|
13
|
+
npx @xano/sdk init my-app --from local:<name> # a running Xano Engine (`local list`) — no login
|
|
14
|
+
npx @xano/sdk init my-app --from ./ws.json # a bundle already on disk — offline, no login
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
`--from` takes any backend in [the CLI's one grammar](cli.md#naming-a-backend) —
|
|
@@ -43,16 +43,16 @@ cd my-existing-app && npx @xano/sdk init --from workspace # add the pulled bac
|
|
|
43
43
|
|
|
44
44
|
### Just the tree: `generate`
|
|
45
45
|
|
|
46
|
-
`
|
|
46
|
+
`npx @xano/sdk generate <source>` writes the same decoded tree `init --from` puts in `xano/`, and nothing
|
|
47
47
|
else — no `package.json`, no frontend, no round-trip check. Use it to drop a backend into a repo
|
|
48
48
|
that already has its own shell, or to read one.
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
npx @xano/sdk generate workspace # → ./xano
|
|
52
|
+
npx @xano/sdk generate release:v1 --out ./backend # a stored release
|
|
53
|
+
npx @xano/sdk generate ephemeral:my-env # also tenant:<name>, local[:<name>]
|
|
54
|
+
npx @xano/sdk generate ./ws.json # a bundle on disk — offline, no login
|
|
55
|
+
npx @xano/sdk generate workspace --branch staging # --branch applies to `workspace` only
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
The output directory must be new, empty, or a tree an earlier decode wrote — `generate` and
|
|
@@ -70,9 +70,9 @@ generating a different backend into a tree cannot carry its old identities forwa
|
|
|
70
70
|
`--branch <label>` reads that branch instead of the live one:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
npx @xano/sdk init review-staging --from workspace --branch staging
|
|
74
|
+
npx @xano/sdk pull workspace --branch staging # refresh that tree from the same branch
|
|
75
|
+
npx @xano/sdk workspace export --branch staging --path - # the raw bundle, same selector
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
Only logic differs. Tables and microservices are shared by every branch, so the schema in the
|
|
@@ -177,7 +177,7 @@ trackable release over release and gateable in CI without scraping output.
|
|
|
177
177
|
Re-pulling is a real workflow: a second `init --from` into the same directory refreshes
|
|
178
178
|
`xano/` and leaves the rest of the project — your `package.json`, your `frontend/` —
|
|
179
179
|
exactly as you left it. No `--force` needed, because the tree carries a marker saying it
|
|
180
|
-
was decoded. It and `
|
|
180
|
+
was decoded. It and `npx @xano/sdk pull` share one planner: before any write it lists the files it
|
|
181
181
|
will delete and the files it will rewrite — telling a file you edited since the last decode
|
|
182
182
|
from one only the source changed — refuses a `xano/` git reports as dirty, and asks; without
|
|
183
183
|
a terminal, `--yes` answers. It removes only files the previous decode wrote; one you added
|
|
@@ -189,9 +189,9 @@ over a `xano/` no decode wrote follows the same rules.
|
|
|
189
189
|
> decodes, so commit before one (an existing `xano/` that isn't a previous pull is a clash, and
|
|
190
190
|
> needs `--force`).
|
|
191
191
|
> It carries schema only — no table rows or stored files.
|
|
192
|
-
> `
|
|
192
|
+
> `npx @xano/sdk deploy` sends it to the Xano Engine on this machine (`--ephemeral`: a disposable
|
|
193
193
|
> ephemeral environment) as a *full replace*;
|
|
194
|
-
> `
|
|
194
|
+
> `npx @xano/sdk promote <release>` or `npx @xano/sdk deploy --to workspace` merges it into your real
|
|
195
195
|
> workspace. Workspace env vars are declared by name only — their values never enter the tree.
|
|
196
196
|
|
|
197
197
|
---
|