CLI
Scaffold a Celestia web monorepo or native desktop (GPUI) app with npx @celestia-project/create
The @celestia-project/create CLI scaffolds a new project from the template.
Pick the web monorepo (Next.js + Hono) or a desktop GPUI app built on
celestia-ui.
Quick start
npx @celestia-project/create my-appThe installer asks which template you want (web or desktop). You can also
pass it up front:
npx @celestia-project/create my-app --template webnpx @celestia-project/create my-desktop --template desktopWeb template
- Ask which features you want (
auth,dashboard,blog) — required features are resolved automatically - Clone the template and run
pnpm install - Add/remove features through the feature manager (
features.jsonstays in sync) - Write
apps/api/.envandapps/web/.env, including a generatedBETTER_AUTH_SECRET - Optionally push the database schema (
db:push) and initialize git
Desktop template
- Clone the template and extract
packages/desktop - Keep
celestia-ui+ the starter app (drops the component gallery) - Rename the app crate to your project name and write a root
README.md - Optionally run
cargo checkand initialize git
Then:
cd my-desktopcargo run -p my-desktopSee Desktop (GPUI) for the component library and bootstrap notes, and Desktop Components for Toggle / Item / Menubar and the app composites.
Non-interactive usage
npx @celestia-project/create my-app --template web --features auth,dashboardnpx @celestia-project/create my-desktop --template desktop| Flag | Description |
|---|---|
-t, --template <name> | web or desktop. Default: prompt; web when non-interactive. |
--features <a,b> | Web only — features to install. Dependencies (requires) are added automatically. |
--repo <url|path> | Template repository to clone. Also accepts a local git path for testing. |
-h, --help | Show help. |
Requirements
- Node.js ≥ 20 and
giton your PATH - Web:
pnpm; a running PostgreSQL if you let the installer push the schema - Desktop: Rust ≥ 1.97 (
cargo) to build and run
Database migration errors
If db:push fails during scaffolding (e.g. PostgreSQL isn't running yet), the CLI will show the exact commands to recover:
# Once your database is up:cd my-apppnpm --filter @workspace/db db:push
# Or with a one-liner:DATABASE_URL="postgresql://..." pnpm --filter @workspace/db db:pushNeed a local database? Start one with Docker:
docker run -d --name celestia-db \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_DB=celestia \ -p 5432:5432 postgres:16-alpineTesting the CLI locally
# Fastest — run directly with node (from the monorepo root)node packages/cli/src/index.js my-test-app
# Simulate the installed bin via npm linkcd packages/cli && npm linkcreate-celestia my-test-app
# Most realistic — pack a real .tgz and run it via npxcd packages/cli && npm packnpx ./celestia-project-create-*.tgz my-test-appOr use the npm scripts from packages/cli:
pnpm --filter @celestia-project/create test:run # node directpnpm --filter @celestia-project/create test:pack # tarball → npxPublishing
The CLI is published to npm under the @celestia-project org using the monorepo publish script:
# Dry run — previews what will be uploadedpnpm publish:dry-run
# Publish all packages (@celestia-project/ui + @celestia-project/create)pnpm publish:packagesDEFAULT_REPO in packages/cli/src/index.js points at the public template repository — update it if you fork.
To try the CLI from this repository without publishing, run pnpm scaffold.