Code Bundler
A text-based UI (TUI) tool for combining and transforming source code files for large language model (LLM) usage.
Overview
Code Bundler helps developers package multiple source code files into a single consolidated file for sharing with LLMs like Claude, ChatGPT, or other AI assistants. It features:
- Interactive TUI (Text User Interface) for intuitive file selection
- Support for any file type with customizable selection patterns
- Source code transformations (comment and docstring removal)
- Real-time file monitoring and automatic rebuilding
- Clipboard integration for easy sharing with LLMs
Installation
pip install codebundler
Usage
Code Bundler provides a TUI interface for selecting and bundling files:
codebundler /path/to/source/directory output.txt
Command-line Options
--ignore=PATTERNS: Comma-separated glob patterns to ignore (e.g.,__pycache__,*.meta)--select=PATTERNS: Comma-separated glob patterns to select (e.g.,*.py,*.md)--strip-comments: Remove single-line comments--remove-docstrings: Remove Python docstrings--yes: Skip confirmation and begin watching immediately-v, --verbose: Increase output verbosity (can be used multiple times)-q, --quiet: Suppress non-error output
Keyboard Controls
| Key | Action |
|---|---|
| Space/Enter | Toggle selection of current node |
| a | Select all files |
| n | Deselect all files |
| r | Rebuild the bundle |
| c | Copy bundle to clipboard |
| h | Show/hide help screen |
| q | Quit the application |
Mouse Controls
- Click directories: Expand/collapse directories
- Click files: Toggle file selection
Examples
Basic Usage:
codebundler ./my-project output.txt
Select only Python and Markdown files:
codebundler ./my-project output.txt --select="*.py,*.md"
Ignore specific directories and strip comments:
codebundler ./my-project output.txt --ignore="node_modules,__pycache__" --strip-comments
Features
- Interactive File Selection: Select files with keyboard or mouse
- Empty Directory Support: Select/deselect empty directories
- Multi-select: Select multiple files across the project
- Transformation: Optionally remove comments and docstrings
- Live Monitoring: Automatically rebuild when selected files change
- Clipboard Integration: Copy output directly to clipboard
- Format Awareness: Maintains correct comment prefixes based on file extensions
- In-app Help: Press 'h' to view all keyboard shortcuts
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE file for details.
Metadata
Release files for codebundler 0.1.2
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 |
|---|---|---|---|---|
| codebundler-0.1.2.tar.gz | 23.6 kB | Without provenance | Details for codebundler-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codebundler-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for codebundler-0.1.2-py3-none-any.whl |
Total release size: 48.0 kB
Release files / codebundler-0.1.2.tar.gz
| Download URL | codebundler-0.1.2.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aeb6929f855e7330dd087f7481fb1dae648da2ae4e911a2cacae4f28dcdb2288
|
|
BLAKE2b-256 checksum How to use checksums |
d3500c9f8d3e4a6dbf8a5cdb37231ba32cc95125cc688484a2b1d5951dfc262e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / codebundler-0.1.2-py3-none-any.whl
| Download URL | codebundler-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1a8b7cd6e7fcabc0e9ca27e1e2455a607efda79ede4f331a3d4ef76c7baa117
|
|
BLAKE2b-256 checksum How to use checksums |
203f9c2d68494776e85e0b1f2fd3f7ce807a4e0feaf2b4e8d7476e9eb23ccde8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for codebundler 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.