CodePiler icon
CodePiler
FeaturesDocsApp
Launch App
Free & open source · Runs 100% in your browser

Build focused AI prompt context from any repository — in seconds.

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.

Launch App — It's FreeSee How It Works

Repository → AI Prompt

No backend · No upload · No cost

Local-first
01
Upload folder or ZIP — processed in your browser
02
Select files — inline token counts on every file
03
Wrap with expert system prompt + task preset
04
Set model token budget, export & save session

Precise file selection

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.

Signal over noise

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.

Expert-level prompt presets

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

Every tool you need to build precise AI prompt context from real code.

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.

Selective file control

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.

Expert prompt presets

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.

Model token budget

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.

Selected files panel

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.

Preview without selecting

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.

4 export formats

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.

Per-file token counts

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.

File type filter

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.

Token & size manager

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.

Saved sessions

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.

100% local-first

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.

Live token awareness

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

Less noise. Lower cost. Faster AI workflows.

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.

90%

Fewer tokens sent

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.

0

Re-upload time

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.

10×

Faster context prep

Assembling context manually takes 10–30 minutes per session. Codepiler compresses that to under 60 seconds: upload, filter, select, export.

Skip

AI read_file calls

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

Sending a full repository vs. a curated selection

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.

Full repo prompt~$2.50
Codepiler selection~$0.20
Saved per call~$2.30

Based on GPT-4o $5/1M token input pricing. Savings scale with usage frequency and model tier.

How it works

From repository to AI-ready prompt context in four steps.

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.

01

Import your repository

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.

02

Filter, search, and select the right files

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.

03

Wrap with a system prompt and task

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.

04

Set a model budget, export, and save

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

Built for every workflow that needs focused AI context from real code.

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.

1

AI code review

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.

2

Security audit

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.

3

Onboarding new engineers

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.

4

Debugging a multi-file bug

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.

5

Reduce AI API costs

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.

6

Refactoring and modernization

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.

7

AI agent context preparation

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.

8

Writing tests for legacy code

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

Stop copy-pasting code into AI tools. Build a proper prompt in seconds.

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.

Launch App — It's FreeRead the Docs

No account required · No files uploaded · Works offline after first load

CodePiler

Turn your codebase into structured, AI-ready context. Built for developers working with modern LLMs.

Product

  • Launch App
  • Features
  • Use Cases

Resources

  • Docs
  • Upload Guide
  • Viewer Guide

Company

  • Client-side workflow
  • Prompt-first utility
  • Made for AI-assisted dev
(c) 2026 CodePiler. All rights reserved.Built for developers working with AI