📦 ai-pack
Pack your entire codebase, specific files, or uncommitted changes into a single token-optimized Markdown prompt for LLMs (like ChatGPT, Claude, Gemini).
⚡ Key Features
- 📋 Clipboard-First: Automatically copies your prompt, ready to paste straight into ChatGPT, Claude, Gemini, or any LLM interface.
- 💀 Skeleton Mode (
-s/--skeleton): Drastically saves tokens by stripping function/method bodies, keeping only class structures, signatures, and imports. - 🎯 Interactive Selector (
-i): Choose files interactively via checkbox CLI menu. - 🌿 Git-Aware (
-c/--changed): Automatically pack only modified, staged, or untracked files. - 🛡️ Gitignore-Respecting: Excludes ignored, temporary, or build files automatically (using
git ls-fileswith manual fallback for non-git folders). - 💬 Prompt Presets (
-p): Instantly prepend pre-configured prompts for code review, bug hunting, or architecture explanations. - 📊 Token Estimation: Heuristic token counting warns you if your payload exceeds your limit (
--max-tokens).
🚀 Quick Start
Installation
Choose your preferred installation method:
# Option 1: Install official package via pip (Recommended)
pip3 install ai-pack-cli --user
# Option 2: Install via pipx (Isolated environment)
pipx install ai-pack-cli
# Option 3: Standalone Executable (Zero dependencies - No Python required!)
# Linux:
curl -sSL https://github.com/iamraydoan/ai-pack/releases/latest/download/ai-pack-linux-x86_64 -o /usr/local/bin/aip && chmod +x /usr/local/bin/aip
# macOS:
curl -sSL https://github.com/iamraydoan/ai-pack/releases/latest/download/ai-pack-macos-arm64 -o /usr/local/bin/aip && chmod +x /usr/local/bin/aip
# Windows: Download ai-pack-windows-x86_64.exe from GitHub Releases
💡 Usage & Common Scenarios
Here are common ways to use ai-pack (using commands aip, ai-pack, or aipack):
1. Pack codebase & copy to clipboard (Default)
aip
2. Pack specific files/folders and save to a file
aip -f src/main.py tests/ -o output.md
3. Pack only uncommitted changes with a code review prompt
aip -c -p review
4. Pack code skeleton to save context window tokens
aip -s -p explain
5. Choose files interactively before packing
aip -i
⚙️ CLI Flags & Interactions
Reference
| Flag | Short | Type | Description |
|---|---|---|---|
--version |
-v |
Flag | Show the version of ai-pack and exit. |
--files |
-f |
Path(s) | Specific files or directories to pack (space-separated). |
--changed |
-c |
Flag | Pack only modified, staged, or untracked Git files. |
--interactive |
-i |
Flag | Select files interactively via a checkbox menu. |
--skeleton |
-s |
Flag | Strip method bodies, leaving only signatures and imports to save tokens. |
--prompt |
-p |
Choices | Prepend preset: review, bug, or explain. |
--output |
-o |
Path | Save output directly to a file instead of copying to clipboard. |
--max-tokens |
Number | Count approximate tokens and warn if the limit is exceeded. |
🤝 Combining Flags
You can combine flags to narrow down and customize your payload:
- Filter Git changes (
-f+-c/--changed): Only packs files that are both modified/uncommitted AND located inside the specified paths.aip -c -f src/
- Interactive selection with filter (
-i+-f/-c): Shows only the filtered list (e.g. only changed files) in the interactive checkbox menu instead of the entire repo.aip -i -c
- Structure only (
-s/--skeleton+ any mode): Can be appended to any command to extract skeletons instead of full source code for the selected files.aip -i -s
- Redirect output (
-ovs Default): By default, everything goes to the clipboard. Use-o filename.mdto save to a file instead.
💀 Skeleton Mode Example
Original Code:
def fibonacci(n):
if n <= 0:
return []
elif n == 1:
return [0]
sequence = [0, 1]
while len(sequence) < n:
sequence.append(sequence[-1] + sequence[-2])
return sequence
Skeleton Output:
def fibonacci(n): ...
🤝 Contributing
Contributions are welcome! Please check out the Developer & Contributing Guide for local setup, running unit tests, and code formatting guidelines (ruff).
- Fork the repository.
- Create your feature branch (
git checkout -b feat/amazing-feature). - Commit your changes (
git commit -m 'feat: add amazing feature'). - Push to the branch (
git push origin feat/amazing-feature). - Open a Pull Request.
Give this repository a ⭐ if it helped you pack your code for LLMs!
Metadata
Release files for ai-pack-cli 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_pack_cli-0.3.0.tar.gz | 14.8 kB | With provenance | Details for ai_pack_cli-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_pack_cli-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for ai_pack_cli-0.3.0-py3-none-any.whl |
Total release size: 27.7 kB
Release files / ai_pack_cli-0.3.0.tar.gz
| Download URL | ai_pack_cli-0.3.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
442f5e854e1f1cdb23a7a0b965bf1e2c32d686245e9cb40cf6cbf71fe5fb1bee
|
|
BLAKE2b-256 checksum How to use checksums |
7d6bb4fdc375d247e179bd60799a7ea779af190788634e0a795b94069a1c1796
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logRelease files / ai_pack_cli-0.3.0-py3-none-any.whl
| Download URL | ai_pack_cli-0.3.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
673d37cb0d3d80a8f7f6718d611236120351a4ebe8ff8d82a89179b4a23d7502
|
|
BLAKE2b-256 checksum How to use checksums |
b70b2598f43f1ab3e3d7d7fb2d7f3aee709259dfb58cf770190e85a92d25cbcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logSecurity for ai-pack-cli 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ai_pack_cli-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.