Pack Git Repository into a text file for use in LLM
Project description
Repo-Context-Packager
Pack Git Repository into a text file for use in LLM
Release 0.1
Instruction for Windows Users:
Step 1
Check if Python is installed in the system by the following command:
python --version
or
py --version
If Python is not installed, visit https://www.python.org/ -> Downlaods -> Windows,
and choose the latest Stable Releases to download and install.
Notes: make sure that the installation path of Python is in Windows PATH
Step 1.1
Download requirement.txt from the repository.
Install dependencies by the following commands:
py -m pip install -r requirement.txt
Step 2
Download pack-repo.py in src directory to your local machine
Step 3
Run the script by the following command:
python pack-repo.py repo-path [-r [DAYS]] [-o] [output-file-name]
or
py pack-repo.py repo-path [-r [DAYS]] [-o] [output-file-name]
Details for arguments and options are listed below:
[-h] [--version] [--output [OUTPUT]] [--include INCLUDE] [--all] [--recent [RECENT]] [--line-number] [--dirs-only] paths [paths ...]
| positional arguments | description |
|---|---|
| paths | Path to the repository / files in the same repository |
| options | description |
|---|---|
| -h, --help | show this help message and exit |
| --version, -v | show program's version number and exit |
| --output, -o [OUTPUT] | Output filename |
| --include, -i | INCLUDE Extensions to be included, separated by ",", e.g. ".js,.txt" |
| --all, -a | Show all files including hidden files (files that start with ".") |
| --recent, -r [RECENT] | Only include files modified within the last 7 days |
| --line-number, -l | Include line number when displaying file content output |
| --dirs-only, -d | Show only directory structure tree without file contents |
Instruction for Mac/Linux Users:
Step 1
Check if Python is installed in the system by the following command:
python3 --version
If Python is not installed, visit https://www.python.org/ -> Downlaods -> macOS,
and choose the latest Stable Releases to download and install.
Alternatively, user can check if brew is available using command brew --version, and use brew to install Python with the following command:
brew install python
Step 1.1
Download requirement.txt from the repository.
Install dependencies by the following commands:
python3 -m pip install -r requirement.txt
Step 2
Download pack-repo.py in src directory to your local machine
Step 3
Run the script by the following command:
python3 pack-repo.py repo-path [-r [DAYS]] [-o] [output-file-name]
Details for arguments and options are listed below:
[-h] [--version] [--output [OUTPUT]] [--include INCLUDE] [--all] [--recent [RECENT]] [--line-number] [--dirs-only] paths [paths ...]
| positional arguments | description |
|---|---|
| paths | Path to the repository / files in the same repository |
| options | description |
|---|---|
| -h, --help | show this help message and exit |
| --version, -v | show program's version number and exit |
| --output, -o [OUTPUT] | Output filename |
| --include, -i | INCLUDE Extensions to be included, separated by ",", e.g. ".js,.txt" |
| --all, -a | Show all files including hidden files (files that start with ".") |
| --recent, -r [RECENT] | Only include files modified within the last 7 days |
| --line-number, -l | Include line number when displaying file content output |
| --dirs-only, -d | Show only directory structure tree without file contents |
.TOML Configuration File
You can use a .pack-repo.toml file in the same directory of pack-repo.py to set default options for this script.
To get started, go to the root directory of this repo, and copy the template file to src/ by the following command:
On Mac:
cp .pack-repo.template.toml src/.pack-repo.toml
On Windows:
copy .pack-repo.template.toml src\.pack-repo.toml
Then, open and edit .pack-repo.toml to set your preferred defaults.
IMPORTANT: Command-line arguments will always override any settings from the .pack-repo.toml file.
License:
This project is licensed under BSD 2-Clause License.
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 repo_context_packager_denisc96-1.0.0.tar.gz.
File metadata
- Download URL: repo_context_packager_denisc96-1.0.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c033a22f524bdf05b6cc77bd32a359c0ee2c0ab07b8a48fc417ad6a1960b4b6
|
|
| MD5 |
84b78935b2c0b308d9357b9ee5726a5a
|
|
| BLAKE2b-256 |
cb638c5d826809fe7612e41036642d841ca8d698b3a0b8c5eff84c407e38f6c7
|
File details
Details for the file repo_context_packager_denisc96-1.0.0-py3-none-any.whl.
File metadata
- Download URL: repo_context_packager_denisc96-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58f06ec81e80a37bca021d84156de810f19dc61a70046a8d57fb94b7e499a977
|
|
| MD5 |
285798a44cd9b5b9ce10245bdad6f185
|
|
| BLAKE2b-256 |
335086825224c8bcad4ca90ae4f2e1d352f9be46e3a4f1d6777cf952187c4e8f
|