| Crates.io | repo2text |
| lib.rs | repo2text |
| version | 1.0.1 |
| created_at | 2024-12-18 19:42:13.265364+00 |
| updated_at | 2024-12-19 18:59:55.652132+00 |
| description | A Rust CLI tool to extract and save repository file contents into a text file. |
| homepage | https://github.com/vicentedpsantos/repo2text |
| repository | https://github.com/vicentedpsantos/repo2text |
| max_upload_size | |
| id | 1488380 |
| size | 26,446 |
repo2text is a Rust CLI tool designed to transform the contents of a Git repository into a structured text file. This is particularly useful for uploading repository data into AI systems (like ChatGPT) for analysis, summarization, or debugging purposes.
.txt file.Install the tool using cargo:
cargo install repo2text
Or clone the repository and build from source:
git clone https://github.com/vicentedpsantos/repo2text.git
cd repo2text
cargo build --release
Run repo2text with the following options:
repo2text --repo <REPO_PATH> --output <OUTPUT_FILE> --excluding <EXCLUDED_DIR>
--repo: required. Path to the root of the Git repository.--output: required. Path to the output .txt file where the repository contents will be saved.--excluding: optional. Directory to exclude from the traversal. Can be used multiple times.repo2text --repo ~/projects/faktur --output faktur.txt
repo2text --repo ~/projects/faktur \
--output ~/temp/faktur.txt \
--excluding ~/projects/faktur/spec/ \
--excluding ~/projects/faktur/.git/
This command will:
~/projects/faktur.faktur.txt.The tool generates a .txt file where:
FILE_PATH line indicating its location in the repository. ```<language> ... ```).--- for easy parsing.The structured format makes it easy to share your repository with AI systems for:
Simply copy and paste sections of the output .txt file into your AI chat or upload the entire file if supported.
This project is licensed under the MIT License.