Deploy with the CLI
kotao storefront publish packages your committed source and hands it to the platform,
which installs the @kotao/* packages from npm, builds the theme server-side, and activates
it on your storefront site. You never ship a prebuilt bundle.
Prerequisites
Section titled “Prerequisites”- Your theme is a git repository with everything committed — publish uploads committed
files only, and the build needs
bun.lockandkotao.theme.jsonin the commit. bun installhas run in the project (thekotaoCLI is a local dev dependency).
Publish
Section titled “Publish”bun x kotao auth login --devicebun x kotao workspace selectbun x kotao storefront selectbun run publishauth login --device opens a browser approval at accounts.kotao.com. Approve within
about ten minutes; the CLI keeps polling until you do. The session is stored globally
(~/.config/kotao/cli-session.json), so you log in once per machine.
workspace select and storefront select pick the workspace and the storefront site
the publish targets. Both remember your choice — reselect any time to switch targets.
bun run publish uploads, builds, and activates. The CLI streams the build status and
exits when the deployment is live.
Troubleshooting
Section titled “Troubleshooting”- “needs a git repository” — run
git init && git add -A && git commitfirst; publish reads the committed tree. - The
kotaocommand behaves oddly outside the project — runbun installfirst and invoke it asbun x kotaoinside the project, so it resolves your local@kotao/clidev dependency. - Device login timed out — run
bun x kotao auth login --deviceagain and approve the browser prompt within the ten-minute window.