threejs-cli
is a command-line tool designed to help developers quickly scaffold Three.js projects with support for multiple frameworks, including Vanilla Three.js, TresJS (Vue + Three.js), and React Three Fiber (React + Three.js). Whether you're a beginner or an experienced developer, this tool allows you to focus on creativity and development without spending time on tedious project setup.
- Supports multiple frameworks:
- Vanilla Three.js
- TresJS (Vue + Three.js)
- React Three Fiber (React + Three.js)
- One-command project generation.
- Automatically installs dependencies.
- Modern development experience based on Vite.
- Cross-platform support (Windows, macOS, Linux).
Install threejs-cli
globally:
npm install -g threejs-cli
Run the CLI tool:
create-threejs
Select a project name:
Select a project name: my-project
Select a framework:
? Select a framework: (Use arrow keys)
❯ Vanilla (原生 Three.js)
TresJS (Vue + Three.js)
React Three Fiber (React + Three.js)
Navigate to the project directory and start the development server:
cd my-project
npm install
npm run dev
create-threejs
Select a project name: my-tresjs-project
? Select a framework: (Use arrow keys)
❯ TresJS (Vue + Three.js)
Vanilla (原生 Three.js)
React Three Fiber (React + Three.js)
cd my-tresjs-project
npm install
npm run dev
We welcome contributions! Please submit issues or pull requests to improve threejs-cli.
threejs-cli is open-source under the MIT License.