Universal Project Scaffolding Tool
Bootstrap projects from battle-tested architecture templates in seconds.
Quick Start β’ Installation β’ Usage β’ Templates β’ Custom Templates β’ Contributing
ForgeArch (CLI: forge) is a fast, zero-dependency project scaffolding tool that generates production-ready project structures from embedded templates. Perfect for backend APIs, React frontends, monorepos, CLI tools, microservices, and infrastructure setups.
- π Fast & Lightweight β Single binary, no runtime dependencies
- π¦ 34+ Built-in Templates β Modern architectures ready to use
- π― Interactive & Scriptable β Perfect for both manual use and CI/CD
- π Safe Operations β Prevents accidental overwrites unless forced
- π¨ Custom Templates β Create and manage your own private templates
- π§ Git Integration β Optional repository initialization
- π WSL Support β Seamless integration with Windows Subsystem for Linux
# Install (Linux/macOS/WSL)
curl -fsSL https://raw.githubusercontent.com/iamjuaness/ForgeArch/master/install.sh | sh
# Activate in current session
source ~/.bashrc # or ~/.zshrc for zsh
# Create your first project
forge new my-api --arch backend-api --git-init
# List all available templates
forge listLinux / macOS / WSL
curl -fsSL https://raw.githubusercontent.com/iamjuaness/ForgeArch/master/install.sh | sh
# Activate forge in your current terminal
source ~/.bashrc # For bash
source ~/.zshrc # For zshWindows (PowerShell)
iwr https://raw.githubusercontent.com/iamjuaness/ForgeArch/master/install.ps1 | iex
# Activate forge in your current terminal
$env:Path = "$env:Path;$env:USERPROFILE\.local\bin"The installer will:
- β Detect your platform automatically
- β Download the correct binary
- β
Install to
~/.local/bin/forge - β Configure your PATH automatically
- β Verify the installation
-
Download the latest release for your platform:
-
Extract the archive
-
Move the binary to a directory in your PATH:
# Linux/macOS/WSL mkdir -p ~/.local/bin mv forge ~/.local/bin/ export PATH="$HOME/.local/bin:$PATH" # Windows (as Administrator) move forge.exe "C:\Program Files\ForgeArch\"
-
Verify installation:
forge --version # or forge -v
Requires Rust 1.70+
git clone https://github.com/iamjuaness/ForgeArch.git
cd ForgeArch
cargo build --release
# Binary at target/release/forge_arch
cp target/release/forge_arch ~/.local/bin/forgeforge new <project-name> # Interactive mode
forge new <name> --arch <template> # Non-interactive
forge list # Show available templates
forge add-template <key> # Create custom template
forge remove-template <key> # Remove custom template
forge --help # Show all options
forge --version | forge -v # Show version| Command | Description |
|---|---|
forge new <name> |
Create a new project (interactive if no --arch) |
forge list |
List all available architecture templates |
forge add-template <key> |
Create a new custom local template |
forge remove-template <key> |
Remove a custom local template |
forge --version or -v |
Display version information |
forge --help |
Show help information |
| Option | Description |
|---|---|
--arch <template> |
Choose architecture template |
--git-init |
Initialize git repository after creation |
--no-readme |
Skip README.md generation |
--force |
Overwrite existing directory |
Interactive project creation:
forge new my-project
# Prompts you to select a template from the listBackend API with Git initialization:
forge new my-api --arch backend-api --git-initMicroservices architecture:
forge new my-services --arch microservices --git-initNext.js frontend:
forge new my-app --arch nextjs-appKubernetes application:
forge new k8s-app --arch kubernetes-app --git-initForce overwrite existing project:
forge new existing-project --arch monorepo --forceMachine Learning project:
forge new ml-project --arch machine-learningList all available templates:
forge listForgeArch includes 34 production-ready templates:
| Template | Description |
|---|---|
backend-api |
RESTful API with layered architecture |
backend-graphql |
GraphQL API with schema-first approach |
fastapi-backend |
Modern Python API with FastAPI |
django-backend |
Full-featured Django web application |
nestjs-backend |
Enterprise Node.js framework with TypeScript |
go-microservice |
Go microservice with clean architecture |
spring-boot |
Java Spring Boot REST API |
| Template | Description |
|---|---|
frontend-react |
React app with modern tooling |
nextjs-app |
Next.js 14+ with App Router |
vue-frontend |
Vue 3 with Composition API |
angular-frontend |
Enterprise Angular application |
svelte-frontend |
SvelteKit modern framework |
| Template | Description |
|---|---|
fullstack-mern |
MongoDB / Express / React / Node |
monorepo |
Multi-package workspace structure |
nx-monorepo |
Nx workspace with apps and libraries |
turborepo |
High-performance monorepo with Turborepo |
| Template | Description |
|---|---|
mobile-react-native |
Cross-platform React Native app |
flutter-app |
Flutter mobile application |
| Template | Description |
|---|---|
serverless |
AWS Lambda / Serverless Framework |
microservices |
Microservices repository scaffold |
kubernetes-app |
Containerized app with K8s manifests |
infrastructure-terraform |
Terraform IaC with modules |
api-gateway |
API gateway with rate limiting |
| Template | Description |
|---|---|
clean-architecture |
Hexagonal/Clean architecture with DDD |
event-driven |
Event-driven with message brokers |
ddd-bounded-contexts |
Domain-Driven Design structure |
cqrs-event-sourcing |
CQRS + Event Sourcing pattern |
graphql-federation |
Federated GraphQL with subgraphs |
| Template | Description |
|---|---|
machine-learning |
ML/AI project with MLOps structure |
python-data-science |
Data science project (notebooks, data, src) |
cli-rust |
Rust command-line application |
electron-desktop |
Cross-platform desktop app with Electron |
chrome-extension |
Browser extension with manifest V3 |
blockchain-dapp |
Decentralized app with smart contracts |
Create and manage your own private templates stored locally on your machine.
# Create a new template skeleton
forge add-template my-backend
# This opens an editor with a template skeleton to customizeTemplates are stored at:
- Linux/macOS/WSL:
~/.config/forge/templates/local_templates.json - Windows:
%APPDATA%\forge\templates\local_templates.json
{
"my-backend": {
"name": "My Custom Backend",
"description": "Custom API with my preferred structure",
"structure": [
"src/controllers",
"src/services",
"src/models",
"src/middleware",
"tests/unit",
"tests/integration",
"docs"
],
"files": {
".gitignore": "backend",
".env.example": "backend",
"Dockerfile": "backend"
}
}
}| Field | Type | Description |
|---|---|---|
name |
string | Human-friendly template name |
description |
string | Short description of the template |
structure |
array | List of folders to create (supports nested paths) |
files |
object | Mapping of filename β template kind |
Available file template kinds:
backendβ Backend-specific files (.gitignore, .env.example, Dockerfile)frontendβ Frontend-specific files (.gitignore, .env.example)monorepoβ Monorepo files (package.json, .gitignore)
# Manually edit with your preferred editor
nano ~/.config/forge/templates/local_templates.json
vim ~/.config/forge/templates/local_templates.json
code ~/.config/forge/templates/local_templates.jsonforge new my-project --arch my-backendforge remove-template my-backendForgeArch respects your editor preferences:
# Set preferred editor (priority order)
export FORGE_EDITOR="nano" # Highest priority
export VISUAL="vim" # Second priority
export EDITOR="code --wait" # Third priority
# Add to your shell config
echo 'export FORGE_EDITOR="nano"' >> ~/.bashrcDefault editor priority:
$FORGE_EDITOR$VISUAL$EDITORnano(WSL/Linux)vimcode --wait(VS Code)notepad.exe(Windows)
If using VS Code in WSL, ForgeArch automatically converts paths:
# VS Code opens the correct WSL file
forge add-template my-templateFor terminal editors in WSL:
export FORGE_EDITOR="nano" # Recommended for WSL- Rust 1.70+
- Cargo
git clone https://github.com/iamjuaness/ForgeArch.git
cd ForgeArch
cargo buildcargo test # Run all tests
cargo test --verbose # Verbose output
cargo clippy # Lint code
cargo fmt # Format codecargo run -- new test-project --arch backend-api
cargo run -- list
cargo run -- add-template customForgeArch/
βββ src/
β βββ main.rs # CLI entry point
β βββ generator.rs # Project generation logic
β βββ templates.rs # Template loading and management
βββ templates/
β βββ architectures.json # Built-in templates (34+)
β βββ file_templates/
β βββ backend/
β βββ frontend/
β βββ monorepo/
βββ Cargo.toml
βββ README.md
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
To add a new built-in template:
- Edit
templates/architectures.json - Add your template structure:
{ "your-template": { "name": "Your Template Name", "description": "Template description", "structure": ["src", "tests"], "files": {".gitignore": "backend"} } } - Test:
cargo run -- new test --arch your-template - Submit a PR
- Follow Rust conventions
- Run
cargo fmtbefore committing - Run
cargo clippyand fix warnings - Add tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by
create-react-app,cargo-generate, andyeoman - Built with Rust for performance and safety
- Uses Tera for templating
- Uses Clap for CLI parsing
- π Report Bugs: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: juane.cardonav@gmail.com
- π Star this repo if you find it useful!