Documentation
The avoca CLI
Deploy from your terminal or CI. The CLI is a thin client over the management API; it needs Node 18 or newer and has no dependencies.
Install
The CLI isn’t on npm yet. Until it is, deploy from the dashboard (Git import or upload) or call the management API directly; the commands below show how the CLI will work.
$ avoca --helpLog in
Create an access token in the dashboard under Account → Access Tokens. Deploying needs a token with the sites scope (tokens created before site deploys existed don’t have it, so create a new one).
$ avoca login --token avt_xxxxxxxx… # saved to ~/.avoca/config.json
$ avoca logoutIn CI, set AVOCA_ACCESS_TOKEN instead of logging in.
Create or link a site
$ avoca sites list
$ avoca sites create --server <server id> --name my-site --framework vite
$ avoca sites link my-sitesites create also takes --repo <https url> and --branch main. Frameworks: vite, react, vue, next, next-server, nuxt, node, astro, cra, static. Creating or linking writes supabase/.avoca/site.json in the folder (git-ignored).
Deploy
$ avoca deploy # preview: pack this folder, build on the server
$ avoca deploy --prod # production
$ avoca deploy --prod --dir dist # upload an already-built folder as is
$ avoca deploy --build --prod # npm run build here, then upload dist/ (or build/, out/)
$ avoca deploy --git --prod # build the site's git repository on the serveravoca deploy packs the folder into a tar.gz, honouring .gitignore and .avocaignore; .git, node_modules, .env.local and supabase/.avoca are never sent. It asks the API for a single-use upload ticket (valid 10 minutes), uploads the archive straight to your server (up to 200 MB) and streams the build log. Use --site <site> to deploy a site other than the linked one, and --ref <branch> with --git.
Deployments & rollback
$ avoca deployments # recent deploys, the live one marked
$ avoca rollback <deploy-id> # make an earlier deploy live againCommand reference
| Command | What it does |
|---|---|
avoca login [--token avt_…] | Verify and save an access token |
avoca logout | Forget the saved token |
avoca sites list | Sites you can access |
avoca sites create --server <id> [--name] [--repo] [--branch] [--framework] | Create a site and link this folder |
avoca sites link <site> | Link this folder to a site |
avoca deploy [--prod] [--dir] [--build] [--git] [--site] | Deploy (preview unless --prod) |
avoca deployments [--site] | Recent deploys |
avoca rollback <deploy-id> [--site] | Make an earlier ready deploy live |
The same CLI also manages Da8a backends: projects list, link --project-ref, keys, db push, db query, migration new|list, functions deploy|list|delete and secrets set|list|unset.
Global options & CI
| Option | Meaning |
|---|---|
--token <avt_…> | Access token (else AVOCA_ACCESS_TOKEN, else the saved one) |
--api-url <url> | Management API (else AVOCA_API_URL) |
--workdir <dir> | Directory containing supabase/ |
--json | Machine-readable output; errors print as {"error": "…"} |
-h, --help / -v, --version | Help and version |
Every command exits non-zero on failure.