CodePiler turns any codebase into a structured AI prompt. Select the exact files that matter, set a token budget for your model, wrap with an expert system prompt and task, and export directly to ChatGPT, Claude, Gemini, or any other LLM.
Repository → AI Prompt
No backend · No upload · No cost
Browse the full repository tree with inline token counts on every file and folder. Select exactly the files the task needs — nothing more. Compare your total against any model's context limit with a live progress bar.
Filter by file type, search the tree by name, collapse folders, and use the size manager to bulk-deselect heavy files. A pinned panel shows every selected file with its individual token cost so you can audit and trim without hunting through the tree.
Wrap your code with a system prompt and task from 22 expert presets — 12 language-specific system prompts (JS, Python, Go, Rust, Java, Swift, and more) and 10 task templates (code review, security audit, refactor, write tests). Export as Text, JSON, XML, or Markdown and save sessions for later.
12 core features
CodePiler is not a chat wrapper or a code editor. It is a purpose-built workspace for the one step that happens before you talk to any AI: assembling the right context from your codebase.
Browse the full repository tree and include exactly the files your prompt needs. Select All, Clear, Collapse, and Expand All controls let you manage even large repos in one click.
Choose from 12 language-specific system prompts (JavaScript, Python, Go, Rust, Java, C++, Swift, Kotlin, and more) and 10 task templates (code review, security audit, refactor, write tests, performance, and more). Each preset is hundreds of words of expert-level instruction.
Pick from 27 model presets — Claude Opus 4 (200K), GPT-4.1 (1M), Gemini 2.5 Pro (1M), Llama 3.1 (128K), and more — and watch a live color-coded bar fill as you add files. Stay green, hit amber, stop before red.
A pinned panel at the bottom of the file tree lists every selected file with its individual token cost and a one-click remove button. Audit your selection without scrolling through the full tree.
Click any filename to preview it in the editor. Use the checkbox to include it in the export. Previewing and selecting are separate actions — you can inspect a file before deciding whether it belongs in the prompt.
Switch between plain text, JSON, XML, and Markdown without rebuilding your context. Text is optimized for direct prompting, JSON and XML for tooling pipelines, Markdown for docs and sharing.
See token usage inline on every file and folder in the tree — before you select anything. No guesswork on which files are eating your context budget.
Narrow the tree to only .ts, .py, .go, or any combination of extensions in one click. Reduces noise when a repo contains a mix of source, config, documentation, and assets.
Open the size manager to see all files sorted by token count or byte size. Bulk-select or deselect heavy files in one panel without touching the tree.
Save your repository and file selection to localStorage and restore it in one click — no re-uploading, no re-filtering. Resume exactly where you left off in any future session.
Repository files are processed entirely inside your browser. No files are sent to any server, no account required. Works offline after the page loads. Your code stays private by design.
The token count updates in real time as you select files, edit the system prompt, or change the task. The count includes the full export — code context, system prompt, and task — so what you see is exactly what the model receives.
Real impact
Token usage directly maps to API cost and latency. Codepiler cuts both by giving you surgical control over what enters the prompt — before the LLM ever sees it.
Precise file selection keeps prompts lean. Sending 15 targeted files instead of a full 300-file repo cuts token usage by 90%+ in typical workflows.
Saved Sessions lets you restore any previous repository and selection instantly. No ZIP drag-and-drop, no re-filtering — the workspace opens exactly where you left it.
Assembling context manually takes 10–30 minutes per session. Codepiler compresses that to under 60 seconds: upload, filter, select, export.
AI coding agents (Cursor, Copilot, custom MCP tools) make repeated read_file calls to understand a codebase. Pre-pack the right files once and the agent skips those round-trips entirely.
Cost calculation
A 300-file TypeScript project typically contains ~500K tokens. At GPT-4o rates ($5 / 1M input tokens), one full-repo prompt costs ~$2.50. With Codepiler you send 20–40 relevant files (~40K tokens) — the same task costs ~$0.20. That is a 12× cost reduction per prompt, compounding across every AI session.
Based on GPT-4o $5/1M token input pricing. Savings scale with usage frequency and model tier.
How it works
The entire workflow runs in your browser. No account. No backend. No files leave your machine. Import once, select deliberately, and export a structured prompt that gives your model exactly what it needs.
Drag and drop a project folder or a downloaded ZIP archive. CodePiler reads file contents directly in your browser — no upload, no server, no waiting. Binary files, generated directories (node_modules, .git, dist), and files over 200 KB are automatically filtered out so the tree stays clean.
Use the live file-type filter to narrow by extension. Search the tree by filename or folder. Sort by token count or file size to find the heaviest files quickly. Check the files that belong in the prompt — inline token counts on every file and folder make it easy to build toward a target budget. The selected-files panel at the bottom shows a running total and lets you remove individual files without scrolling the tree.
Click the Prompt button to open the wrapper modal. Choose a language-specific system prompt from 12 expert presets (JavaScript, Python, Go, Rust, Java, C++, Swift, Kotlin, React/Next.js, and more) and a task from 10 action presets (code review, security audit, write tests, refactor for readability, find bugs, performance audit, and more). Each preset is hundreds of words of detailed, expert-level instruction — or write your own from scratch.
Pick a model from the token budget dropdown — Claude Opus 4, GPT-4o, Gemini 2.5 Pro, and 24 others — and a color-coded progress bar tracks your usage in real time. When the prompt looks right, copy it to clipboard or download it as Text, JSON, XML, or Markdown. Save the session to localStorage and restore it in one click next time — no re-uploading.
Use cases
The value is not just aggregation. It is selecting the right subset of a repository, preserving its structure, wrapping it with expert instructions, and keeping the prompt within your model's context budget.
Select the changed files, apply a language-specific system prompt and the Code review task preset, and send one focused prompt instead of pasting files one by one. The model gets full file content with structure preserved.
Select auth routes, middleware, input handlers, and config files. Apply the Security review task preset and a language-specific system prompt for a deeply detailed, structured vulnerability analysis from any LLM.
Gather entrypoints, routing, schema files, and key configuration. Apply the General polyglot system prompt and export a complete architectural overview prompt that a model can turn into a codebase walkthrough.
Isolate the failing route, service layer, and supporting types. Add the Find and fix bugs task preset, verify the token budget fits your model's context window, and export one precise debugging prompt.
A 300-file TypeScript project is roughly 500K tokens — $2.50 per GPT-4o call. Selecting the 20 relevant files brings that to ~40K tokens and ~$0.20 per call. That is a 12× cost reduction that compounds across every AI session.
Pick the relevant feature folder, apply a language-specific system prompt and the Modularize or Apply OOP principles task preset, and use the token budget bar to confirm the prompt fits comfortably inside the model's context window.
AI coding agents like Cursor and custom MCP tools make repeated read_file calls to understand a codebase. Pre-package the relevant files once so the agent receives structured context immediately and skips redundant file reads.
Select the module under test and its dependencies. Apply the Write unit tests task preset with the appropriate language system prompt, and get a detailed test plan with table-driven tests, edge cases, and mock strategies.
Free and open source
Upload any repository, select the files that matter, wrap with an expert system prompt and task, and export AI-ready context for Claude, ChatGPT, Gemini, or any other model — all without sending a single file to a server.
No account required · No files uploaded · Works offline after first load