Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_context_packager_denisc96-1.0.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file repo_context_packager_denisc96-1.0.0.tar.gz.

File metadata

File hashes

Hashes for repo_context_packager_denisc96-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3c033a22f524bdf05b6cc77bd32a359c0ee2c0ab07b8a48fc417ad6a1960b4b6
MD5 84b78935b2c0b308d9357b9ee5726a5a
BLAKE2b-256 cb638c5d826809fe7612e41036642d841ca8d698b3a0b8c5eff84c407e38f6c7

See more details on using hashes here.

File details

Details for the file repo_context_packager_denisc96-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for repo_context_packager_denisc96-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58f06ec81e80a37bca021d84156de810f19dc61a70046a8d57fb94b7e499a977
MD5 285798a44cd9b5b9ce10245bdad6f185
BLAKE2b-256 335086825224c8bcad4ca90ae4f2e1d352f9be46e3a4f1d6777cf952187c4e8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page