@xano/sdk 1.0.4 → 1.0.5
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 +17 -5
- package/README.md +232 -334
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-LB6KIMFY.js → agent-file-refresh-KVLR7M5Y.js} +13 -13
- package/dist/{answer-shape-LVV2SVBK.js → answer-shape-XGR2DGWY.js} +5 -5
- package/dist/{backend-dir-WZADOK3L.js → backend-dir-IE4RMUFH.js} +12 -12
- package/dist/{backend-slot-NSCTWCUX.js → backend-slot-6HBWG5FN.js} +3 -3
- package/dist/bin.js +52 -52
- package/dist/{branch-ONWPJ4V6.js → branch-T2APKPVG.js} +9 -9
- package/dist/{branch-commands-ZT2MJIRS.js → branch-commands-HXXTCSOO.js} +26 -26
- package/dist/{capture-3JNUA6C2.js → capture-HBXFXZEW.js} +4 -4
- package/dist/{chunk-A6QTTJUI.js → chunk-3BJYQGAZ.js} +2 -2
- package/dist/{chunk-5W7DOMIU.js → chunk-3IYVHVM6.js} +2 -2
- package/dist/{chunk-S7E2AHV3.js → chunk-3VX7VAQT.js} +4 -4
- package/dist/{chunk-Y2ZLKBM6.js → chunk-3WHWOKU4.js} +4 -4
- package/dist/{chunk-LXNQWHZM.js → chunk-44CWK6YC.js} +3 -3
- package/dist/{chunk-KCAL4QYP.js → chunk-4GDEEY2U.js} +4 -4
- package/dist/{chunk-KTGRGWZW.js → chunk-4NEBBKOP.js} +7 -7
- package/dist/{chunk-UKUIUS3E.js → chunk-4QBGE3EO.js} +5 -5
- package/dist/{chunk-IVKRT476.js → chunk-4QFBEKXI.js} +2 -2
- package/dist/{chunk-OOXWYAA4.js → chunk-57A5ZKPO.js} +1 -1
- package/dist/{chunk-2B22WWKL.js → chunk-57B56I4B.js} +29 -29
- package/dist/{chunk-OPHB5ORL.js → chunk-57HMNJGB.js} +120 -76
- package/dist/{chunk-O5V3YH5P.js → chunk-5D6DGF3W.js} +8 -8
- package/dist/{chunk-E65QIWOO.js → chunk-5RLAF6RL.js} +4 -4
- package/dist/{chunk-MEE5RZ6G.js → chunk-5XVBT6CQ.js} +2 -2
- package/dist/{chunk-RX3EMQGN.js → chunk-5YBNXNKU.js} +2 -2
- package/dist/{chunk-NA3PXMEF.js → chunk-64WWE3EF.js} +1 -1
- package/dist/{chunk-2LVTBPW2.js → chunk-65SW2BA5.js} +3 -3
- package/dist/{chunk-ET5DSBAC.js → chunk-7DBM6XHR.js} +8 -8
- package/dist/{chunk-DIG3NITC.js → chunk-A4NNCI4O.js} +3 -3
- package/dist/{chunk-4APOHK7Y.js → chunk-AESE434J.js} +2 -2
- package/dist/{chunk-E6H5ZEV3.js → chunk-AGD7F7YI.js} +3 -3
- package/dist/{chunk-44B4V2LR.js → chunk-AGSCOISO.js} +139 -139
- package/dist/{chunk-MLGI2SRQ.js → chunk-AMBEITWL.js} +4 -4
- package/dist/{chunk-5T2CTWTB.js → chunk-BBPAXOU6.js} +5 -5
- package/dist/{chunk-5WGVIXMD.js → chunk-BMCZQZMI.js} +4 -4
- package/dist/{chunk-LUTMOHOW.js → chunk-CJ76PSJT.js} +9 -9
- package/dist/{chunk-D5ZEAF4G.js → chunk-CV54PASI.js} +53 -50
- package/dist/{chunk-MLPDSGJQ.js → chunk-DEVGLLNZ.js} +5 -5
- package/dist/{chunk-JTUKLCXS.js → chunk-DXUICABI.js} +1 -1
- package/dist/{chunk-C4FHQA7R.js → chunk-ES5A66IH.js} +8 -8
- package/dist/{chunk-UDE5C2XN.js → chunk-F3557PVM.js} +3 -3
- package/dist/{chunk-HUSH7LRI.js → chunk-F6IKWAIU.js} +21 -17
- package/dist/{chunk-II747OWE.js → chunk-FV55SRQU.js} +7 -7
- package/dist/{chunk-SEUCZZCP.js → chunk-G57RYMKB.js} +3 -3
- package/dist/{chunk-MNVDVR3M.js → chunk-GMVW6ZZK.js} +4 -4
- package/dist/{chunk-MN2PB6WB.js → chunk-HLQH3AXB.js} +3 -3
- package/dist/{chunk-HSEQYBDO.js → chunk-HOOOOJJP.js} +3 -3
- package/dist/{chunk-IXUPUFCG.js → chunk-I5VEROXW.js} +2 -2
- package/dist/{chunk-UI4OPTYR.js → chunk-IV446ZLJ.js} +2 -2
- package/dist/{chunk-CYB7UQA2.js → chunk-JQOX6HW4.js} +5 -5
- package/dist/{chunk-OPG4DYX2.js → chunk-JSEVKRVJ.js} +3 -3
- package/dist/{chunk-2AUV6NXK.js → chunk-JXKO6JT7.js} +36 -36
- package/dist/{chunk-FPBGAT5D.js → chunk-JZWUAEMO.js} +3 -3
- package/dist/{chunk-6R7S775T.js → chunk-K6CB5TKM.js} +2 -2
- package/dist/{chunk-MCTIKRMN.js → chunk-K6PRKPFX.js} +8 -8
- package/dist/{chunk-W5ONYLOP.js → chunk-KQLACS4Q.js} +4 -4
- package/dist/{chunk-LIVN53UV.js → chunk-KUU7T4ZE.js} +31 -31
- package/dist/{chunk-WFMVKY7I.js → chunk-L3BDO2BI.js} +9 -9
- package/dist/{chunk-664LSWE5.js → chunk-LLS2WO2K.js} +4 -4
- package/dist/{chunk-ESZ2FF57.js → chunk-LZDA6SVD.js} +46 -45
- package/dist/{chunk-UCQ2VUTG.js → chunk-M6ZFSTIZ.js} +2 -2
- package/dist/{chunk-DYG5D3FD.js → chunk-M7GJ6YUF.js} +2 -2
- package/dist/{chunk-XXZZGXW2.js → chunk-MEIJDRHU.js} +2 -2
- package/dist/{chunk-QXTKSOFI.js → chunk-MF4W6FHU.js} +1 -1
- package/dist/{chunk-3FN2BIGB.js → chunk-MYLPOVX6.js} +6 -6
- package/dist/{chunk-FJWZ5OVV.js → chunk-N6BWB35H.js} +3 -3
- package/dist/{chunk-T4DUFQ2S.js → chunk-NGAODDLX.js} +5 -5
- package/dist/{chunk-7PMVIHB3.js → chunk-NNB7VUCH.js} +23 -23
- package/dist/{chunk-6VBTPV2Y.js → chunk-NUU76247.js} +3 -3
- package/dist/{chunk-ZG7E72VI.js → chunk-OGUMHW2X.js} +6 -6
- package/dist/{chunk-I2BGYNHD.js → chunk-OJPZEUPH.js} +7 -7
- package/dist/{chunk-OOGXZL7Z.js → chunk-OKNE3TWU.js} +2 -2
- package/dist/{chunk-KUTFFHUM.js → chunk-OVV2HXJ6.js} +2 -2
- package/dist/{chunk-VRVKNY4A.js → chunk-PIPIA7K7.js} +8 -8
- package/dist/{chunk-AM4FKL4J.js → chunk-PL7AIAWS.js} +12 -12
- package/dist/{chunk-WL2DSNJV.js → chunk-Q22BMRPF.js} +2 -2
- package/dist/{chunk-IJ3SXSZM.js → chunk-QOLOQ35F.js} +6 -6
- package/dist/{chunk-BUECLQXK.js → chunk-QZTJ2556.js} +4 -4
- package/dist/{chunk-O7QOWS6M.js → chunk-RXCT3OCU.js} +12 -12
- package/dist/{chunk-WYEQFD6A.js → chunk-S5KQIFKJ.js} +122 -98
- package/dist/{chunk-CBYQ2ZN3.js → chunk-S5TEJIGP.js} +2 -2
- package/dist/{chunk-HMLGM2MW.js → chunk-SF2B7MZK.js} +3 -3
- package/dist/{chunk-PML67X22.js → chunk-SNGFEESM.js} +3 -3
- package/dist/{chunk-VD32O6KZ.js → chunk-SQPIECXD.js} +3 -3
- package/dist/{chunk-5YL5OC2G.js → chunk-SRX6B544.js} +5 -5
- package/dist/{chunk-CFSFBKHP.js → chunk-TEBS7FE6.js} +2 -2
- package/dist/{chunk-TTVAHCWP.js → chunk-TM5LRSBB.js} +2 -2
- package/dist/{chunk-JP7M7OU7.js → chunk-TUEFTRC2.js} +5 -5
- package/dist/{chunk-EWCDPFW5.js → chunk-U6DR6464.js} +4 -4
- package/dist/{chunk-QAEQGT5I.js → chunk-UIEFE6FU.js} +7 -7
- package/dist/{chunk-3H3EPMFY.js → chunk-UJ6ZZJDD.js} +2 -2
- package/dist/{chunk-3P3HXN76.js → chunk-V4IBHDIY.js} +11 -11
- package/dist/{chunk-XNCP4KYO.js → chunk-VQPDATQT.js} +1 -1
- package/dist/{chunk-4PQHO74B.js → chunk-VZ22VUAS.js} +2 -2
- package/dist/{chunk-BUJRS7XB.js → chunk-WYS6XVZ3.js} +2 -2
- package/dist/{chunk-QV3GXQRE.js → chunk-XIABDKFQ.js} +2 -2
- package/dist/{chunk-EESV6NU2.js → chunk-XJU6UAFV.js} +2 -2
- package/dist/{chunk-SBR2WZXG.js → chunk-XNZURZ7T.js} +59 -52
- package/dist/{chunk-WFG67AYS.js → chunk-Y6NO3DLQ.js} +3 -3
- package/dist/{chunk-37AHZ7JX.js → chunk-Y76ERHLK.js} +5 -5
- package/dist/{chunk-HHW5AWVD.js → chunk-YI76TURL.js} +30 -30
- package/dist/{chunk-OGBMUST4.js → chunk-YSLMMR2U.js} +14 -14
- package/dist/{chunk-45YPFB7B.js → chunk-Z2BRSQ6M.js} +49 -49
- package/dist/{chunk-D64XUF5Q.js → chunk-Z3SNX45M.js} +16 -16
- package/dist/{chunk-FMOEVAGT.js → chunk-Z4VN347O.js} +3 -3
- package/dist/{chunk-L2GLOJAO.js → chunk-ZHGWR45B.js} +22 -22
- package/dist/cli.d.ts +20 -18
- package/dist/cli.js +50 -50
- package/dist/{codegen-command-HTWIW56U.js → codegen-command-L2OO6OTE.js} +63 -63
- package/dist/{commands-CVFYC4GK.js → commands-2E4JB3DB.js} +2 -2
- package/dist/{completion-AUEQC4XJ.js → completion-LPJIH5VQ.js} +11 -11
- package/dist/{config-JU6OQC77.js → config-QDCRKEWD.js} +4 -4
- package/dist/{deploy-command-5WTFHMBT.js → deploy-command-HJZNYCUY.js} +57 -57
- package/dist/{deploy-source-5CET3A5D.js → deploy-source-5COWTBOC.js} +34 -34
- package/dist/{dev-env-sync-X636HLMK.js → dev-env-sync-GZ4QQJGV.js} +51 -51
- package/dist/{display-name-hint-DMORHANO.js → display-name-hint-AHCNH6TF.js} +11 -11
- package/dist/{emit-hOFbgzde.d.ts → emit-DqG6qddr.d.ts} +2 -2
- package/dist/env-example-refresh-DWQIOQYR.js +127 -0
- package/dist/{env-pull-command-WZZ7RL2E.js → env-pull-command-Z4RLVEGJ.js} +46 -46
- package/dist/{env-target-PO3MOLH5.js → env-target-ZHQUS5BO.js} +13 -13
- package/dist/{env-var-command-YKTJZFJN.js → env-var-command-FKQ4VVQ6.js} +47 -47
- package/dist/{ephemeral-BMFY55BQ.js → ephemeral-L4KUOGEU.js} +9 -9
- package/dist/{ephemeral-command-VDSQCOYL.js → ephemeral-command-GRPFI3TD.js} +47 -47
- package/dist/{ephemeral-state-6TY4JIPA.js → ephemeral-state-VLYU2BXR.js} +11 -11
- package/dist/{generate-command-3NTNRQRS.js → generate-command-XNODJFDQ.js} +68 -68
- package/dist/{gitignore-FWPEDX6C.js → gitignore-VWRSZX5F.js} +16 -16
- package/dist/{guards-EJU2ONAX.js → guards-OPSGB6LG.js} +5 -5
- package/dist/{hosted-file-PSHJB3HX.js → hosted-file-S7YUQAH6.js} +2 -2
- package/dist/{impersonate-command-QEJA72Q2.js → impersonate-command-AEKIZHHK.js} +40 -40
- package/dist/{import-TBTOTU52.js → import-PHSSFFLA.js} +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -10
- package/dist/{init-command-27SFBW2F.js → init-command-TI3HCKXZ.js} +55 -55
- package/dist/{init-modules-HZRQFRLE.js → init-modules-SGSX7XEY.js} +9 -9
- package/dist/{init-web-Y2PBNJTQ.js → init-web-6HX3YLQP.js} +2 -2
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +24 -25
- package/dist/{io-ZUKAGFVE.js → io-TAF4WXYQ.js} +5 -5
- package/dist/{keep-data-merge-X5LDDCI3.js → keep-data-merge-GUGF7MVZ.js} +28 -28
- package/dist/{lambda-config-reconcile-OUZ4OYAB.js → lambda-config-reconcile-65U6I4KU.js} +3 -3
- package/dist/{landed-6VO7CX5P.js → landed-QA6PRTV2.js} +4 -4
- package/dist/{landing-record-QYECWLQ5.js → landing-record-FCAWLCZU.js} +22 -22
- package/dist/{live-diff-2S7E3SBZ.js → live-diff-IM4W3ELT.js} +5 -5
- package/dist/local-engine-choice-FPJAZSSD.js +79 -0
- package/dist/{local-engine-command-HMTQK7MN.js → local-engine-command-73NHWD6V.js} +92 -92
- package/dist/{local-engine-config-5U3SC434.js → local-engine-config-W3KB7RWM.js} +2 -2
- package/dist/{local-engine-deploy-TXAOYRGF.js → local-engine-deploy-Y4OAWL7K.js} +16 -16
- package/dist/{local-engine-process-6VZ7JJBP.js → local-engine-process-6YPJHKYM.js} +11 -11
- package/dist/{local-engine-state-TJWPWCC4.js → local-engine-state-OCW5YDD7.js} +3 -3
- package/dist/{local-engine-update-check-R5SPDVEJ.js → local-engine-update-check-X7TZGRFL.js} +7 -7
- package/dist/{lock-TS465GVY.js → lock-WXXC3QHL.js} +3 -3
- package/dist/{lock-commands-4VT3L5W5.js → lock-commands-PKDBNRSD.js} +55 -55
- package/dist/{login-command-O6WA4FYL.js → login-command-V4U4FA5G.js} +27 -27
- package/dist/{logout-command-6CPWGFY2.js → logout-command-TV3P545Z.js} +16 -16
- package/dist/{loop-UFHKSOQ4.js → loop-VKHGQ6MP.js} +6 -6
- package/dist/{marketplace-command-HKACSYKS.js → marketplace-command-LEFOAEAV.js} +30 -30
- package/dist/{marketplace-resolve-KLFYVRWS.js → marketplace-resolve-ME7O7JBJ.js} +7 -7
- package/dist/{meta-client-73PX6UGJ.js → meta-client-TEEECA5W.js} +14 -14
- package/dist/{module-manifest-GIKFNXPE.js → module-manifest-7YLGIRCY.js} +3 -3
- package/dist/node.d.ts +4 -4
- package/dist/node.js +56 -56
- package/dist/operation-outcome-GNDD35WL.js +51 -0
- package/dist/{output-target-SZMBNYF4.js → output-target-5FWX3NGZ.js} +17 -17
- package/dist/{plan-disclosure-BHYG7TZ7.js → plan-disclosure-QGL5UYQR.js} +16 -16
- package/dist/{plugin-contributions-X4V22PJQ.js → plugin-contributions-GNFTWDEB.js} +4 -4
- package/dist/{plugin-prompt-DKNQHW6Y.js → plugin-prompt-VEQGMZ4T.js} +4 -4
- package/dist/{plugin-questions-CQRVOWFK.js → plugin-questions-BGRL23GO.js} +3 -3
- package/dist/{preflight-command-EBQ6XQF3.js → preflight-command-VKJKXRRI.js} +63 -63
- package/dist/{profile-command-NPKBJYPM.js → profile-command-P7A3BH26.js} +29 -29
- package/dist/{profile-pointer-UOO7JNFG.js → profile-pointer-HG7IXE4I.js} +4 -4
- package/dist/{profile-select-74TRDEPD.js → profile-select-45G5VPJK.js} +2 -2
- package/dist/{project-dependency-RRMTWOPC.js → project-dependency-Z4CKOCJI.js} +8 -8
- package/dist/{project-sdk-FOR4IOXL.js → project-sdk-JWZWGXXR.js} +3 -3
- package/dist/promote-command-KHTIK44I.js +141 -0
- package/dist/{prompt-5GUQTCSP.js → prompt-SURZOUUW.js} +3 -3
- package/dist/{publish-command-LGLZBOCB.js → publish-command-HGAB3H4A.js} +131 -60
- package/dist/{pull-command-WQFPLITW.js → pull-command-EUEWBRXZ.js} +66 -66
- package/dist/{pull-superseded-GGURV5J3.js → pull-superseded-TOT5S4QU.js} +3 -3
- package/dist/{release-command-2OTNVMIL.js → release-command-WOVQAMUY.js} +64 -64
- package/dist/{release-ns-command-EIBN3JVM.js → release-ns-command-WOQE2BDQ.js} +87 -87
- package/dist/{retry-command-Y5YJGOH3.js → retry-command-JRGMZZAC.js} +8 -8
- package/dist/{routes-manifest-3BNZIVST.js → routes-manifest-URFMAWJE.js} +5 -5
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-FUG7WCES.js → secrets-file-YWZWVJ52.js} +16 -16
- package/dist/{secrets-fill-command-QEOCUOAY.js → secrets-fill-command-HIHK3VH2.js} +54 -54
- package/dist/{seed-GJHJSEUE.js → seed-24DTEY5S.js} +7 -7
- package/dist/{source-resolve-DMDZVPMM.js → source-resolve-OWD3MIEO.js} +23 -23
- package/dist/{static-host-WM24RG25.js → static-host-UIR2OLPQ.js} +9 -9
- package/dist/{status-command-XUH5OGQX.js → status-command-JKTHH5QE.js} +53 -53
- package/dist/{store-MR7IKXKK.js → store-5YAQS6KU.js} +6 -6
- package/dist/{store-CfgPaVPO.d.ts → store-zxw2go0f.d.ts} +3 -3
- package/dist/sveltekit.d.ts +5 -5
- package/dist/sveltekit.js +1 -1
- package/dist/{sync-contributions-DHP7XSTX.js → sync-contributions-RBB6JVOL.js} +9 -9
- package/dist/{table-ZBDPKMNH.js → table-MQFVYA4K.js} +8 -8
- package/dist/{tables-command-X3JK7VSK.js → tables-command-5Q4BSUNO.js} +39 -39
- package/dist/{tenant-GKXMOYLK.js → tenant-Q3LPVSSM.js} +10 -10
- package/dist/{tenant-command-P27EQHBU.js → tenant-command-BFVU2PEX.js} +84 -84
- package/dist/{test-command-A4G2FP7G.js → test-command-F4VUU4QR.js} +40 -40
- package/dist/{tests-C55M5EQS.js → tests-5ZSDFVIJ.js} +6 -6
- package/dist/{token-CMAB35GD.js → token-TERSTNU4.js} +12 -12
- package/dist/{toolchain-hooks-BGZBDFAT.js → toolchain-hooks-QVUZ6HZ4.js} +2 -2
- package/dist/{toolchain-modules-3M7QDJBV.js → toolchain-modules-FD5ANV2U.js} +5 -5
- package/dist/tracked-backend-B4HTME4S.js +80 -0
- package/dist/{update-check-LNNKIMML.js → update-check-O4C2LCZH.js} +53 -53
- package/dist/{upgrade-command-7EUXML3P.js → upgrade-command-NVFWLMTA.js} +56 -56
- package/dist/{whoami-command-KNWFWAX6.js → whoami-command-YKNTISIV.js} +15 -15
- package/dist/{workspace-TGPYOODG.js → workspace-GGVGE2S5.js} +5 -5
- package/dist/{workspace-binding-2TWZBHQY.js → workspace-binding-OS4ZOX4S.js} +14 -14
- package/dist/{workspace-command-T7Z2BDHD.js → workspace-command-GTUNVN7K.js} +77 -77
- package/dist/{workspace-env-VA7XN3UX.js → workspace-env-467C5KHM.js} +13 -13
- package/dist/{workspace-export-AIGM6LC7.js → workspace-export-3XTVGQVM.js} +5 -5
- package/dist/{writable-FYJBTJOU.js → writable-7SSWUQJ3.js} +3 -3
- package/dist/{xano-BSHYVFSE.js → xano-6RS5XQZE.js} +7 -7
- package/dist/{xanosdk-import-J6SRBZHW.js → xanosdk-import-E3WSIYUE.js} +9 -9
- package/dist/{xanosdk-project-6KTCO47O.js → xanosdk-project-KH5TZ2KI.js} +14 -14
- package/guides/README.md +1 -0
- package/guides/authoring.md +3 -5
- package/guides/bundle.md +45 -0
- package/guides/cli.md +32 -30
- package/guides/codegen.md +5 -4
- package/guides/codes.md +9 -9
- package/guides/deploying.md +63 -58
- package/guides/environment.md +13 -13
- package/guides/project-structure.md +14 -0
- package/llms/client.md +3 -4
- package/llms/errors.md +1 -1
- package/llms/tests.md +2 -2
- package/llms-full.txt +14 -15
- package/llms.txt +8 -8
- package/manifest.json +110 -107
- package/package.json +4 -4
- package/dist/env-example-refresh-ZO6XAV44.js +0 -127
- package/dist/local-engine-choice-6BSPEG3E.js +0 -79
- package/dist/operation-outcome-2P4BVSEV.js +0 -51
- package/dist/promote-command-4F2NAE6P.js +0 -141
- package/dist/tracked-backend-PZGUWD5J.js +0 -80
package/README.md
CHANGED
|
@@ -5,177 +5,194 @@
|
|
|
5
5
|
### The official TypeScript SDK for [Xano](https://xano.com).
|
|
6
6
|
|
|
7
7
|
**Write your app in TypeScript — the database, the APIs, even AI agents. Or let an
|
|
8
|
-
AI write it for you.
|
|
9
|
-
|
|
8
|
+
AI write it for you. Run it on your own machine on the Xano Engine, with no account and no
|
|
9
|
+
network. When it's ready, one command puts the same code live on Xano's cloud.**
|
|
10
10
|
|
|
11
|
-
[](https://www.npmjs.com/package/@xano/sdk)
|
|
12
12
|
[](https://nodejs.org)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
|
|
15
|
+
[What is Xano](#what-is-xano) ·
|
|
16
|
+
[Why](#why-xano-sdk) ·
|
|
17
|
+
[Quickstart](#quickstart) ·
|
|
18
|
+
[Xano Engine](#xano-on-your-machine) ·
|
|
19
|
+
[The model](#the-model) ·
|
|
20
|
+
[Typed frontend](#a-type-safe-frontend-for-free) ·
|
|
21
|
+
[Already on Xano?](#already-have-a-xano-workspace) ·
|
|
22
|
+
[Deploying](#deploying) ·
|
|
23
|
+
[Reference](#reference)
|
|
24
|
+
|
|
15
25
|
</div>
|
|
16
26
|
|
|
27
|
+
<!-- A short terminal recording of the three commands below belongs here. -->
|
|
28
|
+
|
|
17
29
|
```bash
|
|
18
|
-
npx @xano/sdk
|
|
19
|
-
|
|
20
|
-
npm run
|
|
21
|
-
npx xanosdk deploy ./xano/index.ts --static ./frontend/dist # 4. deploy both → live URLs
|
|
22
|
-
# Outside a project: npx @xano/sdk <cmd>. Inside one, npx xanosdk <cmd> runs its own install.
|
|
30
|
+
npx @xano/sdk init my-app && cd my-app # 1. scaffold your backend + frontend
|
|
31
|
+
npm run xano:deploy # 2. run the backend on the Xano Engine, on your machine
|
|
32
|
+
npm run dev # 3. start the frontend, already wired to it
|
|
23
33
|
```
|
|
24
34
|
|
|
25
35
|
```
|
|
26
|
-
→ Deploying ./xano/index.ts →
|
|
27
|
-
✓
|
|
28
|
-
! New
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
https://my-app.xano.io ← frontend, live
|
|
36
|
+
→ Deploying ./xano/index.ts → Xano Engine
|
|
37
|
+
✓ Xano Engine xanosdk-4f2a91 deployed
|
|
38
|
+
! New Xano Engine URL:
|
|
39
|
+
http://127.0.0.1:53358 ← your backend, on your machine
|
|
40
|
+
Open the builder: http://127.0.0.1:53358/signin?key=… ← Xano's visual builder, local too
|
|
41
|
+
Pointed .env.local at this deploy (VITE_XANO_HOST) ← the frontend, wired in
|
|
33
42
|
```
|
|
34
43
|
|
|
35
44
|
<div align="center">
|
|
36
45
|
|
|
37
|
-
**From an empty folder to a
|
|
38
|
-
TypeScript backend and a React or Svelte frontend.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
**From an empty folder to a running full-stack app, without signing up.** `init` writes a
|
|
47
|
+
TypeScript backend and a React or Svelte frontend. The **Xano Engine** runs that backend on
|
|
48
|
+
your laptop: no account, no network round-trip, and your data kept between redeploys. Change
|
|
49
|
+
your code — yourself or with an AI — and redeploy in seconds. When it's ready to share,
|
|
50
|
+
`npm run xano:deploy:ephemeral` puts the same code on a live URL on Xano's cloud.
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
[Quickstart](#quickstart) ·
|
|
45
|
-
[The model](#the-model) ·
|
|
46
|
-
[Deploying](#deploying) ·
|
|
47
|
-
[Type-safe frontend](#a-type-safe-frontend-for-free) ·
|
|
48
|
-
[Reference](#reference)
|
|
52
|
+
Outside a project the command is `npx @xano/sdk <cmd>`; inside one, `npx xanosdk <cmd>`.
|
|
49
53
|
|
|
50
54
|
</div>
|
|
51
55
|
|
|
52
56
|
---
|
|
53
57
|
|
|
54
|
-
##
|
|
58
|
+
## What is Xano?
|
|
55
59
|
|
|
56
|
-
Xano
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
[Xano](https://xano.com) is a hosted backend platform for business-critical systems — the
|
|
61
|
+
kind that run in production, not as prototypes. Postgres, REST APIs, auth, background tasks,
|
|
62
|
+
realtime, file storage, MCP servers and AI agents, all run for you on Kubernetes, with
|
|
63
|
+
SOC 2 Type II, ISO 27001, HIPAA and GDPR coverage ([trust center](https://security.xano.com)).
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
Xano's bet is simple: **AI builds software. Xano makes it trustworthy.** Everything an AI
|
|
66
|
+
writes — a schema, an endpoint, an agent — lands somewhere you can understand, govern and
|
|
67
|
+
run. This SDK is that idea as code in your repo: the backend is TypeScript you review, and
|
|
68
|
+
the platform is where it runs.
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
[Docs](https://docs.xano.com) ·
|
|
71
|
+
[Community](https://community.xano.com) ·
|
|
72
|
+
[YouTube](https://www.youtube.com/@XanoHQ) ·
|
|
73
|
+
[X](https://x.com/xanohq) ·
|
|
74
|
+
[Status](https://status.xano.com) ·
|
|
75
|
+
[Pricing](https://www.xano.com/pricing)
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Why Xano SDK
|
|
80
|
+
|
|
81
|
+
- **💻 Xano runs on your machine.** New for Xano: the Xano Engine is the platform on your
|
|
82
|
+
laptop. It needs no account and no network. It downloads once,
|
|
83
|
+
keeps your rows across redeploys, and opens the same visual builder you'd use in the cloud.
|
|
84
|
+
The project pins its version in `package.json`, so everyone on the team runs the same engine.
|
|
85
|
+
See [Xano, on your machine](#xano-on-your-machine).
|
|
86
|
+
|
|
87
|
+
- **🤖 Built for AI-written code.** A deterministic, fully-typed authoring surface: an agent
|
|
88
|
+
(or you) emits well-typed TypeScript that always compiles to a valid, importable workspace.
|
|
89
|
+
The package ships machine-readable grounding — `llms.txt` and the topic files beside it — so
|
|
90
|
+
a coding agent writes against the real API instead of a guess, and `init` drops an
|
|
91
|
+
`AGENTS.md` brief into every project. See
|
|
92
|
+
[Coverage & agent grounding](https://github.com/xano-sdk/sdk/blob/main/guides/coverage.md).
|
|
93
|
+
|
|
94
|
+
- **📦 TypeScript is the source of truth.** Tables, indexes, endpoints, functions, triggers,
|
|
95
|
+
tasks, middleware, AI toolsets — typed TS in your repo. Version it, review it in PRs, diff
|
|
96
|
+
it, roll it back. Prod matches staging because they are the same commit.
|
|
97
|
+
|
|
98
|
+
- **🚀 Deploy is built in, from laptop to production.** One `xanosdk deploy` command compiles
|
|
99
|
+
your code and ships it, first to the Xano Engine, then to an **ephemeral** on Xano's cloud,
|
|
100
|
+
then through a release to your **workspace**. It sends the backend **and** the static
|
|
101
|
+
frontend and prints their URLs. There's no export/import step and no upload script to maintain.
|
|
102
|
+
|
|
103
|
+
- **⚡ Disposable environments.** A Xano Engine and a cloud ephemeral are both yours to wipe
|
|
104
|
+
and rebuild as often as you like. Deploys are identity-stable: re-running never duplicates
|
|
105
|
+
objects, and the `xano.lock` every build writes keeps renames as renames, so your public
|
|
106
|
+
URLs stay yours.
|
|
74
107
|
|
|
75
108
|
- **🧩 The types flow to your frontend.** `import type` a `query()` def for its typed request
|
|
76
|
-
and response, and read its path and verb from
|
|
77
|
-
|
|
109
|
+
and response, and read its path and verb from a generated route manifest. Rename a column
|
|
110
|
+
and every consumer lights up red.
|
|
78
111
|
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
with machine-readable grounding an agent reads instead of your source — see
|
|
82
|
-
[Coverage & agent grounding](https://github.com/xanots/sdk/blob/main/guides/coverage.md).
|
|
112
|
+
- **🔁 It works both ways.** Already have a workspace? `init --from workspace` reads it back
|
|
113
|
+
as real, readable TypeScript — then deploys.
|
|
83
114
|
|
|
84
115
|
---
|
|
85
116
|
|
|
86
117
|
## Quickstart
|
|
87
118
|
|
|
88
|
-
The
|
|
89
|
-
|
|
90
|
-
**1. Sign in.** OAuth in your browser — no API keys to copy around. The CLI refreshes tokens
|
|
91
|
-
for you, and the target instance comes from your token rather than a flag.
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
npx @xano/sdk login
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
> On a remote shell, container, or Codespace — anywhere your browser can't reach this machine's `127.0.0.1` — add `--paste`. It prints the URL for you to open anywhere,
|
|
98
|
-
> and you paste the redirect back. No browser at all (CI, a headless agent)? Create a token in your instance's settings under **Metadata API & MCP Server**, then pipe it
|
|
99
|
-
> to `npx @xano/sdk profile add <name> --instance <url> --workspace-id <n>`. See [Signing in & deploying](https://github.com/xanots/sdk/blob/main/guides/deploying.md).
|
|
119
|
+
The three commands at the top of this page are the whole local loop. Here it is one step at a
|
|
120
|
+
time, then out to the cloud.
|
|
100
121
|
|
|
101
|
-
**
|
|
102
|
-
|
|
103
|
-
`xano/`, and the `xano:
|
|
122
|
+
**1. Scaffold.** No sign-in needed. `init` writes a Vite frontend under `frontend/` (React 19 +
|
|
123
|
+
shadcn/ui by default, or SvelteKit with `--framework svelte`), a Xano SDK backend under
|
|
124
|
+
`xano/`, and the `xano:deploy*` scripts already wired.
|
|
104
125
|
|
|
105
126
|
```bash
|
|
106
127
|
npx @xano/sdk init my-app && cd my-app
|
|
107
|
-
npm run dev # the frontend runs immediately
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
In a terminal it asks one question — the framework — with a default. `AGENTS.md`, the
|
|
111
|
-
agent brief every coding agent reads, is written without asking; `--no-agents-md` skips it. The theme is a flag, not a question: it is shadcn's own, a base color plus an
|
|
112
|
-
optional accent, rendered into the token stylesheet with a complete dark palette either way.
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
npx @xano/sdk init my-app --theme zinc-blue --dark toggle
|
|
116
|
-
npx @xano/sdk init my-app --theme https://ui.shadcn.com/r/themes/slate.json # or any registry theme
|
|
117
128
|
```
|
|
118
129
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
[The scaffolded project](https://github.com/
|
|
130
|
+
Theme it with a flag (`--theme zinc-blue --dark toggle`) or pick everything in a browser with
|
|
131
|
+
`--web`. The starter backend is empty but already deploys — grow it from `xano/EXAMPLE.md`.
|
|
132
|
+
Flags, presets, theming and add-ons: [The scaffolded project](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md).
|
|
122
133
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
back to `init` here in your terminal.
|
|
134
|
+
**2. Run it on the Xano Engine.** The first deploy downloads the engine for your platform and
|
|
135
|
+
pins its version in `package.json`; every one after starts in seconds, offline.
|
|
126
136
|
|
|
127
137
|
```bash
|
|
128
|
-
|
|
138
|
+
npm run xano:deploy # typecheck, then deploy the backend to an engine on this machine
|
|
139
|
+
npm run dev # the frontend, pointed at it through .env.local
|
|
129
140
|
```
|
|
130
141
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
start; `init` reaches out only to install the new project's dependencies, which
|
|
135
|
-
`--no-install` skips.
|
|
142
|
+
The deploy prints the backend URL and a link that opens Xano's visual builder on the engine.
|
|
143
|
+
That's the dev loop: edit `xano/`, redeploy, and keep `npm run dev` running. Redeploys keep
|
|
144
|
+
your rows (`--keep-data`); `-- --reset` gives a clean, re-seeded slate.
|
|
136
145
|
|
|
137
|
-
**3.
|
|
146
|
+
**3. Put it on Xano's cloud.** When you want a URL to share, sign in once and deploy to a
|
|
147
|
+
disposable **ephemeral** — a real Xano environment with its own address. The deploy prints
|
|
148
|
+
the backend and frontend URLs and bakes the backend one into your build as
|
|
149
|
+
`window.XANO_HOST`, so the frontend never needs to know it ahead of time.
|
|
138
150
|
|
|
139
151
|
```bash
|
|
140
|
-
|
|
152
|
+
npx xanosdk login # OAuth in your browser — no API keys to copy around
|
|
153
|
+
npm run xano:deploy:ephemeral # build the frontend, ship both → live URLs
|
|
141
154
|
```
|
|
142
155
|
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
> No browser on this machine — a container, a Codespace, CI? `npx @xano/sdk login --paste`
|
|
157
|
+
> prints the URL to open anywhere, and a token from your instance's settings works headless.
|
|
158
|
+
> See [Signing in & deploying](https://github.com/xano-sdk/sdk/blob/main/guides/deploying.md).
|
|
145
159
|
|
|
146
|
-
|
|
147
|
-
npx xanosdk deploy ./xano/index.ts --static ./frontend/dist
|
|
148
|
-
```
|
|
160
|
+
**4. Release it to your workspace:** `deploy --ephemeral --test`, `release create v1`, `promote v1` ([Deploying](#deploying)).
|
|
149
161
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
! New ephemeral URL:
|
|
154
|
-
https://e4f2-9ab1.xano.io ← backend, live
|
|
155
|
-
Expires in 1h 0m
|
|
156
|
-
✓ Config injected into 1 document: window.XANO_HOST ← backend URL, wired in
|
|
157
|
-
✓ Static host deployed
|
|
158
|
-
https://my-app.xano.io ← frontend, live
|
|
159
|
-
✓ Frontend is live ← edge confirmed serving THIS build
|
|
160
|
-
```
|
|
162
|
+
**Prefer to wire it by hand?** Install `@xano/sdk` in an ESM project and deploy
|
|
163
|
+
`xano/index.ts` with `npx xanosdk deploy ./xano/index.ts`; [Project structure](https://github.com/xano-sdk/sdk/blob/main/guides/project-structure.md)
|
|
164
|
+
has the two-line setup and the one rule that bites.
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
seconds. The deploy bakes the backend URL into your build as `window.XANO_HOST`, so the
|
|
164
|
-
frontend never needs to know it ahead of time — read it with a build-time fallback:
|
|
166
|
+
---
|
|
165
167
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
## Xano, on your machine
|
|
169
|
+
|
|
170
|
+
Xano has always been a hosted platform. The **Xano Engine** is that backend packaged to run on
|
|
171
|
+
your laptop. `xanosdk deploy` brings one up and deploys into it — it is where a deploy goes by default.
|
|
172
|
+
|
|
173
|
+
- **No account, no network.** A Xano Engine needs no sign-in, a cached one deploys offline,
|
|
174
|
+
and every import runs on your machine. It's the fastest way to try Xano, and an AI agent
|
|
175
|
+
can iterate against a real backend without credentials.
|
|
176
|
+
- **Your data stays put.** `--keep-data` merges each deploy into what the last one left, so
|
|
177
|
+
rows you entered through the app survive the edit. `--reset` starts over and re-seeds.
|
|
178
|
+
- **The builder, locally.** Every deploy prints a sign-in link to Xano's visual builder
|
|
179
|
+
running on the engine, so you can browse your tables and see what your code compiled to.
|
|
180
|
+
- **The whole stack.** `--static ./frontend/dist` has the engine serve your built frontend
|
|
181
|
+
too, and a SvelteKit app built with `@xano/sdk/sveltekit` renders on the server there.
|
|
182
|
+
- **Pinned, like a dependency.** The first run pins the engine version in `package.json`;
|
|
183
|
+
commit it and every checkout runs the same engine. Newer ones are offered, never forced.
|
|
184
|
+
- **Every command reaches it.** After a local deploy, `test run-all`, `tables`, `env set`,
|
|
185
|
+
`impersonate` and `status` target the engine without a flag, and with no account.
|
|
169
186
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
187
|
+
```bash
|
|
188
|
+
npx xanosdk local list # the engines running on this machine
|
|
189
|
+
npx xanosdk local stop <name> # stop one
|
|
190
|
+
npx xanosdk local update # move the pin to the latest engine
|
|
191
|
+
npx xanosdk local cache clear # reclaim the disk space
|
|
192
|
+
```
|
|
174
193
|
|
|
175
|
-
|
|
176
|
-
(
|
|
177
|
-
are unchanged. `type=module` matters: Xano SDK defs are ESM-only, and `npm init` writes `"type": "commonjs"`. A TypeScript entry wants
|
|
178
|
-
[`tsx`](https://tsx.is) (`npm i -D tsx`), which the CLI picks up — Node's type stripping does not remap a workspace's `./x.js` imports.
|
|
194
|
+
Where it keeps its data, serving a frontend, trying an engine build without moving the pin:
|
|
195
|
+
[Deploying locally](https://github.com/xano-sdk/sdk/blob/main/guides/deploying.md#deploying-locally).
|
|
179
196
|
|
|
180
197
|
---
|
|
181
198
|
|
|
@@ -231,7 +248,7 @@ Tab-complete `s.` to discover the entire statement catalog — `s.db.*`, `s.math
|
|
|
231
248
|
and more. **All 218 engine statement surfaces are authorable** — every field name matches
|
|
232
249
|
the Xano engine, and the emitted shape is checked against bytes a real engine stored. Where
|
|
233
250
|
a surface has no stored instance behind it yet, it is built from the engine's own schema;
|
|
234
|
-
[Coverage](https://github.com/
|
|
251
|
+
[Coverage](https://github.com/xano-sdk/sdk/blob/main/guides/coverage.md) says which is which.
|
|
235
252
|
|
|
236
253
|
Give a table a `seed` array and those rows ship into the database on deploy, so a fresh
|
|
237
254
|
environment comes up with its lookup tables and fixtures already in place. A file column or an
|
|
@@ -253,107 +270,9 @@ knowledge({
|
|
|
253
270
|
So the instructions your agents follow are reviewed in a diff, versioned with the code they
|
|
254
271
|
describe, and redeployed with it — instead of living in a console where nothing tracks them.
|
|
255
272
|
|
|
256
|
-
Tables, fields,
|
|
257
|
-
|
|
258
|
-
[
|
|
259
|
-
[Object kinds](https://github.com/xanots/sdk/blob/main/guides/object-kinds.md).
|
|
260
|
-
|
|
261
|
-
---
|
|
262
|
-
|
|
263
|
-
## Deploying
|
|
264
|
-
|
|
265
|
-
A deploy targets a **disposable ephemeral**. Reaching anything real goes through a **release** — the stored record
|
|
266
|
-
that this code came up and answered: `deploy --test`, then `release create v1`, then `promote v1`.
|
|
267
|
-
|
|
268
|
-
| Command | Where it goes |
|
|
269
|
-
|---|---|
|
|
270
|
-
| `xanosdk deploy` | A disposable **ephemeral** — create-or-refreshed each run, auto-expiring, with its own URL. The default; needs no flag. |
|
|
271
|
-
| `xanosdk deploy --local-engine` | A **local engine** on this machine — no network round-trip per deploy, nothing to configure, and no Xano account needed. The first run downloads the engine and pins its version in `package.json` so every checkout runs the same one; `xanosdk local-engine update` moves the pin ([details](guides/deploying.md#deploying-to-a-local-engine)). |
|
|
272
|
-
| `xanosdk promote <release>` | Your **main Xano instance** workspace — the production target. Lands a release on a branch named for it, reads the branch back, and fails naming anything the release declared that did not arrive. `--set-live` serves it once that check passes. Tables are shared by every branch, so its table changes reach live as it lands — one that alters a table is refused without `--allow-shared-schema-changes`. |
|
|
273
|
-
| `xanosdk tenant deploy <tenant> <release>` | A **customer tenant** — the same release, on someone else's deployment. It **replaces** what the tenant serves: anything the release does not carry is removed. Static hosting is kept. |
|
|
274
|
-
| `xanosdk release transfer <release> --to-profile <profile>` | **Another workspace or instance** — copies the stored release, checked by content hash, to `promote` there. |
|
|
275
|
-
| `xanosdk deploy --to <dest>` | The **escape hatch**: merges a local build straight into `workspace` or `tenant:<name>`, skipping the release record. |
|
|
276
|
-
| `xanosdk publish <dir>` | **Just the frontend**: an already-built directory onto the ephemeral you last deployed to (default), `workspace`, or `tenant:<name>` static host — after a local-engine deploy, `--to ephemeral`, as a local engine has none. No compile, no backend import — the retry when a frontend fails after its backend landed, and `npm run xano:deploy:frontend` in a scaffold. |
|
|
277
|
-
|
|
278
|
-
Every `deploy` is a **full replace** of the disposable environment unless [`--keep-data`](guides/deploying.md#keeping-your-data-between-deploys) merges, keeping its rows.
|
|
279
|
-
Promoting is the opposite by design: it changes what your code defines and keeps every row — so an unchanged
|
|
280
|
-
project is a no-op. But tables have no branch: a change that alters one reaches live as it lands, so it is refused without `--allow-shared-schema-changes`. A tenant deploy then serves
|
|
281
|
-
exactly the release, and a `--seed` release REPLACES its seeded tables' rows, named with counts first ([details](guides/deploying.md#what-a-landing-does-to-tables)).
|
|
282
|
-
|
|
283
|
-
Going the other way — from a backend you did not author — is `xanosdk pull release:v1`, which **rewrites** the decoded files in `xano/` — it keeps files you added, and lists and confirms first.
|
|
284
|
-
|
|
285
|
-
**The alternative.** `deploy --to workspace` merges your local build straight in, skipping the release record. Reach
|
|
286
|
-
for it to delete objects, or for the plan preview a release cannot run (`--dry-run`, `--prune`; `--yes` skips the
|
|
287
|
-
prompt for CI, never the preview). It leaves nothing to re-land — prefer a release for anything you may repeat.
|
|
288
|
-
|
|
289
|
-
A release name is **refused** rather than resolved when it already exists, and so is a public URL something else
|
|
290
|
-
already holds. Nothing is written, the message names what holds it, and the exit code is `2`. `--yes` does not
|
|
291
|
-
waive it: a taken identity is not a question about whether you meant it.
|
|
292
|
-
|
|
293
|
-
**Scripting a landing:** `release create`, `promote` and `tenant deploy --json` print one result, failures included; `completed: unknown` exits `9` —
|
|
294
|
-
run its `resolveWith` before retrying ([details](guides/deploying.md#reading-the-result---json-and-exit-codes)).
|
|
295
|
-
|
|
296
|
-
> ⚠️ A deploy is a full replace of the target environment, **including its table records**, before importing. The
|
|
297
|
-
> blast radius is your own disposable ephemeral — but anything you only ever created by hand in it is gone. That
|
|
298
|
-
> is exactly why reaching production goes through a release.
|
|
299
|
-
|
|
300
|
-
**Deploying to a branch.** With one workspace, a deploy and production are the same thing.
|
|
301
|
-
`--branch <label>` lands it on a non-live branch instead, `--set-live` promotes it, and
|
|
302
|
-
`--backup-branch` snapshots live's logic, not its shared tables, for a one-`set-live` rollback — see
|
|
303
|
-
[the deploying guide](guides/deploying.md). The flag reads too: `init --from workspace --branch
|
|
304
|
-
<label>` pulls that branch rather than live, so reviewing one as TypeScript costs no cutover.
|
|
305
|
-
|
|
306
|
-
> ⚠️ **A branch stages your logic, not your database.** Tables and microservices are shared by
|
|
307
|
-
> every branch, so a schema change reaches production whichever branch you target. A branch
|
|
308
|
-
> release carrying one is refused unless you pass `--allow-shared-schema-changes`. Seeded
|
|
309
|
-
> **rows** are shared too, so reference data has an order: rows first (`workspace
|
|
310
|
-
> reset-tables`), then the logic reading them — the guide has the recipe.
|
|
311
|
-
|
|
312
|
-
> ⚠️ **`--replace` clears by workspace, not by branch.** It deletes every non-live branch and
|
|
313
|
-
> the saved versions that would restore one — not recoverable. Refused unless you pass
|
|
314
|
-
> `--allow-branch-deletion`, which `--yes` does not cover; the guide has the recipe.
|
|
315
|
-
|
|
316
|
-
`xanosdk status` answers where you stand in one read — who you are signed in as, which
|
|
317
|
-
credential profile that came from, which instance and workspace it is bound to, and the
|
|
318
|
-
backend this project last deployed to — an ephemeral or a local engine — including whether it is still alive and when it
|
|
319
|
-
expires. More than one account or instance is `xanosdk login --profile <name>`, then
|
|
320
|
-
`--profile <name>` on any command. `xanosdk init` commits a `xano.profile.json` pinning the
|
|
321
|
-
repository to one credential (`xanosdk profile use <name>` repoints it), and nothing ambient
|
|
322
|
-
outranks that pin: a `$XANO_PROFILE` in a shell rc cannot retarget a pinned project, only
|
|
323
|
-
`--profile` can. The tracked environment is per profile, so a redeploy under another credential
|
|
324
|
-
cannot refresh the wrong tenant, and every writing command names its target before writing.
|
|
325
|
-
|
|
326
|
-
**Your dev server follows the deploy.** In a scaffolded project, a deploy that publishes no static site writes the backend
|
|
327
|
-
URL into the project's gitignored `.env.local` as `VITE_XANO_HOST`, in a marked block that leaves your own values alone and
|
|
328
|
-
is replaced rather than repeated next time. **Restart the dev server to pick it up.** `--no-dev-env` turns it off, and so
|
|
329
|
-
do `--static <dir>` and a site an earlier deploy published there that still serves — a frontend reads the URL at runtime. A `.env.local` your repo does not ignore is
|
|
330
|
-
reported, never written.
|
|
331
|
-
|
|
332
|
-
Every flag, the `--prune` rules, the identity model, and headless CI runs are in
|
|
333
|
-
[Signing in & deploying](https://github.com/xanots/sdk/blob/main/guides/deploying.md). Every operation names a backend one way — `workspace`, `ephemeral[:<name>]`, `local-engine[:<name>]`, `tenant:<name>`, `release:<name>` — and a bare one follows the ephemeral or local engine you last deployed to, never your workspace ([the grammar](guides/cli.md#naming-a-backend)).
|
|
334
|
-
Environment management is `xanosdk ephemeral <list|get|delete|export>`; `xanosdk tables [backend]` lists guids and `xanosdk impersonate [backend]` opens one in the builder.
|
|
335
|
-
|
|
336
|
-
### Testing
|
|
337
|
-
|
|
338
|
-
The tests you author — a `tests` entry on a query, function, or middleware, or a standalone
|
|
339
|
-
`workflowTest()` — run against a deployed environment:
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
npx xanosdk test run-all # the ephemeral or local engine you last deployed to
|
|
343
|
-
npx xanosdk test run-all --on ephemeral:e4f2-9ab1 # or one by its name, not its display name (also local-engine, tenant:<name>)
|
|
344
|
-
npx xanosdk test run-all --on workspace # or your real workspace
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
A test's `datasource` defaults to `""` — an empty database, so `table({ seed })` rows are
|
|
348
|
-
not visible. On an ephemeral, set `datasource: "live"` to read them: there it holds only
|
|
349
|
-
your seed fixtures (plus any rows a `--keep-data` deploy kept). That value is **stored on the test**, so clear it before you release —
|
|
350
|
-
a non-empty datasource is cloned before every run, and against your real workspace that is
|
|
351
|
-
the production database.
|
|
352
|
-
|
|
353
|
-
`xanosdk test list` shows what is there without running it, and `xanosdk test run "<name>"`
|
|
354
|
-
runs one. A failing suite exits **5**, distinct from a crash, so CI can tell the two apart.
|
|
355
|
-
To deploy and prove it in one step, `xanosdk deploy ./xano/index.ts --test` — a failing test
|
|
356
|
-
exits 5 **without** retracting the deploy, so the environment is live either way.
|
|
273
|
+
Tables, fields, statements, values, inputs, and middleware are all in the
|
|
274
|
+
[Authoring reference](https://github.com/xano-sdk/sdk/blob/main/guides/authoring.md); every
|
|
275
|
+
kind you can author is in [Object kinds](https://github.com/xano-sdk/sdk/blob/main/guides/object-kinds.md).
|
|
357
276
|
|
|
358
277
|
---
|
|
359
278
|
|
|
@@ -383,159 +302,138 @@ async function fetchPosts(): Promise<Post[]> {
|
|
|
383
302
|
```
|
|
384
303
|
|
|
385
304
|
- **`routePath("GET blog/{slug}", { slug })`** → the endpoint path, resolved from your code
|
|
386
|
-
(or the frozen `xano.lock`). Keys are `"<VERB> <name>"
|
|
387
|
-
|
|
388
|
-
rename is a compile error rather than a 404.
|
|
389
|
-
- **`ROUTES[key].verb`** → the HTTP method, as a literal.
|
|
305
|
+
(or the frozen `xano.lock`). Keys are `"<VERB> <name>"` and are checked at compile time,
|
|
306
|
+
`{param}` names included: a backend rename is a compile error rather than a 404.
|
|
390
307
|
- **`InferInput<typeof someQuery>`** → the request-payload type, derived from a query's
|
|
391
|
-
`input` map
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
consumer breaks at compile time — exactly where you want it.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
Import defs into a frontend with `import type` only. A def imported as a value, for its
|
|
402
|
-
`getPath()`/`verb`, runs its factory calls at module load and carries the SDK runtime and
|
|
403
|
-
the backend graph it references into the bundle. The measured bundle
|
|
404
|
-
numbers, the full response-inference rules, endpoint-name constraints, and the realtime
|
|
405
|
-
helpers are in
|
|
406
|
-
[The typed frontend surface](https://github.com/xanots/sdk/blob/main/guides/typed-frontend.md).
|
|
308
|
+
`input` map. **No codegen, always in sync.**
|
|
309
|
+
- **`InferRow<typeof post>`** / **`InferResponse<typeof someQuery>`** → the table's row type
|
|
310
|
+
and the endpoint's response type, closing the round trip. Rename or retype a column and
|
|
311
|
+
every consumer breaks at compile time — exactly where you want it.
|
|
312
|
+
|
|
313
|
+
Import defs into a frontend with `import type` only — a def imported as a value runs its
|
|
314
|
+
factory calls at module load and carries the SDK runtime into your bundle. The measured bundle
|
|
315
|
+
numbers, the full response-inference rules, and the realtime helpers are in
|
|
316
|
+
[The typed frontend surface](https://github.com/xano-sdk/sdk/blob/main/guides/typed-frontend.md).
|
|
407
317
|
|
|
408
318
|
---
|
|
409
319
|
|
|
410
320
|
## Already have a Xano workspace?
|
|
411
321
|
|
|
412
322
|
`--from` runs the loop the other way: it reads a workspace and writes it back out as
|
|
413
|
-
readable Xano SDK source — real `s.db.query(...)`, `f.email()`, typed defs — not a JSON dump
|
|
414
|
-
|
|
415
|
-
scaffolds, with the pulled workspace filling `xano/` instead of the starter. So a pull
|
|
416
|
-
deploys:
|
|
323
|
+
readable Xano SDK source — real `s.db.query(...)`, `f.email()`, typed defs — not a JSON dump,
|
|
324
|
+
and inside the same runnable project `init` scaffolds. So a pull deploys:
|
|
417
325
|
|
|
418
326
|
```bash
|
|
419
327
|
npx @xano/sdk init my-app --from workspace # your real workspace (the one your login is scoped to)
|
|
420
328
|
cd my-app
|
|
421
|
-
npm run
|
|
422
|
-
npm run xano:deploy # → a live ephemeral URL
|
|
329
|
+
npm run xano:deploy # → your workspace, running on your machine
|
|
423
330
|
```
|
|
424
331
|
|
|
425
|
-
The other sources are the same flag with a different value — `--from ephemeral:<name>`, `--from local-engine:<name>`,
|
|
426
|
-
and `--from ./ws.json` for a bundle already on disk (offline, no login). Everything else about the project is unchanged, so `--theme`, `--no-agents-md` and `--web`
|
|
427
|
-
compose with a pull exactly as they do with a starter. For just the `xano/` tree with no project around it, `xanosdk generate <source> [--out <dir>]` also reads `release:<name>` and `tenant:<name>`.
|
|
428
|
-
|
|
429
332
|
Object identities are preserved, so cross-references stay intact, and a statement this SDK
|
|
430
333
|
does not model yet round-trips verbatim rather than breaking the pull. Then it checks its own
|
|
431
334
|
work: the tree it just wrote is loaded, exported, and diffed against the workspace it came
|
|
432
335
|
from, so "it compiled" and "it means the same thing" are separate claims and you get both.
|
|
433
336
|
|
|
434
|
-
> ⚠️ **After a pull, `xano/` is your source** — edit it and commit it. A
|
|
435
|
-
> only
|
|
436
|
-
>
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
carries values writes them to `xano/.env` for you). They belong in `xano/.env` — gitignored,
|
|
442
|
-
preserved across a pull, and read with no flag by every command that compiles a bundle. Copy
|
|
443
|
-
`xano/.env.example` and fill it in, or run `npx xanosdk env pull` to fetch them from a running
|
|
444
|
-
backend; `npx xanosdk env set NAME` / `env unset NAME` change one live value without a deploy.
|
|
445
|
-
Because a deploy *replaces* the backend's env set, a declared name with no value refuses the
|
|
446
|
-
deploy rather than clearing the live one; CI mounts its own file and passes `--backend-env-file <path>`. The token gating a **hosted doc site** is a secret too, and goes in a second
|
|
447
|
-
ignored file. The source declares only the gate — `documentation: { require_token: true }` on the
|
|
448
|
-
workspace config or an `apiGroup`, and a literal `token` fails the export. `npx xanosdk pull` writes
|
|
449
|
-
the value to `xano/.secrets.json` and every build reads it back; `npx xanosdk secrets fill` mints one
|
|
450
|
-
for a gate you declared yourself, which has none to pull. Omitting the workspace's block leaves the
|
|
451
|
-
target's alone, but an API group's is always sent, so omitting *that* one clears its gate — the
|
|
452
|
-
export fails when a group publishes docs and declares a gate with no token. A merge (`deploy --to
|
|
453
|
-
workspace`) never writes the workspace's block and says so; `--replace` does.
|
|
454
|
-
|
|
455
|
-
What the generated tree looks like, how faithful the pull is, and how to read its report are
|
|
456
|
-
in [Pulling an existing workspace](https://github.com/xanots/sdk/blob/main/guides/codegen.md).
|
|
337
|
+
> ⚠️ **After a pull, `xano/` is your source** — edit it and commit it. A pull carries schema
|
|
338
|
+
> only — no table rows or stored files — and deploying it is a *full replace* of the target,
|
|
339
|
+
> so try a change on the Xano Engine or a disposable ephemeral first.
|
|
340
|
+
|
|
341
|
+
The other sources (`--from ephemeral:<name>`, `--from ./ws.json`), how env var names and
|
|
342
|
+
values travel, the doc-site token, and how to read the decode report are in
|
|
343
|
+
[Pulling an existing workspace](https://github.com/xano-sdk/sdk/blob/main/guides/codegen.md).
|
|
457
344
|
|
|
458
345
|
---
|
|
459
346
|
|
|
460
|
-
##
|
|
347
|
+
## Deploying
|
|
461
348
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
349
|
+
Code moves through three places: the **Xano Engine** on your machine, a disposable
|
|
350
|
+
**ephemeral** on Xano's cloud, and your **workspace**. `deploy` reaches the first two.
|
|
351
|
+
Reaching anything real goes through a **release** — the stored record that this code came up
|
|
352
|
+
and answered: `deploy --ephemeral --test`, then `release create v1`, then `promote v1`.
|
|
465
353
|
|
|
466
|
-
|
|
|
354
|
+
| Command | Where it goes |
|
|
467
355
|
|---|---|
|
|
468
|
-
|
|
|
469
|
-
|
|
|
470
|
-
|
|
|
471
|
-
|
|
|
472
|
-
|
|
|
473
|
-
|
|
|
474
|
-
|
|
|
475
|
-
| [Warning and error codes](https://github.com/xanots/sdk/blob/main/guides/codes.md) | Every code the CLI and the build emit, with what it means |
|
|
476
|
-
| [Signing in & deploying](https://github.com/xanots/sdk/blob/main/guides/deploying.md) | Auth, ephemerals, `--static`, releasing to production, `xanosdk preflight` |
|
|
477
|
-
| [Environment & identity](https://github.com/xanots/sdk/blob/main/guides/environment.md) | Every environment variable, and how `xano.lock` pins identity |
|
|
478
|
-
| [The typed frontend surface](https://github.com/xanots/sdk/blob/main/guides/typed-frontend.md) | Path resolution, input/response inference, bundle cost, the route manifest |
|
|
479
|
-
| [Pulling an existing workspace](https://github.com/xanots/sdk/blob/main/guides/codegen.md) | What `xanosdk init --from` writes, how faithful it is, and how to read its report |
|
|
480
|
-
| [Coverage & agent grounding](https://github.com/xanots/sdk/blob/main/guides/coverage.md) | What is covered, what is out of scope, and the files agents read |
|
|
481
|
-
|
|
482
|
-
### Reading a compiled bundle
|
|
483
|
-
|
|
484
|
-
`@xano/sdk` writes a bundle; `@xano/sdk/bundle` reads one back. It is the surface for
|
|
485
|
-
tools that take compiled JSON as input — a graph view, a diff, a linter, a docs generator —
|
|
486
|
-
so none of them has to reverse-engineer the storage shape and then go quietly wrong when the
|
|
487
|
-
engine grows a new one.
|
|
356
|
+
| `xanosdk deploy` | The **Xano Engine** on this machine — the default. No network round-trip per deploy, and no Xano account needed. The first run downloads the engine and pins its version in `package.json` ([details](#xano-on-your-machine)). |
|
|
357
|
+
| `xanosdk deploy --ephemeral` | A disposable **ephemeral** on Xano's cloud — create-or-refreshed each run, auto-expiring, with its own URL. |
|
|
358
|
+
| `xanosdk promote <release>` | Your **main Xano instance** workspace — the production target. Lands a release on a branch named for it, reads the branch back, and fails naming anything the release declared that did not arrive. `--set-live` serves it once that check passes. |
|
|
359
|
+
| `xanosdk tenant deploy <tenant> <release>` | A **customer tenant** — the same release, on someone else's deployment. It **replaces** what the tenant serves; static hosting is kept. |
|
|
360
|
+
| `xanosdk release transfer <release> --to-profile <profile>` | **Another workspace or instance** — copies the stored release, checked by content hash, to `promote` there. |
|
|
361
|
+
| `xanosdk deploy --to <dest>` | The **escape hatch**: merges a local build straight into `workspace` or `tenant:<name>`, skipping the release record. |
|
|
362
|
+
| `xanosdk publish <dir>` | **Just the frontend**: an already-built directory onto the Xano Engine or ephemeral you last deployed to, `workspace`, or `tenant:<name>` — the retry when a frontend fails after its backend landed. |
|
|
488
363
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
364
|
+
Every `deploy` is a **full replace** of the disposable environment, table records included,
|
|
365
|
+
unless `--keep-data` merges. Promoting is the opposite by design: it changes what your code
|
|
366
|
+
defines and keeps every row. Tables are shared by every branch, so a release that alters one
|
|
367
|
+
is refused without `--allow-shared-schema-changes`. `--branch <label>` lands on a non-live
|
|
368
|
+
branch and `--set-live` promotes it, while `--backup-branch` snapshots live's logic, not its shared tables,
|
|
369
|
+
for a one-`set-live` rollback. A release name is refused rather than resolved when it already exists.
|
|
492
370
|
|
|
493
|
-
|
|
494
|
-
|
|
371
|
+
`xanosdk status` answers where you stand in one read — who you are signed in as, which
|
|
372
|
+
instance and workspace, and the backend this project last deployed to. Every flag, the
|
|
373
|
+
identity model, `--json` and exit codes, and headless CI runs are in
|
|
374
|
+
[Signing in & deploying](https://github.com/xano-sdk/sdk/blob/main/guides/deploying.md).
|
|
495
375
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
376
|
+
### Testing
|
|
377
|
+
|
|
378
|
+
The tests you author — a `tests` entry on a query, function, or middleware, or a standalone
|
|
379
|
+
`workflowTest()` — run against a deployed environment:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
npx xanosdk test run-all # the Xano Engine or ephemeral you last deployed to
|
|
383
|
+
npx xanosdk test run-all --on workspace # or your real workspace
|
|
502
384
|
```
|
|
503
385
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
The
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
386
|
+
A failing suite exits **5**, distinct from a crash, so CI can tell the two apart. To deploy
|
|
387
|
+
and prove it in one step, `xanosdk deploy ./xano/index.ts --test`. A test's `datasource` is
|
|
388
|
+
stored on the test and cloned before every run, so read
|
|
389
|
+
[Object kinds](https://github.com/xano-sdk/sdk/blob/main/guides/object-kinds.md) before
|
|
390
|
+
pointing one at your real workspace.
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Reference
|
|
395
|
+
|
|
396
|
+
Every kind, statement, filter, and field type is typed, so your editor's autocomplete is
|
|
397
|
+
the fastest lookup — tab-complete `s.`, `f.`, `c.`, `fl.`, `input.`. For the written
|
|
398
|
+
reference, the guides carry the shape of a project and the behavior that will bite you:
|
|
399
|
+
|
|
400
|
+
| Guide | What's in it |
|
|
401
|
+
|---|---|
|
|
402
|
+
| [Project structure](https://github.com/xano-sdk/sdk/blob/main/guides/project-structure.md) | How a `xano/` project is laid out, why registration is explicit, wiring one by hand |
|
|
403
|
+
| [The scaffolded project](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md) | What `xanosdk init` writes, the two frontend presets, theming, add-ons, SvelteKit rules |
|
|
404
|
+
| [The marketplace](https://github.com/xano-sdk/sdk/blob/main/guides/marketplace.md) | Finding add-ons, the two kinds of module, and the install/reinstall/remove lifecycle |
|
|
405
|
+
| [The module contract](https://github.com/xano-sdk/sdk/blob/main/guides/module-contract.md) | Building an add-on: the manifest fields, the plugin types, every hook, and what is refused |
|
|
406
|
+
| [Object kinds](https://github.com/xano-sdk/sdk/blob/main/guides/object-kinds.md) | Every authorable kind, and splitting a workspace across microservices |
|
|
407
|
+
| [Authoring reference](https://github.com/xano-sdk/sdk/blob/main/guides/authoring.md) | Tables and fields, statements, values, inputs, middleware, seed data |
|
|
408
|
+
| [CLI](https://github.com/xano-sdk/sdk/blob/main/guides/cli.md) | Every command, shell completion, and what failures look like |
|
|
409
|
+
| [Warning and error codes](https://github.com/xano-sdk/sdk/blob/main/guides/codes.md) | Every code the CLI and the build emit, with what it means |
|
|
410
|
+
| [Signing in & deploying](https://github.com/xano-sdk/sdk/blob/main/guides/deploying.md) | Auth, ephemerals, `--static`, releasing to production, `xanosdk preflight` |
|
|
411
|
+
| [Environment & identity](https://github.com/xano-sdk/sdk/blob/main/guides/environment.md) | Every environment variable, and how `xano.lock` pins identity |
|
|
412
|
+
| [The typed frontend surface](https://github.com/xano-sdk/sdk/blob/main/guides/typed-frontend.md) | Path resolution, input/response inference, bundle cost, the route manifest |
|
|
413
|
+
| [Pulling an existing workspace](https://github.com/xano-sdk/sdk/blob/main/guides/codegen.md) | What `xanosdk init --from` writes, how faithful it is, and how to read its report |
|
|
414
|
+
| [Reading a compiled bundle](https://github.com/xano-sdk/sdk/blob/main/guides/bundle.md) | `@xano/sdk/bundle`: walking, hashing and diffing compiled JSON from your own tools |
|
|
415
|
+
| [Coverage & agent grounding](https://github.com/xano-sdk/sdk/blob/main/guides/coverage.md) | What is covered, what is out of scope, and the files agents read |
|
|
416
|
+
|
|
417
|
+
The package also ships two machine-readable descriptions of the same surface, generated from
|
|
418
|
+
the SDK's own sources so they cannot drift from it: `llms.txt` (the router — the mental model
|
|
419
|
+
and the gotchas, plus a map of the `llms/*.md` topic files) and `manifest.json` (per-entry
|
|
420
|
+
detail: field schemas, filter arguments, stored names; its `cli` array plus `version` is the
|
|
421
|
+
[compatibility contract](https://github.com/xano-sdk/sdk/blob/main/guides/cli.md#checking-what-an-installed-sdk-can-do)
|
|
422
|
+
for tools that drive the CLI).
|
|
526
423
|
|
|
527
424
|
---
|
|
528
425
|
|
|
529
426
|
<div align="center">
|
|
530
427
|
|
|
531
|
-
**Write TypeScript. Run
|
|
428
|
+
**Write TypeScript. Run it on the Xano Engine. Ship it to Xano's cloud.**
|
|
532
429
|
|
|
533
430
|
[npm](https://www.npmjs.com/package/@xano/sdk) ·
|
|
534
|
-
[GitHub](https://github.com/
|
|
535
|
-
[Issues](https://github.com/
|
|
431
|
+
[GitHub](https://github.com/xano-sdk/sdk) ·
|
|
432
|
+
[Issues](https://github.com/xano-sdk/sdk/issues) ·
|
|
536
433
|
[Changelog](CHANGELOG.md) ·
|
|
537
434
|
[`llms.txt`](llms.txt) — the agent-facing router, mapping the `llms/` topic files
|
|
538
435
|
|
|
539
|
-
Xano SDK is the official TypeScript SDK for [Xano](https://xano.com)
|
|
436
|
+
Xano SDK is the official TypeScript SDK for [Xano](https://xano.com) —
|
|
437
|
+
[docs](https://docs.xano.com) · [community](https://community.xano.com). MIT licensed.
|
|
540
438
|
|
|
541
439
|
</div>
|