The Problem Every AI-Assisted Developer Knows Too Well
You're deep in a debugging session with Claude or ChatGPT. The AI asks: "Can you share the relevant files?"
So you start... copying.
main.py → paste.
utils.py → paste.
Oops, forgot config.py → paste.
Wait, did I just paste node_modules/some-package/index.js by accident? 😩
Fifteen minutes later, you've burned half your context window on irrelevant boilerplate, hit the token limit, and the AI still doesn't have the full picture. Sound familiar?
This happens every single day to developers using LLMs for code review, refactoring, or onboarding AI into an existing project. So I built a tool to kill this workflow for good.
Meet ai-pack 📦
ai-pack is a zero-dependency CLI that scans your repo, respects your .gitignore, packs the relevant code into clean, token-optimized Markdown — and copies it straight to your clipboard. No manual file-hunting, no accidental binary dumps, no wasted tokens.
aip -s -c
That's it. Now just hit Ctrl+V in Claude or ChatGPT.
Why It's Different
1. 📋 Clipboard-First, Even Over SSH
Most "repo-to-prompt" tools just print output to your terminal, leaving you to select-and-copy manually. ai-pack copies directly to your clipboard by default — and it even works when you're SSH'd into a remote server, thanks to OSC52 terminal escape sequences. Yes, clipboard sync through SSH, out of the box.
2. 💀 Skeleton Mode — Cut Token Usage by Up to 80%
This is the feature I'm most proud of. Most of the time, an LLM doesn't need your entire function body to understand your architecture — it needs the shape of your code: class definitions, function signatures, imports, type hints.
ai-pack's Skeleton Mode (-s) uses AST parsing across 30+ languages (Python, TypeScript, Go, Rust, Java, C++, and more) to strip function bodies while preserving structure:
# Before
def calculate_total(items: list[Item], tax_rate: float) -> float:
subtotal = sum(item.price * item.quantity for item in items)
tax = subtotal * tax_rate
return round(subtotal + tax, 2)
# After (Skeleton Mode)
def calculate_total(items: list[Item], tax_rate: float) -> float: ...
For large repos, this alone can be the difference between "fits in context" and "sorry, request too large."
3. 🌿 Git-Aware Packing
Don't want to dump your whole repo? Use -c to pack only the files you've actually changed — uncommitted or staged. Perfect for AI-powered code review before you open a PR:
aip -c -s
4. 🎯 Interactive File Picker
Prefer to hand-pick files? -i opens a checkbox-style file selector right in your terminal — no need to remember paths.
5. 🚀 Zero-Dependency, One-Line Install
curl -fsSL https://raw.githubusercontent.com/iamraydoan/ai-pack/main/install.sh | sh
or via pip:
pip install ai-pack-cli
No Python required if you use the standalone binary. It just works.
Real-World Example
Say you're onboarding a teammate — or an AI — into a mid-sized repo. Instead of this:
"Uh, let me find the relevant files... give me a sec..."
You run:
aip -s
And paste the result straight into your LLM of choice. The AI instantly sees your project's structure, types, and interfaces without wading through thousands of lines of implementation detail.
Try It Out
pip install ai-pack-cli
aip --help
Commands: aip, ai-pack, or aipack — whichever you like typing.
If this saves you the same copy-paste headache it saved me, I'd genuinely appreciate a ⭐ on GitHub — it helps other developers discover the project, and it keeps me motivated to keep shipping features.
🔗 GitHub: github.com/iamraydoan/ai-pack
📦 PyPI: ai-pack-cli
What's your current workflow for feeding code into LLMs? Curious to hear if others have hacked together similar scripts — drop a comment below 👇
Top comments (0)