Skip to main content

Load GitHub repository contents as LLM fragments

Project description

llm-fragments-github

PyPI Changelog Tests License

Load GitHub repository contents as fragments

Installation

Install this plugin in the same environment as LLM.

llm install llm-fragments-github

Usage

Use -f github:user/repo to include every text file from the specified GitHub repo as a fragment. For example:

llm -f github:simonw/files-to-prompt 'suggest new features for this tool'

Ue -f issue:user/repo/number to include the combined Markdown text of a specific issue. For example:

llm -f https://raw.githubusercontent.com/simonw/llm-fragments-github/refs/tags/0.1/llm_fragments_github.py \
  -f issue:simonw/llm-fragments-github/3 \
  'Propose an implementation for this issue'

The issue: prefix can also accept a URL to a GitHub issue, for example:

llm -f issue:https://github.com/simonw/llm-fragments-github/issues/3 \
  'muse on this a bit'

Set an API token in the environment variable GITHUB_TOKEN to access private repositories or increase your rate limit.

Use -f pr:user/repo/number to load the Markdown text and diff for a specified pull request. This also accepts a URL to a pull request.

llm -f pr:simonw/llm-fragments-github/9 'code review'

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-fragments-github
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

python -m pytest

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

llm_fragments_github-0.3.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

llm_fragments_github-0.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file llm_fragments_github-0.3.tar.gz.

File metadata

  • Download URL: llm_fragments_github-0.3.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_fragments_github-0.3.tar.gz
Algorithm Hash digest
SHA256 ae2134161a856464367ab86c7998b6b0657699a07169d9dd5cf516dee9301649
MD5 57e26e37a8d827ae9b95108deebe9d42
BLAKE2b-256 9b64a639a092e8af43fa9cece6b02b97666e1812c3efdac07a71818bf4f5c9c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_github-0.3.tar.gz:

Publisher: publish.yml on simonw/llm-fragments-github

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_fragments_github-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_fragments_github-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8242753acb9c7b063aea8f5f1bf99ee590b2b14ecf7ed7a2c3aa26517d67bde
MD5 54832fa025cceb2a395cf047bb7e04be
BLAKE2b-256 09c96f50186fcc528273e903456a48686158b2132bcf0e6fbc88518dcc09f41f

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_github-0.3-py3-none-any.whl:

Publisher: publish.yml on simonw/llm-fragments-github

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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