Forge is a smart, language-agnostic scaffolding and code generation tool. Inspired by Rails generators and modern CLI tools, Forge empowers you to scaffold projects, generate boilerplate code, and safely modify existing files using declarative configuration and comment-based markers.
- 🧱 Project scaffolding with
forge newusing customizable templates - 🧠 Smart file modification with
forge generateand code injection - 🧭 Marker-based insertion (
# forge:region:start|end) that is idempotent and editable
- 🔍 Template discovery via
.forge/templates/, supports per-project and global resolution - 🌐 Git-based templates for shared or organization-level scaffolding
- 🧩 Declarative configuration with
forge.meta.yamlfor file and injection rules - 🛠️ Templating engine powered by Jinja2 with support for custom filters
pip install forge-cliOr clone locally:
git clone https://github.com/yourname/forge
cd forge
python -m forge.cliforge new project myapp --template=typer-cliforge new template my-template --template=forge generate command greetThis creates commands/greet.py and injects it into your CLI registry using predefined marker regions.