create-spacetime
v0.0.6
Published
## Overview
Readme
create-spacetime
Overview
This package contains the official CLI tool for creating SpacetimeDB projects. The CLI allows you to quickly scaffold new SpacetimeDB applications with a template of your choice (React frontends with Rust or C# backends).
Installation
To create a new SpacetimeDB project:
npm create spacetime@latestUsage
To create a project you can run the interactive setup or specify options directly.
npm create spacetime@latest my-spacetime-app -- -t rustSkip interactive prompts with -y (defaults server language to Rust):
npm create spacetime@latest my-spacetime-app -- -yThe -t flag selects your server language template.
Available templates:
rust- Rust server with React clientcsharp- C# server with React client
Create in your current directory using . as the project name:
npm create spacetime@latest .Use a local SpacetimeDB server instead of Maincloud:
npm create spacetime@latest my-spacetime-app -- --localWhat You Get
Creates a full-stack SpacetimeDB app with server module and React frontend, including build scripts and example chat app.
Requirements
- Node.js 18+ and npm 8+
- SpacetimeDB CLI (optional for creation, required for Maincloud deployment) - spacetimedb.com/install
Running The Project
After project creation:
cd my-spacetime-app
npm run devYour React app will be available at http://localhost:5173.
To deploy your SpacetimeDB module:
npm run local # Local deployment
npm run deploy # Deploy to Maincloud