| Crates.io | aibundle |
| lib.rs | aibundle |
| version | 0.7.8 |
| created_at | 2025-08-16 19:22:51.583383+00 |
| updated_at | 2025-08-16 19:22:51.583383+00 |
| description | A CLI & TUI file aggregator and formatter |
| homepage | |
| repository | https://github.com/robin-collins/aibundle |
| max_upload_size | |
| id | 1798783 |
| size | 5,634,552 |
A powerful CLI and TUI tool for bundling files and directories into AI/LLM-friendly formats. Perfect for sharing code snippets and project structures with AI assistants.

AIBundle is a multi-format specification designed for optimal code sharing with Large Language Models:
| Area | Details |
|---|---|
| Aggregation | File/folder crawl, recursive, filtering, ignore support, symlink safe |
| CLI Mode | Argument parsing, output destination, config merge, full export |
| TUI Mode | Interactive selector, keyboard shortcuts, live feedback, search/filtering |
| Output Formats | XML, Markdown, JSON, AI/LLM-friendly, with optional line numbers |
| Clipboard | Cross-platform copy/paste, internal/exported contents |
| Dependency Mapping | Internal/external import detection, per-file dependency view (LLM mode) |
| Config System | TOML config in home, CLI and TUI sections, merge and save capabilities |
| Status Display | Modal popups for stats/help/messages, persistent status bar |
tokio) for improved performance<file name="src/main.rs">
// File contents here
</file>
<folder name="src/lib">
<file name="src/lib/mod.rs">
// File contents here
</file>
</folder>
```src/main.rs
// File contents here
```
```src/lib/mod.rs
// File contents here
```
[
{"type":"file","path":"src/main.rs","binary":false,"content":"// File contents here"},
{"type":"directory","path":"src/lib","contents":[
{"type":"file","path":"src/lib/mod.rs","binary":false,"content":"// File contents here"}
]}
]
# PROJECT ANALYSIS FOR AI ASSISTANT
## 📦 GENERAL INFORMATION
- **Project path**: `/home/user/project`
- **Total files**: 12
- **Files included in this analysis**: 8
- **Main languages used**:
- Rust (5 files)
- Markdown (2 files)
- TOML (1 file)
## 🗂️ PROJECT STRUCTURE
/home/user/project ├── src │ ├── main.rs │ ├── lib.rs │ └── utils │ └── helpers.rs ├── tests │ └── integration_test.rs └── Cargo.toml
## 🔄 FILE RELATIONSHIPS
### Core Files (most referenced)
- **`src/lib.rs`** is imported by 3 files
### Dependencies by File
- **`src/main.rs`**:
- *Internal dependencies*: `src/lib.rs`, `src/utils/helpers.rs`
- *External dependencies*: `std::io`, `clap`
*The LLM format provides a specialized Markdown output designed for AI assistants, including:*
- Project overview (path, counts, languages)
- File tree structure visualization
- **Per-file dependency mapping** (internal and external dependencies, detected via import/include patterns for various languages)
- File contents with syntax highlighting hints and dependency summaries
## 📄 FILE CONTENTS
### src/main.rs
```rust
fn main() {
println!("Hello, world!");
}
.gitignore supporttokio for async file operations)Using Cargo:
cargo install aibundle
From source:
git clone https://github.com/yourusername/aibundle
cd aibundle
cargo build --release
Launch AIBundle's interactive terminal interface in any directory:
aibundle # Current directory
aibundle /path/to/project # Specific directory
Use AIBundle directly from the command line:
# Basic usage - copy all .rs files to clipboard in LLM format
aibundle --files "*.rs"
# Export to a file instead of clipboard
aibundle --files "*.{rs,toml}" --output-file project_bundle.md
# Print to console with line numbers
aibundle --files "src/*.rs" --output-console --line-numbers
# Specify format and other options
aibundle --files "*.py" --format markdown --recursive
# Save your preferences for future use
aibundle --format llm --gitignore true --recursive true --save-config
aibundle [OPTIONS] [SOURCE_DIR]
| Option | Description | Example |
|---|---|---|
--files, -f |
File pattern to match | --files "*.rs" |
--format, -m |
Output format (xml/markdown/json/llm) | --format markdown |
--output-file, -o |
Write to file instead of clipboard | --output-file bundle.md |
--output-console, -p |
Write to console instead of clipboard | --output-console |
--source-dir, -d |
Source directory (default: current) | --source-dir ./src |
--search, -s |
Search pattern to match file contents | --search "function" |
--recursive, -r |
Include subfolders recursively | --recursive |
--line-numbers, -n |
Show line numbers in output | --line-numbers |
--gitignore, -g |
Use .gitignore files for filtering (default: true) | --gitignore |
--ignore, -i |
Ignore patterns (comma-separated list) | --ignore node_modules,target |
--save-config, -S |
Save current settings to .aibundle.config | --save-config |
| Pattern | Description | Example |
|---|---|---|
* |
Match any characters | *.rs |
? |
Match single character | test?.rs |
** |
Match directories recursively | src/**/*.rs |
{} |
Group patterns | *.{rs,toml} |
/ to enter search modeAIBundle saves configuration in ~/.aibundle.config.toml:
[cli]
files = "*.rs"
format = "llm"
recursive = true
[tui]
format = "markdown"
line_numbers = true
selection_limit = 600
Navigation:
↑/↓ - Move selectionPgUp/PgDn - Move by 10 itemsEnter - Open directoryTab - Expand/collapse folderSelection:
Space - Select/deselect item* - Select/deselect all visible itemsActions:
c - Copy selected items to clipboardf - Toggle format (XML → Markdown → JSON → LLM)n - Toggle line numbers/ - Search (ESC to cancel)Filters:
i - Toggle default ignoresg - Toggle .gitignore supportb - Toggle binary filesOther:
h - Show helps - Save configurationq - Quit (copies if items selected)--save-configCore dependencies:
# Clean build
cargo clean
cargo build --release
# Run all checks
cargo fmt --all -- --check
cargo fmt
cargo clippy --all-targets --all-features
cargo test --all-features
cargo doc --no-deps
# If publishing to crates.io
cargo publish --dry-run
AIBundle v0.6.13 includes several performance optimizations:
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the AIBundle Team