CLI
Reion command line interface: create, dev, build, start, and add.
Reion provides reion create for new projects, reion dev, reion build, and reion start to run the app, and reion add to install plugin packages and run their setup when available.
reion create
Scaffolds a new Reion app (or clones a template).
npx reion create my-project
bunx reion create my-projectOptions:
[name]— Project directory name, or.for the current directory (you will be prompted if omitted in interactive use).-t, --template <value>— Built-in template key, a Git URL, or a GitHub tree URL (github.com/owner/repo/tree/branch/path).--no-install— Skip the package-manager install step after creating files.
The default scaffold includes package.json, tsconfig.json, reion.config.ts, and a sample route under src/router/.
reion dev
Runs your app with hot reload. It watches:
- route files (
route.*orget/post/put/...*.route.*) middleware.*- event files (
*.event.*) underevents/
reion build
Compiles TypeScript sources into the build output directory (default ./dist).
reion start
Starts the built app (no hot reload).
reion add
Installs an npm package (typically a @reionjs/* plugin) with your project's package manager, then runs that package's setup script when it exports one (for example file scaffolding and edits to reion.config.ts).
reion add -p @reionjs/better-authOptions:
-p, --plugin <name>(required): package name to install, e.g.@reionjs/better-auth,@reionjs/cron.--skip-install: do not runnpm install/bun add/ etc. for the plugin; setup still runs. Use this when you manage dependencies yourself. Note that setup steps that install extra packages (such as database drivers) only run automatically when installs are not skipped and the CLI provides an installer hook.
Common options
These apply to dev and start (not add, where -p is --plugin).
-p, --port <number>: server port (default from config or3000)-H, --host <string>: server host (default127.0.0.1)--appDir <path>: app directory root (overridesreion.config.ts)--build-path <path>: output dir forbuild/start(default./dist)
Plugin command hooks
If you configure plugins in reion.config.ts, plugins can also react to CLI lifecycle via hooks like:
onDevStart,onDevFileChange,onDevRestart,onDevStoponBuildStart,onBuildComplete,onBuildErroronStartStart,onStartListening,onStartStop,onStartError