# Swordmaster CLI
**Scaffold production-ready Rust backend projects in seconds.**
Part of [Swordmaster](https://github.com/king-swordmaster/Swordmaster) — an ecosystem of libraries and tools designed to bring both **performance** and **productivity** to backend development, AI systems, data engineering, and distributed systems in Rust.
This CLI generates opinionated, well-structured projects with sensible defaults so you can focus on what matters: your business logic.
## Installation
### Download the binary
Download the latest release for your platform from [GitHub Releases](https://github.com/king-swordmaster/Swordmaster/releases).
```bash
# Linux/macOS - move to PATH
chmod +x swordmaster
sudo mv swordmaster /usr/local/bin/
# Or add to your local bin
mv swordmaster ~/.local/bin/
```
### Build from source
```bash
git clone https://github.com/king-swordmaster/Swordmaster.git
cd Swordmaster
cargo build --release
```
The binary will be available at `target/release/swordmaster`.
## Usage
### Creating a new project
```bash
# Interactive mode (will prompt for project name)
swordmaster new
# With project name
swordmaster new my-api
# Specify output directory (defaults to parent directory)
swordmaster new my-api --out-dir /path/to/projects
# Non-interactive mode
swordmaster new my-api --no-interactive
# Initialize in current directory
swordmaster new --init
```
### Command Options
| `--out-dir`, `-o` | Output directory (default: `..`) |
| `--init` | Initialize in specified directory instead of creating subdirectory |
| `--no-interactive` | Disable interactive prompts |
| `--port`, `-p` | Application port (default: `3000`) |
## Generated Project
The CLI generates a complete backend project with:
- **Axum** web server
- **SeaORM** database integration with PostgreSQL
- **Clean architecture** (app/domain/infrastructure layers)
- **Docker Compose** setup for PostgreSQL
- **Dockerfile** for production deployment
- **Automatic migrations** on startup
See the main [repository](https://github.com/king-swordmaster/Swordmaster) for more details.
## License
MIT