GitHubnpm

CLI

The juice CLI provides commands for creating, developing, building, and inspecting Juice apps.

Commands

juice create <name>

Scaffold a new Juice app. Prompts for a deployment target or accepts --target.

juice create my-app
juice create my-app --target bun
juice create my-app --target node
juice create my-app --target cloudflare
juice create my-app --target deno

Valid targets: bun, node, cloudflare, deno. Default is bun.

juice dev

Start the Vite dev server with the Juice plugin. Supports all Vite dev flags.

juice dev
juice dev --port 4000
juice dev --host 0.0.0.0

juice build

Run the dual Vite build: client build first (produces client chunks and the flight manifest), then SSR build (produces the server bundle). Supports all Vite build flags.

juice build

juice preview

Run the production build locally using Vite preview. Useful for verifying the build before deploying.

juice preview

juice routes

List all discovered routes in the project. Shows the URL pattern, file path, layouts, middleware, and HTTP methods for each route.

juice routes

juice add route <name>

Add a new route file to the project. Creates the file with a default export and response.

juice add route about
juice add route blog/[slug]
juice add route api/users

juice --version

Print the installed Juice version.

juice --version
juice -v

Dev Server Output

The dev server logs each request with method, path, status, and response time. Server components that throw a Response (redirects, 404s) are logged with the thrown status code.

🧃 Starting dev server...

  VITE v6.x.x  ready in 150 ms

  ➜  Local:   http://localhost:5173/

GET  /              200  12.3ms
GET  /product/42    200  8.1ms
POST /api/contact   303  45.2ms
GET  /not-found     404  2.1ms