Skip to content

Optimize your repository
before your AI reads it

Forge prepares a precise, repository-aware context before your AI assistant runs — so it reads only what matters, responds with higher accuracy, and wastes fewer tokens on noise. It optimizes context quality, not your billing.

Repositorymain
🔍index codebase...⌘K
src
├─core
│ ├─index.ts
│ └─parser.ts
└─config.json
Forge Optimizer Engine
Repository Intelligence
Dependency Graph
AST Pruning
Context Ranking
+ 3 additional optimization steps
Optimized Context
Repository Status
  • 1,284 Files Indexed
  • AST Pruning Complete
  • Saves tokens (Active)
Repository-aware context prepared.
Ready for Claude Code, Cursor, Codex, and Antigravity.
Claude Code
Claude Code
CLI Agent
Cursor
Cursor
IDE Native
Codex
Codex
Inline Co-pilot
Antigravity
Antigravity
Google Agent
Why Forge

Watch context compilation in real time

Forge intercepts your prompt, analyzes repository intelligence, and compiles pruned context before your AI assistant runs.

FORGE CONTEXT RUNTIME
Preparing Context
WorkspaceLive
src/
middleware.tsSynced
router.tsSynced
auth.tsSynced
Local DaemonWatching
AST Engine
export function check(req) {
const u = auth(req)
if (!u) throw Error()
}
AST Active
Rulesets
.gitignore
.cursorrules
Rules Applied
Dependency MapLive
Context Selection
Incremental Cache
Cache Ready
Watching Repository
Warmed
MCP Runtime
MCP Connected
Active Context
Relevant Symbols
Imports & Types
Dependency Chain
Rules Applied
Status:Ready
Core philosophy

Four pillars, one runtime

Forge focuses on what it controls — repository context, behavior, output, and the runtime that orchestrates them.

01

Repository Intelligence

Scanning, caching, symbol extraction, dependency analysis, and semantic ranking.

AST Context MapIndexed & Cached
forge
main.py
utils.ts
auth.go
db.sql
PARSING WORKSPACEAST ACTIVE
Scan 24 files in 0.04s
Rank files by prompt relevance
Compile ruleset: forge.toml
02

Behavior Optimization

Configurable implementation guidance inspired by YAGNI rules.

03

Output Optimization

Response-style and token optimization for tighter, cheaper responses.

04

Runtime Infrastructure

Zero-config wrappers, context preparation, and runtime orchestration.

Interactive CLI

One command per tool. Zero configuration.

Every wrapper auto-prepares and optimizes context, updates config, and launches your assistant under an optimized environment.

zsh — forge
$ forge auth login
→ Select AI provider: [Anthropic, OpenAI, Gemini, DeepSeek]
→ Read Anthropic credential from local env ... verified
✓ Credentials synced locally
✓ Active provider set to Anthropic (claude-3-5-sonnet)
Configure credentials dynamically and select your preferred active AI provider (BYOK).
Feature showcase

Handcrafted for correctness

Every piece of the runtime exists to give your assistant a better starting point — and to stay out of everything it shouldn't touch.

Relevant context only

Selection plus aggressive caching keep the payload lean — only what your prompt actually needs is sent to the model, never the whole tree.

selected skipped

Incremental caching

Repository representations are cached between runs and updated incrementally.

warm

Standard MCP runtime

Speak the Model Context Protocol over stdio, or let a convenience wrapper prepare and launch your tool for you.

Client
stdio
Server

Optimizes what it controls

Forge never modifies provider billing, quota accounting, model pricing, or the remote model's internal reasoning.

Contextoptimized
Rulesetsoptimized
Model pricinguntouched

Bring Your Own Key (BYOK)

Configure credentials locally via 'forge auth login' to dynamically switch and authenticate multiple AI providers (OpenAI, Anthropic, Gemini, DeepSeek) without lock-in.

AnthropicActive
OpenAIConfigure
GeminiConfigure
DeepSeekConfigure

AI Git Commit Generator

Auto-generate semantic Conventional Commit messages by analyzing staged changes ('git diff --cached'). Review, edit, and commit instantly.

staged changes
$ git diff --cached
- import { auth } from 'old-auth'
+ import { byok, commit } from 'forge'
generated messageConventional
feat(auth): add local credential sync and AI git commits
How it works

Three steps, zero configuration

From a cold repository to an optimized assistant in a single command.

01
Step 01

Scan & cache

Forge scans the repository, analyzes dependencies, and caches an incremental representation of the codebase.

02
Step 02

Rank & prune context

Semantic ranking picks the files that match your prompt, then AST pruning keeps only the symbols that matter.

03
Step 03

Launch optimized

Rulesets are applied and your AI tool launches under an optimized environment — over MCP or a convenience wrapper.

FAQ

Frequently asked questions

How Forge prepares context and launches your tools. Still curious?

Forge is a lightweight, high-performance runtime designed for modern AI coding tools that optimizes repository context before your model reads it. Rather than sending raw, whole-repo dumps, it indexes your workspace to perform precise AI context engineering, selecting only the relevant definitions, files, and imports. This ensures higher correctness, lower latency, and less wasted token budget.

Give your assistant a better starting point

Install the CLI and wrap your first tool in under a minute. Star the repo to follow along.

$uv tool install forgeoptimizer