Skip to content

aglili/forge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forge

A Bubble Tea-powered interactive CLI that scaffolds production-ready backend projects across Go, Python, and Node.js — with Docker, CI/CD, auth, and more baked in.

Install

go install github.com/aglili/forge@latest

Usage

# Interactive wizard
forge new

# Non-interactive (CI/scripted)
forge new --from config.json

# Show supported options
forge list-templates

# Help
forge help

What it generates

Run forge new and walk through the wizard. In under a minute you get a fully-structured backend project with:

  • Domain-driven folder layout (handler → service → repository → model)
  • Database connection (PostgreSQL, MySQL, MongoDB, SQLite)
  • Cache setup (Redis, Memcached)
  • Auth middleware (JWT, session-based, or both)
  • Docker + docker-compose with all selected services
  • CI pipeline (GitHub Actions)
  • Makefile with all common targets
  • README with setup instructions
  • .env files per environment (local, staging, production)
  • .gitignore and initialized git repo

Supported stacks

Languages & Frameworks

Language Frameworks
Go Chi, Fiber, Echo, net/http (stdlib)
Python FastAPI, Django
Node.js Express, Fastify

Python extras

  • Package manager: pip, uv, or poetry
  • Async/Sync DB: async SQLAlchemy (asyncpg, aiomysql, aiosqlite) or sync
  • Pydantic Settings: BaseSettings with .env auto-loading
  • Rate limiting: SlowAPI
  • Celery: task queue with Redis broker
  • Alembic: migrations with autogenerate (async-aware)

Node.js extras

  • TypeScript: full TS scaffold with tsconfig.json, typed handlers, tsx dev server

Non-interactive mode

Create a JSON config file and pass it with --from:

{
  "project_name": "my-api",
  "language": "Python",
  "framework": "FastAPI",
  "python_pkg_mgr": "uv",
  "async_db": true,
  "rate_limit": true,
  "celery": true,
  "database": "PostgreSQL",
  "caching": "Redis",
  "auth": "JWT",
  "environments": ["local", "staging", "production"],
  "output_config": ["Docker", ".env", "Makefile", "README", "GitHub Actions CI"]
}
forge new --from config.json

Config fields

Field Type Options
project_name string Must start with a letter
language string Go, Python, Node.js
framework string See table above
node_variant string JavaScript, TypeScript (Node.js only)
python_pkg_mgr string pip, uv, poetry (Python only)
async_db bool Async database drivers (Python + FastAPI only)
rate_limit bool SlowAPI rate limiting (Python + FastAPI only)
celery bool Celery task queue (Python only)
database string PostgreSQL, MySQL, MongoDB, SQLite, None
caching string Redis, Memcached, None
auth string JWT, Session-based, Both, None
services string[] RabbitMQ, Kafka, Email, S3/R2 file storage, Webhook support
environments string[] local, staging, production
output_config string[] Docker, .env, Makefile, README, GitHub Actions CI

Example

$ forge new

  forge  · Step 1 of 11

  Project name

  > my-api_

  ...

  ╭──────────── Summary ────────────╮
  │  Name:        my-api            │
  │  Language:    Go · Chi          │
  │  Database:    PostgreSQL        │
  │  Cache:       Redis             │
  │  Auth:        JWT               │
  │  Output:      Docker, .env,     │
  │               Makefile, README  │
  ╰─────────────────────────────────╯

  Confirm and generate? (y/N) y

  ✓ Generated 21 files in my-api/
  ✓ Initialized git repository
  ✓ Done in 32ms

  Next steps:
    cd my-api
    cp .env.example .env
    make docker-up
    make run

Development

git clone https://github.com/aglili/forge.git
cd forge
go build -o forge ./cmd/
./forge new

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors