CLI Reference
The CLI is a single binary (oxide) installed once globally. It knows
how to scaffold projects, generate migrations, publish framework
stubs, and forward app-level commands to your project binary.
Install
cargo install oxide-cli --registry com7-innovationSee Internal Registry for one-time kellnr setup.
Local commands
These run locally against the current directory / workspace.
oxide new <name>
Scaffold a new project.
oxide new billing-apiThe scaffolded Cargo.toml pins oxide to the same version as the
CLI that generated it, against the com7-innovation registry. Bump
or change the pin by editing Cargo.toml after scaffolding.
oxide make:migration <snake_name>
Scaffold a timestamped migration file under
src/database/migrations/ and register it in the migrator.
oxide make:migration create_posts_tableoxide vendor:publish <tag>
Copy framework-shipped stubs (migrations + configs) into your project.
oxide vendor:publish sanctum # auth tokens — from oxide-authoxide vendor:publish cors # cors config — from oxideThe CLI uses cargo metadata to find every resolved dependency’s
source, scans database/migrations/<tag>/*.rs and config/<tag>.toml
in each, and copies them in. Works equally for git deps and crates.io
deps.
App-forwarded commands
These forward to your project binary via cargo run --quiet --. They
assume you’re inside a scaffolded project.
oxide serve
Start the HTTP server. Honors APP_LISTEN (default 127.0.0.1:8000).
oxide migrate
Apply every pending migration.
oxide migrate:rollback [N]
Undo the last N migrations (default 1).
oxide migrate:fresh
Drop every table and re-run all migrations. Never run in production.
oxide migrate:status
Print a table of applied + pending migrations.
Flags
| Flag | Commands | Purpose |
|---|---|---|
--version, -V | (global) | print the CLI version |
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | user-visible failure (missing arg, target dir exists, etc.) |
| 2 | unknown command or subcommand |