bunny lab holds commands we are still shaping. The name is the warning: the flags and the output can change between CLI releases, so a workflow built on one should expect to be updated.
Astro is the first, and it has two commands and no more:
bunny sites deploy deploys one; this command refuses it and says which command to run.
The full Astro guide is at Deploy an Astro
site. This page is the command reference.
Deploy
1
Log in
2
Run the command in your Astro project
What it creates
Three resources, all named after your app:
The suffix is there because a storage zone name and a pull zone name are unique across all of bunny.net. The app name comes from
--name, then .bunny/astro.json, then your package.json.
The script is the pull zone’s origin, so nothing sits between a request and the code. That is the difference from bunny sites, where the script is a router in front of a storage origin.
.bunny/astro.json links this directory to those three resources, and the command adds .bunny/ to your .gitignore. It is a pointer, not a source of truth: --name finds the same resources by name, which is what a fresh clone or a CI runner does.
What one deploy does
- Finds the project. A monorepo root is not one, so it offers the projects below it.
- Checks the Astro version. The adapter needs Astro 7. An older project stops here, and the message names
npx @astrojs/upgrade. - Puts the adapter in. It installs
@bunny.net/astro-adapterand sets it in the Astro config. Another host’s adapter is replaced, and its package uninstalled. - Builds, unless
--no-build. - Reads
.bunny/build.json. It has to saykind: "ssr". - Reads the bundle. Over 10 MB the platform refuses it, so this refuses first, before any resource exists.
- Finds or creates the three resources. Each is looked up before it is made, so a half-finished create re-runs cleanly.
- Applies the pull zone settings. What the manifest asks for, and the zone’s cache override off.
- Sets the script’s variables.
- Uploads the client build, then publishes the code. In that order, always.
- Purges, waits, purges.
- Asks the site for a page, and for a path it does not hold.
- Deletes every deploy folder but this one and the one before it.
--force publishes it again.
Undeploy
Unattended runs
--yes is what lets the command install the adapter and edit the Astro config without asking. Without it, an unattended run prints the two changes and stops: a deploy command that silently rewrites your source in CI is worse than one that refuses.
--output json carries the deploy’s ID, its URL, its sizes, whether the site is serving, and every variable the CLI could not set.
Every command
What is not here yet
- Rollback. One Edge Script publishes one version at a time. Deploy the commit you want instead.
- A preview URL per branch. Every deploy publishes to production. Deploy a second app for staging:
--name my-app-staging. - A custom domain from the command line. Add it to the app’s pull zone in the dashboard, under CDN > your pull zone > Hostnames.
- Any framework but Astro. SvelteKit and Next.js are planned.