cargo-rustapi-0.1.335 is not a library.
cargo-rustapi
Lens: "The Architect"
Philosophy: "Scaffolding best practices from day one."
The RustAPI CLI isn't just a project generator; it's a productivity multiplier.
📦 Installation
🛠️ Commands
| Command | Description |
|---|---|
cargo rustapi new <name> |
Create a new project with the perfect directory structure |
cargo rustapi run |
Run the development server |
cargo rustapi run --reload |
Run with hot-reload (auto-rebuild on file changes) |
cargo rustapi generate resource <name> |
Scaffold a new API resource (Model + Handlers + Tests) |
cargo rustapi client --spec <path> --language <lang> |
Generate a client library (Rust, TS, Python) from OpenAPI spec |
cargo rustapi deploy <platform> |
Generate deployment configs for Docker, Fly.io, Railway, or Shuttle |
cargo rustapi migrate <action> |
Database migration commands (create, run, revert, status, reset) |
🚀 Quick Start
# Create a new project
# Run with auto-reload
📁 Templates
The templates used by the CLI are opinionated but flexible. They enforce:
- Modular folder structure
- Implementation of
Statepattern - Separation of
Errortypes
Available Templates:
minimal: Basicmain.rsandCargo.tomlapi: REST API structure with separatedhandlersandmodelsweb: Web application with HTML templates (rustapi-view)full: Complete example with Database, Auth, and Docker support