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 denoValid 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.0juice 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 buildjuice preview
Run the production build locally using Vite preview. Useful for verifying the build before deploying.
juice previewjuice routes
List all discovered routes in the project. Shows the URL pattern, file path, layouts, middleware, and HTTP methods for each route.
juice routesjuice 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/usersjuice --version
Print the installed Juice version.
juice --version
juice -vDev 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