chopin-cli 0.3.5

CLI scaffolding tool for the Chopin web framework
chopin-cli-0.3.5 is not a library.

๐ŸŽน Chopin CLI

Build status Crates.io Downloads License Rust GitHub stars

Scaffolding and code generation tool for the Chopin web framework.

Generate ChopinModules following MVSR pattern (Model-View-Service-Router), manage migrations, and bootstrap new projects with sensible defaults.

Installation

cargo install chopin-cli

Quick Start

Create a new Chopin project with modular architecture:

chopin new my-app
cd my-app
cargo run

Commands

new โ€” Create a new project

chopin new my-project [--template basic|api]

Creates a new Chopin project with:

  • Modular architecture using ChopinModule trait
  • MVSR pattern (Model-View-Service-Router)
  • Configured Cargo.toml with dependencies
  • Example auth module (signup, login)
  • Development SQLite database
  • OpenAPI documentation setup

Templates:

  • basic โ€” Minimal setup (default)
  • api โ€” Full CRUD API with posts module

generate module โ€” Scaffold a new module

chopin generate module blog

Generates MVSR structure:

src/modules/blog/
โ”œโ”€โ”€ mod.rs           # ChopinModule implementation
โ”œโ”€โ”€ services.rs      # Business logic (unit-testable)
โ”œโ”€โ”€ handlers.rs      # HTTP handlers
โ”œโ”€โ”€ models.rs        # SeaORM entities
โ””โ”€โ”€ migrations.rs    # Database migrations

generate โ€” Generate specific components

chopin generate service posts      # Service layer
chopin generate handler posts      # HTTP handler
chopin generate model post         # SeaORM entity
chopin generate migration create_posts_table

db โ€” Database management

chopin db migrate
chopin db reset

Features

  • โšก Zero-configuration project setup with MVSR pattern
  • ๐Ÿ“ฆ ChopinModule scaffolding
  • ๐Ÿ” Built-in authentication scaffolding
  • ๐Ÿ—„๏ธ Database migration helpers
  • ๐Ÿ“š OpenAPI documentation
  • ๐Ÿงช Testing utilities included

Documentation

For more information, see the main repository:

License

WTFPL (Do What The Fuck You Want To Public License)