A utility to convert a Git repository into a text representation.
Project description
gpt-repository-loader
Installation
pip install gpt-repository-loader
Linux Requirements
On Linux, ensure that you have xclip
installed for clipboard functionality. You can install it using:
sudo apt-get install xclip # Debian/Ubuntu
sudo yum install xclip # Fedora/CentOS
How to use?
Go to the directory you are interested in, run
gpt-repository-loader . -c
This will copy ALL the git tracked content in the repository on clipboard and then you can use Gemini/Claude/ChatGPT to ask questions on it.
Available Command Line Flags
repo_path
: (Required) Path to the Git repository.-p
,--preamble
: Path to a preamble file to include before the repository content.-c
,--copy
: Copies the repository contents to the clipboard. If not provided, the output will be written to a file namedoutput.txt
in the current directory.-i
,--ignore
: Additional file paths or patterns to ignore. You can specify multiple paths or patterns.--include-js-ts-config
: Include JavaScript and TypeScript config files (which are ignored by default).-l
,--list
: List all files with their token counts.
Examples
# Ignore specific files or directories
gpt-repository-loader . -c -i "*.log" "temp_files/" "config.ini"
# Include JS/TS config files and ignore a specific directory
gpt-repository-loader . --include-js-ts-config -i "node_modules/"
# List all files with their token counts
gpt-repository-loader . -l
What to use it for?
- Build a README for codebases
- Work with Legacy code
- Debug issues
Gemini's 1M context window is REALLLY big, and it under utilized.
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
Close
Hashes for gpt-repository-loader-0.9.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08947135aa548d06a98cc391509d7a9675d7b8b1a553f68463f72095d9265a02 |
|
MD5 | 75d8df90073f1a93546450b1e50b42a0 |
|
BLAKE2b-256 | 9bd8d0359efb2e93445618c1b8aacc7aabf5c5d5e1d99f318e9f374969849665 |
Close
Hashes for gpt_repository_loader-0.9.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef1b449f6462a1fd73dc6b651a7e63c12ffc8d0ed0dff1220caa0f8403b788d3 |
|
MD5 | d8d83a65e1bf8a441b4454bc0fb658f1 |
|
BLAKE2b-256 | be0b5679edc8b4509229e2a6e99a594cd2b22e7f6933721f7c50c74fadc10882 |