Bootstrap a Rust template generator for building modular architectures (monorepo)
cargo install bootsDownload pre-built binaries for your platform from Releases:
# Linux x64
curl -LO https://github.com/1eedaegon/boots/releases/latest/download/boots-linux-x64.tar.gz
tar xzf boots-linux-x64.tar.gz
sudo mv boots cargo-boots /usr/local/bin/
# macOS ARM64 (Apple Silicon)
curl -LO https://github.com/1eedaegon/boots/releases/latest/download/boots-darwin-arm64.tar.gz
tar xzf boots-darwin-arm64.tar.gz
sudo mv boots cargo-boots /usr/local/bin/Invoke-WebRequest -Uri "https://github.com/1eedaegon/boots/releases/latest/download/boots-windows-x64.zip" -OutFile "boots.zip"
Expand-Archive -Path boots.zip -DestinationPath .
Move-Item boots.exe,cargo-boots.exe "$env:USERPROFILE\.cargo\bin\"Create a service with API, runtime server, CLI, and core modules:
# Basic service
boots service my-api
# With PostgreSQL support
boots service my-api --options postgres
# With PostgreSQL and gRPC
boots service my-api --options postgres,grpc
# With all options
boots service my-api --options postgres,grpc,http
# Using cargo subcommand
cargo boots service my-api --options postgresCreate a CLI application with core and optional modules:
# Basic CLI
boots cli my-tool
# With HTTP client
boots cli my-tool --options client
# With client and persistence
boots cli my-tool --options client,persistenceCreate a minimal library with examples:
boots lib my-cratemy-api/
├── crates/
│ ├── api/ # HTTP/gRPC handlers and routes
│ ├── cli/ # Command-line interface
│ ├── core/ # Business logic and domain types
│ └── runtime/ # Server startup and configuration
├── .github/
│ └── workflows/ # CI/CD (build, test, release)
├── Cargo.toml # Workspace configuration
├── Dockerfile
├── Makefile
└── README.md
Runtime Features:
- Health endpoint:
GET /healthreturns{"healthy": true} - Metrics endpoint:
GET /metricsreturns Prometheus format
my-tool/
├── crates/
│ ├── cli/ # Command-line interface
│ ├── client/ # HTTP client (with --options client)
│ └── core/ # Business logic
├── Cargo.toml
├── Dockerfile
├── Makefile
└── README.md
my-crate/
├── crates/
│ └── core/
│ ├── src/
│ └── examples/ # Example usage
├── Cargo.toml
├── Dockerfile
├── Makefile
└── README.md
| Option | Description |
|---|---|
postgres |
Add PostgreSQL support with sqlx and migrations |
sqlite |
Add SQLite support |
grpc |
Add gRPC support with tonic and proto directory |
http |
HTTP API (enabled by default) |
| Option | Description |
|---|---|
client |
Add HTTP client module with reqwest |
persistence |
Add local file-based persistence |
boots service my-api --options postgres,grpc
cd my-api
cargo build --all
cargo run -p my-api-cli -- --port 8080Test the endpoints:
curl http://localhost:8080/health
# {"healthy":true}
curl http://localhost:8080/metrics
# # HELP up Server is up
# up 1boots cli my-tool --options client
cd my-tool
cargo run -p my-tool-cli -- --helpboots lib my-crate
cd my-crate
cargo build
cargo run --example basic# Build
cargo build --all
# Test
cargo test --all
# Lint
cargo clippy --all -- -D warnings
# Format
cargo fmt --allContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License