Back to all projects

ContextForge.

Open source CLI tool that scans your codebase, calculates relevance, and builds token-efficient context bundles for AI coding assistants. Runs 100% locally with zero external API keys.

The Friction with LLM Context

Developers frequently struggle with three major inefficiencies during AI coding sessions:

Manual File Hunting

Digging through hundreds of files, guessing relevance, and copy-pasting code manually into chat boxes.

Wasted Tokens

Sending entire function bodies and boilerplate that blows token limits and causes prompt degradation.

Context Dilution

Models hallucinating across multi-file boundaries due to unstructured context payloads.

How ContextForge Works

ContextForge executes an intelligent 5-step local pipeline in milliseconds:

  • Task Description: Parses your intent written in plain natural language.
  • Repository Indexer: Scans the directory with strict .gitignore and lockfile exclusion.
  • Relevance Scoring: Evaluates symbol graphs and keyword proximity across source files.
  • AST-Aware Compression: Extracts type contracts and function signatures while pruning implementation bodies.
  • Clipboard Output: Copies a token-budgeted prompt ready for pasting into any LLM.

Installation & Usage

Coming Soon

Upcoming global CLI distribution for local workflow integration:

1# Install globally via npm (package release in progress)
2npm install -g contextforge@beta
3
4# Build context for a specific task
5contextforge "refactor JWT auth middleware and token validation"

Key Metrics & Token Savings

83%
Token Reduction
0 ms
100% Local Latency
AST
Symbol Pruning