Skip to content

Desperadus/repo2prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repo2prompt

repo2prompt is a command-line tool designed to fetch all files from a specified GitHub repository, allowing for selective file ignoring based on patterns. This tool is for users looking to quickly gather repository contents without manually cloning, downloading or copying each file.

Installation

repo2prompt can be installed directly from this GitHub repository using pip. To install the latest version, run the following command:

pip install git+https://github.com/Desperadus/repo2prompt

Ensure you have git installed on your system and that it is accessible from your command line or terminal. Python 3.8+ is required to run the tool.

Usage

After installation, repo2prompt can be run from the command line or terminal. The basic syntax for the tool is as follows:

repo2prompt <GitHub Repository URL> [options]

Options

  • -t, --token: Specify a GitHub API token to avoid rate limits. Highly recommended for repositories with many files or frequent accesses. When unspecified it tries to take the value from enviromental variable GITHUB_PRIVATE_TOKEN.
  • -i, --ignore: Specify regex patterns for files to ignore (e.g., *.md or *.txt). Can be used multiple times to specify multiple patterns. LICENSE and .lock files are ignored by default.
  • l, --look: Look only for these patterns. Can be used multiple times to specify multiple patterns. (e.g., *.py or *.json)
  • d. --delay Specify delay between requests to GitHub API in seconds. Default is 0.1 seconds.

Example

To fetch all files from this repository, for example, ignoring Markdown files, you might use:

repo2prompt https://github.com/Desperadus/repo2prompt -i "*.md"

Contributing

Contributions to repo2prompt are welcome! Whether it's reporting a bug, discussing improvements, or contributing code.

Please feel free to report issues or open pull requests on my GitHub repository.

Or contact me at my email [email protected].

License

repo2prompt is released under the GPL-3.0 License. See the LICENSE file in the GitHub repository for more details.

About

Turn files inside of a GitHub repo to prompt for LLM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages