cargo-rustapi

Crates.iocargo-rustapi
lib.rscargo-rustapi
version0.1.207
created_at2026-01-05 20:45:24.03167+00
updated_at2026-01-26 00:04:35.639694+00
descriptionThe official CLI tool for the RustAPI framework. Scaffold new projects, run development servers, and manage database migrations.
homepage
repositoryhttps://github.com/Tuntii/RustAPI
max_upload_size
id2024552
size125,049
Tunay (Tuntii)

documentation

https://docs.rs/cargo-rustapi

README

cargo-rustapi

The official CLI tool for the RustAPI framework.

Use this tool to scaffold new projects, generate code, and fast-track your development workflow.

📦 Installation

cargo install cargo-rustapi

🛠️ Usage

Creating a New Project

Use the new command to generate a project structure.

# Interactive mode (Recommended)
cargo rustapi new my-app

# Quick start with specific template
cargo rustapi new my-app --template api

Available Templates:

  • minimal: Basic main.rs and Cargo.toml.
  • api: REST API structure with separated handlers and models.
  • web: Web application with HTML templates (rustapi-view).
  • full: Complete example with Database, Auth, and Docker support.

Running Development Server

Run your application with hot-reloading (requires cargo-watch).

cargo rustapi run

Code Generation

Save time by generating boilerplate.

# Generate a handler function and register it
cargo rustapi generate handler users

# Generate a database model
cargo rustapi generate model User

# Generate a full CRUD resource (Model + Handlers + Tests)
cargo rustapi generate crud product

Managing Migrations (Planned)

cargo rustapi migrate run
cargo rustapi migrate revert
Commit count: 208

cargo fmt