The Ultimate AI Context Compressor. Mind-meld your codebase with LLMs instantly.
When you hit a bug spanning 5 different files, you manually cat or copy-paste each one into Claude or ChatGPT. That's tedious, slow, and wastes tokens on boilerplate. neuro-forge fixes this — one command compresses your active Git context into a single optimized Markdown block and injects it straight into your clipboard.
- 🧠 Analyzes your active Git tree to find exactly what you're working on
- 📊 Real token counting — shows exact token count using GPT-4 tokenizer
⚠️ Context limit warnings — alerts when you exceed GPT-4 or Claude limits- ✂️ Strips dead weight (empty lines, massive breaks) to save tokens
- 📋 Injects the result directly into your OS clipboard
- 🎯 Target specific files/folders — bypass Git and pack exactly what you want
- 🕐 Time-based selection — grab files changed since "2 days ago" or "last Monday"
- 💬 Append custom prompts — include your question in the same payload
- 📁 Output to file — write to a file instead of clipboard
- ⚡ Skips
node_modules,.gitignorepaths, locks, and binary files - 🖥️ Works on macOS, Windows, and Linux
npx @dinakars777/neuro-forge compressOr install globally:
npm install -g @dinakars777/neuro-forge
cd my-project
forge compressforge compress --files src/components/Auth src/api/users.tsforge compress --since "2 days ago"
forge compress --since "last Monday"forge compress --prompt "Find the bug causing the null pointer exception"The prompt will be appended to the context, so you can paste everything in one shot.
forge compress --out context.mdforge compress --since "3 days ago" --prompt "Review this feature" --out review.md- Runs
git diff --name-onlyandgit ls-filesto find your active context (or uses--since/--filesif specified) - Strips noise and bundles file contents into a clean Markdown block:
## File: src/components/Button.tsx // ...content... - Calculates exact token count using GPT-4 tokenizer
- Warns you if you're exceeding context limits (32K for GPT-4 Turbo, 128K for Claude)
- Copies the entire payload to your clipboard — just
Cmd+Vinto your LLM
| Flag | Description | Example |
|---|---|---|
--since <time> |
Get files changed since a specific time | --since "2 days ago" |
--files <paths...> |
Target specific files or folders | --files src/auth src/db/schema.ts |
--prompt <text> |
Append a custom prompt to the context | --prompt "Explain this code" |
--out <file> |
Write output to a file instead of clipboard | --out context.md |
| Package | Purpose |
|---|---|
execa |
Fast Git command execution |
clipboardy |
Cross-platform clipboard access |
js-tiktoken |
Accurate GPT-4 token counting |
@clack/prompts |
Beautiful CLI UI |
| TypeScript | Type-safe implementation |
Unlike generic repo packers, neuro-forge is laser-focused on the active development workflow:
- Zero config — just run
forge compressand it figures out what's relevant - Token awareness — shows exact counts and warns about context limits
- Workflow integration — clipboard-first, prompt appending, time-based selection
- Smart defaults — targets what you're working on right now, not the entire repo
MIT