Ecopages0.2.0-rc.1

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):

npx ecopages --help

Or install it in a project:

npm install ecopages

Initialize Projects

Init Command

Use the init command with a target directory, then optionally select a template:

npx ecopages init my-app

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.

npx ecopages init ecopages-app && cd ecopages-app && npm install && npm run dev

Radiant UI template - Creates an Ecopages JSX app using Radiant UI components and the docs theme preference control. radiant.

npx ecopages init radiant-app --template radiant && cd radiant-app && npm install && npm run dev

Blog with Ecopages JSX - Creates a content-focused blog using the blog-jsx template. blog-jsx.

npx ecopages init blog-jsx --template blog-jsx && cd blog-jsx && npm install && npm run dev

Blog with React - Creates a React-powered blog with routing preconfigured. blog-react.

npx ecopages init blog-react --template blog-react && cd blog-react && npm install && npm run dev

React app with Better Auth + Drizzle - Creates a full app template with auth and database workflow included. react-better-auth.

npx ecopages init react-better-auth --template react-better-auth && cd react-better-auth && npm install && npm run db:generate && npm run db:migrate && npm run dev

Step-by-Step (Individual)

1) Basic starter

npx ecopages init ecopages-app cd ecopages-app npm install npm run dev

2) Blog with KitaJS

npx ecopages init blog-jsx --template blog-jsx cd blog-jsx npm install npm run dev

3) Blog with React

npx ecopages init blog-react --template blog-react cd blog-react npm install npm run dev

4) React app with Better Auth + Drizzle

npx ecopages init react-better-auth --template react-better-auth cd react-better-auth npm install npm run db:generate npm run db:migrate npm run dev

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 ecopages CLI 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.