Scaffold a project & drive the editor (CLI)
One public CLI creates the project and opens its editor. After creation, the
project-pinned npm run vgai -- β¦ command drives that editor (open scenes,
enter Play, select/focus entities) without relying on a global installation.
The transcript below is real captured output.
# transcript pending capture β run: node site/media/capture-cli.mjs site/media/capture-cli.mjs -
Scaffold a new project.
Terminal window npx @vgai/cli@latest create my-gameIt creates a standalone default project with Three.js and React roots, installs versioned packages, opens the editor, and prints its URL. Shipped example gameplay is available only when you explicitly pass
--example. -
See the CLI commands.
Terminal window npm run vgai -- --helpThe project-pinned CLI talks to a running editor:
scene <path>opens a scene,play/stop/pausecontrol play mode,createscaffolds,editlaunches the editor (or justvgai <folder>/vgai .as shorthand), andselect/focusdrive the viewport. (It connects over a local URL β start the editor first.)
Recap
New functionality
- Scaffolded a new game project from the template
- Learned the vgai CLI commands
New concepts & skills
- the public CLI creates and opens a standalone project
- the project-pinned VGAI CLI drives a running editor
- the CLI connects to the editor over a local URL
Next lesson β Build & publish