A command-line interface (CLI) for developing, building, and running Rocket web applications in Rust.
Scaffold production-ready APIs in seconds with idiomatic folder structure and database-ready templates.
- 🔧
rocket new
to scaffold new Rocket projects - 📦 Multiple templates:
minimal
(default),mongodb
,postgres
,mysql
,mssql
,sqlite
, and more viarbatis
- 📂 Standard project layout (routes, db, middleware, etc.)
- 💡 Intuitive command design inspired by the
dotnet
CLI - 🛠️ Git integration (
--git
) - ✅ Cross-platform and built in pure Rust
cargo install --path .
git clone https://github.com/irfanghat/rocket-cli
cd rocket-cli
cargo build --release
Download the latest binary from GitHub Releases:
-
Go to the Releases page
-
Download the binary for your platform:
rocket-cli-x86_64-unknown-linux-gnu
rocket-cli-x86_64-pc-windows-msvc.exe
(Coming soon/Available via WSL)rocket-cli-aarch64-apple-darwin
(macOS ARM - Coming soon)
-
Make it executable (Linux/macOS):
chmod +x rocket-cli-*
mv rocket-cli-* /usr/local/bin/rocket-cli
- Verify installation:
rocket-cli --version
rocket-cli <command> [options]
rocket-cli new my-api
Options:
--template <name> Choose a template: minimal, mongodb, postgres, mysql, mssql, rbatis
--git Initialize a Git repository
Example:
rocket-cli new my-api --template postgres --git
rocket-cli run
Every template follows a production-grade folder structure:
my-api/
├── Cargo.toml
├── src/
│ ├── main.rs # App entrypoint
│ ├── routes/ # Route handlers
│ ├── db/ # DB config & connections
│ ├── repositories/ # Data access layer
│ ├── middleware/ # Middleware & guards
│ └── fairings/ # Fairings & launch hooks
Supported templates:
minimal
— Basic Rocket app (default)mongodb
— Rocket withmongodb
postgres
— Rocket withPostgreSQL
(WIP)mysql
— Rocket withMySQL
(WIP)mssql
— Rocket withSQL Server
(WIP)sqlite
— Rocket withSQLite
(WIP)
Contributions, templates, and suggestions are welcome!
git clone https://github.com/irfanghat/rocket-cli
cd rocket-cli
cargo run -- --help
This project is licensed under the MIT License.
Built with ❤️ and Rust — from the community, for the community.