Terminal tool to prep codebases for LLMs
Project description
🛠️ Terminal tool to prep your codebase (whole or partial) for LLMs, clean, compress, and convert it into prompt-ready text! 🚀📦
📥 Installation
Install the package via pip:
pip install gitex
📋 Clipboard support (Linux)
Ubuntu/Debian
# Wayland (recommended):
sudo apt install -y wl-clipboard
# X11 alternatives:
sudo apt install -y xclip
# or
sudo apt install -y xsel
▶️ Usage
gitex helps you bundle your codebase into a single, LLM-friendly text format. It respects your .gitignore by default and provides several ways to filter content.
Basic Examples
gitex . # Process current directory and copy to clipboard
gitex -i # Launch the interactive TUI to pick specific files/folders
gitex /path/to/repo --force # Force process a directory even if it's not a Git repo
gitex . --no-files # Render the directory tree ONLY (omit file contents)
Advanced Filtering & Combinations
gitex . -a # Include hidden files (those starting with .)
gitex . -g # Ignore .gitignore rules (process everything)
gitex . -ag # Combine: Show hidden files AND ignore .gitignore
gitex . -iv # Interactive selection with verbose output to terminal
gitex . -v # Verbose: Print to terminal AND copy to clipboard
gitex . > codebase.txt # Redirect output to a text file
Intelligence Features
gitex . -ds # Extract only Python docstrings and signatures
gitex . --map-dependencies # Analyze code relationships (imports, inheritance, calls)
🙏 Acknowledgments
This project draws inspiration from repo2txt by @abinthomasonline.
Big thanks for laying the groundwork for converting repositories into prompt-ready text!
📚 Click to expand: Docstring Extraction Details
Python Docstring Extraction
Extract and format docstrings and function/class signatures from Python files, inspired by Sphinx. Perfect for providing high-level context to LLMs without implementation noise.
- Extract from all Python files:
gitex . --extract-docstrings - Extract from a specific class or function:
gitex . --extract-docstrings gitex.renderer.Renderer - Include classes/functions even if they have no docstrings:
gitex . --extract-docstrings --include-empty-classes
🔗 Click to expand: Dependency & Relationship Mapping Details
Architecture Analysis
Analyze and visualize code architecture, dependencies, and relationships in your codebase. Essential for understanding how components interact before diving into implementation details.
- Full analysis:
gitex . --map-dependencies - Focus on imports:
gitex . --map-dependencies imports - Focus on inheritance:
gitex . --map-dependencies inheritance - Focus on function calls:
gitex . --map-dependencies calls
What it maps:
- 📦 Import dependencies - Which files depend on which other files.
- 🏗️ Class inheritance hierarchies - Parent-child relationships between classes.
- 🔄 Function call relationships - Which functions call which other functions.
- 📊 Summary statistics - Overview of codebase complexity and external dependencies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitex-0.2.19.tar.gz.
File metadata
- Download URL: gitex-0.2.19.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0552a1f5ccf7e2c4897ee81f8be4ae667c8b35c52b8a7c15df037aea78fed40e
|
|
| MD5 |
4992891b69dc65c6884d4a72eaa0899c
|
|
| BLAKE2b-256 |
73f08818a5ad1cdaf4fdc7dca140475e46972b5e50db0a51af422f7cc7cace7d
|
File details
Details for the file gitex-0.2.19-py3-none-any.whl.
File metadata
- Download URL: gitex-0.2.19-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27388aac8ba1249447cb1864da62204b0154faa648139454f4084b060becf330
|
|
| MD5 |
bf6aac5ad58b44be22d244a91fef8d3b
|
|
| BLAKE2b-256 |
a40a39a26112a099437020bf165b547b32d45dfad6ad342025e273cb5d44a4ac
|