How to Pack a Codebase for ChatGPT and Claude
Providing full repository context to large language models like ChatGPT, Claude, and Gemini usually requires tedious manual copying, or accidentally uploading noisy build directories like node_modules. Codebase to Prompt transforms any project folder into one neatly-formatted, token-optimized context document directly inside your web browser.
- Select your project folder: Click Load Folder or drag your repository directly into the browser window. Our client-side parser scans all files without uploading a single byte.
- Automatic .gitignore filtering: The engine automatically parses root and nested
.gitignorefiles, skipping build directories, logs, caches, and binaries. - Inspect and Redact Secrets: The built-in security guard scans file contents for API keys, AWS credentials, and private keys, allowing you to redact them with one click.
- Tune your Token Budget: Choose your target LLM context window (e.g. 128k or 200k). Use Fit to Budget to drop heavy test files or truncate lines.
- Copy and Paste into AI: Click Copy Prompt to paste a beautifully formatted Markdown or XML representation into your conversation.
Before vs After: What the AI Receives
Why Local-First Prompt Packing Matters
Developer privacy is paramount. Many cloud-based prompt packers require granting third-party OAuth access to your GitHub repositories or sending source files to remote servers. Codebase to Prompt runs 100% in your local browser memory using native HTML5 File System APIs. Your intellectual property and private algorithms remain completely private on your local machine.
Frequently Asked Questions
How do I give my whole project to ChatGPT?
Click 'Load Folder' or drag your project folder into the tool. Codebase to Prompt parses your .gitignore, strips build junk (node_modules, target, dist), redacts sensitive keys, and formats your files into an AI-ready prompt.
Is my code uploaded to any server?
No. All processing occurs locally in client-side JavaScript. Zero bytes are uploaded, and no external network calls are made.
How are secrets and API keys handled?
The tool automatically scans text for high-entropy patterns, OpenAI keys (sk-), AWS access keys, GitHub tokens, and private key blocks. You can redact all detected matches with a single click before copying.
How are tokens calculated?
We use the industry standard approximation of ~4 characters per token for English text and code. You can adjust this ratio in the Settings dialog.
Related Free Tools Built by MafLabs
- Extract Files from AI Reply — Unpack multi-file ChatGPT and Claude replies into clean ZIP downloads.
- JSON Log Viewer — Fast stream reader and filter for NDJSON application logs.
- OpenAPI Diff — Detect breaking API changes between OpenAPI specs client-side.