CLI Reference
Every cloudcart nitrogen command — init, dev, build, preview, link, env, generate, deploy.
All commands run from (or accept --path to) the storefront project root.
nitrogen init
Create a new Nitrogen storefront project.
cloudcart nitrogen init my-storefront
# Non-interactive: mock store, TypeScript, npm
cloudcart nitrogen init my-storefront --defaults
# Skip dependency install / git init
cloudcart nitrogen init my-storefront --no-install --no-git| Flag | Description |
|---|---|
--defaults | Use defaults (mock store, TypeScript, npm) |
--package-manager | npm, pnpm, yarn, or bun |
--language | TypeScript or JavaScript |
--no-install | Skip dependency installation |
--no-git | Skip git initialization |
nitrogen dev
Start the local dev server.
cloudcart nitrogen dev
cloudcart nitrogen dev --port 4000nitrogen build
Production build.
cloudcart nitrogen buildnitrogen preview
Serve the production build locally — what Nova will serve, on your machine.
cloudcart nitrogen previewnitrogen link
Link the local project to a storefront created in the admin.
cloudcart nitrogen link --store mystore.cloudcart.com --storefront "My Headless Store"| Flag | Description |
|---|---|
-s, --store | Store URL |
--storefront | Storefront name to link to |
--force | Overwrite an existing link |
--path | Project root (default .) |
nitrogen env
Sync environment variables with the linked store.
cloudcart nitrogen env pull # download to .env
cloudcart nitrogen env push # upload local .env
cloudcart nitrogen env list # list environmentsnitrogen generate
Scaffold routes from templates.
cloudcart nitrogen generate route product
cloudcart nitrogen generate routes # all standard routesnitrogen deploy
Build and deploy to Nova. See Deploying for token setup and CI examples.
cloudcart nitrogen deploy
cloudcart nitrogen deploy --preview
cloudcart nitrogen deploy --token cc_nova_xxx| Flag | Description |
|---|---|
-t, --token | Nova deploy token (or CLOUDCART_NOVA_TOKEN env var) |
--preview | Deploy as preview instead of production |
--no-build | Skip the build step |
--env-file | Path to .env (default .env) |
--path | Storefront root (default .) |