Rocket ships a small CLI for local development and production builds. Use the project-local binary
through npm scripts or npx.
rocket init#Creates a compact Atlas docs starter in the current npm project:
npx rocket init
The initializer creates these files when they do not already exist:
rocket-config.jsdocs/pages/sharedData.jspublic/rocket-theme.cssdocs/pages/index.rocket.mddocs/pages/docs.rocket.mddocs/pages/javascript-demo.rocket.mddocs/pages/request-demo.rocket.mddocs/pages/site-status.rocket.js.agents/skills/rocket/SKILL.mdThe starter uses Atlas layouts, exports the matching Atlas component maps, includes navigation
icons through menu.iconName, wires a central project theme stylesheet, and includes both
JavaScript Demo and Request Demo examples.
It also updates package.json when possible:
"type": "module" when type is missingstart and build scripts when those names are availablerocket:start and rocket:build when existing project scripts already use start or
buildrocket init does not overwrite existing files, install dependencies, add @rocket/js to
package.json, or run a build. Existing CommonJS projects are rejected before any files are
written.
If package.json explicitly contains "type": "commonjs", either change it to
"type": "module" before running init, or let Rocket apply that package change:
npx rocket init --yes
Without --yes, Rocket prints the exact package patch and stops before writing starter files.
rocket start#Starts the development server:
npx rocket start
The dev server opens the browser, listens on port 8888 by default, and can be restarted with
Ctrl+R in the terminal.
Useful flags:
npx rocket start --port 3000
npx rocket start --no-open
npx rocket start --no-watch
npx rocket start --no-watch --no-open
--no-open keeps the browser closed. --no-watch disables Rocket's automatic file watching and
reloads while keeping manual Ctrl+R restarts available. Use --no-watch --no-open in constrained
environments where file watching fails with EMFILE.
rocket build#Runs a production build:
npx rocket build
Static Pages are rendered into dist/. If an adapter is configured, Rocket also gives the adapter
the discovered static and server-rendered Pages so it can write deployment-specific output.
-c, --config-file <path>#Load a config file other than rocket-config.js:
npx rocket -c ./config/rocket-config.js start
npx rocket -c ./config/rocket-config.js build
build -o, --output-dir <path>#Write static build output to a directory other than dist/:
npx rocket build --output-dir ./site-dist
Do not use public/ as the build output directory. Rocket reserves project-root public/ for
Public Assets.
For repeatable project commands, add scripts:
{
"scripts": {
"start": "rocket start",
"build": "rocket build"
}
}
Then run:
npm start
npm run build
See Configuration for the rocket-config.js file these commands load.
rocket init adds these scripts automatically when the names are not already used.
Rocket requires Node.js 22 or newer.
For the current command list, run:
npx rocket --help