@primitiv/cli
v0.23.0
Published
CLI tool for scaffolding Primitiv game projects
Downloads
158
Readme
@primitiv/cli
Status: Prototype - API is unstable and may change between minor versions.
CLI tool for scaffolding Primitiv game projects.
Installation
# Run directly (no install) — always fetches the latest version
npx @primitiv/cli@latest create my-game
# Or install globally
npm i -g @primitiv/cli@latestUsage
primitiv create [project-name]You will be prompted to choose a template:
| Template | Description | |---|---| | standalone | Everything in the browser, single player | | fullstack | Client + Server in the same project | | client | Connected client to a remote server | | server | Headless server only |
For non-standalone templates, you will also choose a transport:
| Transport | Description | |---|---| | uws | WebSocket via uWebSockets.js (simplest) | | webrtc-direct | WebRTC with direct signaling | | webrtc-relay | WebRTC with relay signaling | | webrtc-lite | WebRTC ICE-lite (single UDP port) |
Example
npx @primitiv/cli@latest create my-game
# → Select: standalone
# → Project created!
# For nightly version
npx @primitiv/cli@nightly create my-game
cd my-game
pnpm install
pnpm devFor documentation, examples, and guides, visit primitivengine.com.
📄 License
Apache-2.0 - See LICENSE.txt.
