Natural language to working tool in one command. Forge generates code, writes tests,
iterates until they pass, and installs directly into your workflow. Self-evolving tools, zero friction.
Q1: Should it handle multiple CSV files or single file? Q2: What column filtering syntax? (names, indices, regex?) Q3: Output to stdout or write to .json file?
Forge✓ csv_to_json installed to ~/.local/bin/csv_to_json Forge✓ Ready to use: csv_to_json data.csv --columns name,email -o output.json
6
Pipeline Stages
3
Output Types
5x
Auto-Iterate
7
MCP Tools
3
Install Targets
The Pipeline
From description to deployed tool
Six stages, fully automated. Describe what you need in plain English.
Forge handles everything else — including fixing its own mistakes.
Stage 01
?!
Describe
Start with a natural language description. "Convert CSV to JSON with column filtering." That's all Forge needs to begin.
Stage 02
Q
Clarify
Forge analyzes your description, detects patterns (file I/O, network, transforms), and generates targeted questions to eliminate ambiguity.
Stage 03
S
Generate Spec
A structured ToolSpec is built: name, params, return type, dependencies, core logic, error handling, and usage examples. The blueprint.
Stage 04
{}
Generate Code + Tests
Jinja2 templates produce production-quality code with type hints, docstrings, and error handling. Tests are generated in parallel.
Stage 05
↻
Test + Iterate
Tests run in an isolated tmpdir. If failures occur, Forge auto-analyzes errors and regenerates — up to 5 iterations until all tests pass.
Stage 06
✓
Install
One command installs your tool to MCP (for Claude Code), CLI (for terminal), or local storage. Immediately usable. Zero config.
Session Lifecycle
Tracked through every state
Every Forge session moves through a deterministic state machine.
You always know exactly where your tool is in the pipeline.
CREATED
→
CLARIFYING
→
READY
→
GENERATING
→
TESTING
→
ITERATING
→
SUCCEEDED
/
FAILED
→
INSTALLED
Output Types
Three templates. Any target.
Forge generates production-ready code in three formats. Each template includes
proper error handling, type hints, docstrings, and is immediately executable.
Python Module
Function + CLI
Type-hinted function with if __name__ runner
"""CSV to JSON converter with column filtering.""" import csv import json from pathlib import Path
defcsv_to_json(
input_path: str,
columns: list[str] | None = None,
output_path: str | None = None,
) -> list[dict]: """Convert CSV to JSON.""" withopen(input_path) as f:
reader = csv.DictReader(f)
rows = [dict(r) for r in reader]
...
if __name__ == "__main__": csv_to_json(sys.argv[1])
CLI Tool
Click-based CLI
Full argument parsing, help text, error handling
#!/usr/bin/env python3 """CSV to JSON CLI tool.""" import click
Args: input_path: Path to CSV columns: Filter columns """
...
mcp.run()
Intelligent Clarification
Asks the right questions
Forge doesn't guess. It analyzes your description, detects patterns in what you said,
and generates targeted questions across 5 categories to build an unambiguous spec.
Your description
"Build a tool that scrapes product prices from a URL and saves them to a CSV file"
Network detected — keywords: URL, scrape
Output format detected — keywords: CSV, save
Dependencies inferred — requests, beautifulsoup4
Generated Questions
INPUT
Single URL or multiple URLs? Should it follow pagination?
OUTPUT
Which fields to extract? (name, price, currency, URL?)
BEHAVIOR
Should it handle JavaScript-rendered pages or static HTML only?
DEPS
Need rate limiting or request delays between pages?
EDGE CASE
How to handle missing prices or unavailable products?
Auto-Iteration
Self-healing test loop
When tests fail, Forge doesn't give up. It analyzes the failures, regenerates the broken code,
and retries — up to 5 times. Most tools pass by iteration 2.
Generate Code + Tests
Code and tests produced from ToolSpec
Run Tests (isolated tmpdir)
Tests execute in clean temporary directory
FAIL (iteration < 5)
Analyze Failures
Parse errors, identify root cause
↺ Fix & retry
PASS
All Tests Passed
Ready to install
Install to Target
MCP / CLI / Local
Installation Targets
Install once. Use everywhere.
Three targets for three workflows. Forge handles all the wiring — file placement,
permissions, config updates. Your tool is ready to use the moment it's installed.
M
MCP Server
Installs as a FastMCP tool server for Claude Code. Auto-updates ~/.mcp.json with the new server entry.
~/.claude/mcp-tools/forge/{name}.py
$
CLI Binary
Installs as an executable CLI tool with shebang line. Added to your PATH. Run it like any other command.
~/.local/bin/{name}
~
Local Storage
Default target. Saves to Forge's tool library. Browse, re-test, or promote to MCP/CLI later.
~/.forge/tools/{name}/
CLI Reference
Six commands. Complete control.
The Forge CLI is built with Click. Every command has help text, sensible defaults,
and works exactly as you'd expect.
forge create <desc>
Create a new tool from a natural language description. Starts the full pipeline: clarify, generate, test, install.
Display a rich table of all tools in your Forge library. Shows name, type, status, and creation date.
forge show <name>
Display the source code of a generated tool with syntax highlighting.
forge test <name>
Re-run the test suite for an existing tool. Useful after manual edits or dependency updates.
forge uninstall <name>
Remove a tool from its install target. Cleans up files, PATH entries, and MCP config.
forge serve
Start the Forge MCP server. Exposes all 7 tools for use by Claude Code or other MCP clients.
MCP Server
7 tools for programmatic access
The Forge MCP server exposes the full pipeline as individual tools. Claude Code (or any MCP client)
can create, iterate, and install tools programmatically.
forge_create
(description: str, output_type: str) → Session
Start a new Forge session. Analyzes description, generates clarification questions. Returns session ID and questions.
forge_answer
(session_id: str, answers: dict) → ToolSpec
Provide answers to clarification questions. Forge builds the ToolSpec and transitions to READY state.
forge_generate
(session_id: str) → TestResult
Generate code and tests from the ToolSpec. Runs tests automatically. Returns results with pass/fail status.
forge_iterate
(session_id: str, feedback: str) → TestResult
Auto-fix failing tests. Analyzes errors, regenerates code, retries. Up to 5 iterations.
forge_install
(session_id: str, target: str) → InstallResult
Install a passing tool to MCP, CLI, or local storage. Handles all file placement and config updates.
forge_status
(session_id: str) → SessionState
Get the current state of a Forge session: state, code preview, test results, iteration count.
forge_list
() → list[ToolSummary]
List all tools in the Forge library with name, type, status, and install location.
API Reference
ForgeEngine internals
The core orchestration class. ForgeEngine coordinates clarifier, generator, tester,
and installer. Use it programmatically for custom integrations.