Next-generation repository bundler and interactive dashboard that transforms your codebase into structured, token-efficient contexts for Large Language Models (LLMs) like ChatGPT, Claude, and Gemini.
AI assistants are incredibly powerful, but feeding them codebase context can be painful. Copying files individually is slow, and bundling the whole repository often overflows token limits with boilerplate or build files.
ContextPress solves this with a premium, dual-purpose developer experience:
- 💻 A fast CLI to create structured Markdown, XML, or JSON bundles.
- 🎨 A stunning, self-contained Glassmorphic HTML Dashboard that allows you to visually explore code metrics, search, select specific files via checkboxes, and copy only what's needed.
- ✂️ Smart Signature Extraction to strip away function implementations and keep only classes, types, and function definitions, reducing token costs by up to 80%.
- ⚙️ Smart Ignorers: Automatically respects
.gitignore, and filters out binaries, dependencies (node_modules), lockfiles, and media. - ✦ Intelligent Code Signatures: Compresses JS/TS and Python files by preserving only API signatures (omits inner code blocks).
- 📊 Token Estimator: Displays real-time token counts for each file based on text analysis (~4 chars/token).
- 🌐 Glassmorphic Web App: Generates a fully self-contained HTML explorer.
- Interactive file explorer tree.
- Fuzzy text search across filenames and contents.
- Interactive checkboxes to copy only a subset of files.
- Line-numbered, syntax-highlighted code viewer (offline fallback supported).
You can run ContextPress directly without installation using npx:
npx context-pressInstall globally on your system:
npm install -g .Or run in development mode inside this workspace:
node bin/cli.jscontext-press [dir] [options][dir]: Directory to scan (default: current directory.)
-o, --output <path>: Specify custom output file path.-f, --format <format>: Format type:markdown(default),xml,json,html.-s, --signatures: Enable code signature extraction mode.-w, --web: Shorthand/alias to generate the HTML dashboard (equivalent to-f html).-c, --copy: Copy the output bundle directly to the system clipboard.-t, --template <type>: Prepend system prompt template:review,bug,refactor,doc.-e, --exclude <globs...>: Add additional custom folder/file glob exclusions.-h, --help: Display help information.
Generate the interactive web dashboard for the current repo:
context-press -wOutputs: context-press-bundle.html
Bundle Javascript and Python code with signatures only:
context-press -s -o code-api.mdGenerate a structured XML bundle for Claude:
context-press -f xml -o bundle.xmlContextPress outputs structured blocks that models parse with high accuracy:
### File: `src/main.js`
```javascript
// code contents
### XML Format
```xml
<file path="src/main.js" tokens="140">
<content><![CDATA[// code contents]]></content>
</file>
XML tags are highly recommended for Anthropic Claude, as Claude is specifically trained to structure its input/output using XML tags.
MIT License. Feel free to use and contribute!
