The CLI reference
Every xuda-cli command, every xuda.config.js field, and what cloud sync can do today.
xuda-cli is three commands, plus help. None of them takes a flag: any extra argument is a hard
error, and every setting lives in xuda.config.js.
Commands
dev runs the app with no cloud connection at all: it answers a handful of local endpoints itself
so the app has everything it needs, and in that isolated mode it also handles the four table read
and write operations locally. Anything else is proxied upstream when an API key is configured, and
refused with a clear message when one is not.
xuda.config.js
Server-side rendering
Set ssr to first_page to server-render the entry program and hand off to the client from there,
or full to server-render the app and hydrate it client-side. Leave it at none to render entirely
in the browser.
Set the mode
Edit ssr in xuda.config.js.
Restart dev
npm run dev needs a restart after an SSR change.
Confirm the payload
The CLI renders the entry program to a string in a sandboxed context, injects the markup into the shell, and hands the client a render payload to continue from.
API keys
Open Developers, then the API Keys tab in the dashboard, and press Create key. Name the key, optionally restrict Allowed Domains, and choose an access mode.
A key with the right access can call the app data methods directly over HTTP today: dbs_read,
dbs_create, dbs_update and dbs_delete. See JavaScript
Framework for the request shape.
Cloud sync
sync's intent is to pull a cloud project's documents into local source files and push local
changes back. It runs a precondition check that confirms four platform methods are callable before
doing anything else:
get_app_system_api_methods, get_app_api_keys, get_project_docs,
update_app_info_doc_to_db_couch.
Two of those are dashboard-session methods that by design never appear in the catalog listing the
check reads, and the other two are not registered as callable platform methods at all, so the check
does not pass against the current method catalog. Separately, anything that needs api_key in the
CLI, including upstream proxying and sync itself, loads platform modules from disk that a
published npm install of the CLI does not ship.
Treat dev as the local toolchain and use Studio to get project work into the cloud project. None
of this affects local development: dev, live reload, SSR and plugins all work with no cloud
connection at all.
When sync does run its full sequence, it: verifies the app exposes the required CPI methods,
verifies the current API key can use them, downloads remote docs into
node_modules/.project_data/, creates missing local source files from those docs (existing local
files are never overwritten), recompiles local source back into node_modules/.project_data/, and
uploads changed docs back to the cloud.
Troubleshooting
Plans and limits
The framework itself is free: local development against either authoring path never calls a plan-gated method, the CLI packages are published openly on npm, and API keys are free regardless of access mode. What an account plan buys is deployment, which is not available on the Free plan and available from Pro upward.