ecopages CLI
The ecopages npm package is the official and preferred command-line tool for scaffolding and running Ecopages projects.
It is best when you want:
- Fast project creation from templates
- Consistent app lifecycle commands (
dev,build,preview,start) - A single entrypoint for common local workflows
Install
You can run the CLI directly with bunx (no global install required):
Or install it in a project:
Initialize Projects
Init Command
Use the init command with a target directory, then optionally select a template:
One-Shot Commands (Complete)
Use these when you want a full bootstrap in one command chain.
JSX template - Creates a minimal Ecopages app with default setup. jsx.
Radiant UI template - Creates an Ecopages JSX app using Radiant UI components and the docs theme preference control. radiant.
Blog with Ecopages JSX - Creates a content-focused blog using the blog-jsx template. blog-jsx.
Blog with React - Creates a React-powered blog with routing preconfigured. blog-react.
React app with Better Auth + Drizzle - Creates a full app template with auth and database workflow included. react-better-auth.
Step-by-Step (Individual)
1) Basic starter
2) Blog with KitaJS
3) Blog with React
4) React app with Better Auth + Drizzle
Runtime Notes
The CLI auto-detects Bun when launched from Bun tooling and otherwise defaults to the Node thin-host path. You can override that explicitly with --runtime bun, --runtime node, or --runtime node-experimental on the lifecycle commands.
Command Details
This page focuses on setup and project bootstrapping.
For the complete command, flag, and environment variable reference, see CLI Reference.
When To Use ecopages vs @ecopages/* Packages
- Use
ecopagesCLI for scaffolding and local app lifecycle commands. - Use
@ecopages/*packages from npm for framework APIs in app code.
For the complete package map, see Ecosystem Packages.