llm-fragments-github
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'
Both issue: and pr: will attempt to expand any URLs to code blocks to include that code as part of the exported Markdown. #12
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
Release files for llm-fragments-github 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_fragments_github-0.4.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_fragments_github-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / llm_fragments_github-0.4.tar.gz
| Download URL | llm_fragments_github-0.4.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd4a3a8e7ed9a40645ade3c4b10fd2f1566b46a49b5e0f35e417ecf38a7d6c5f
|
|
BLAKE2b-256 checksum How to use checksums |
7da3e141d23655ae243c81c2ce3b8617086a450d67ac6143cb868f6f3096bc55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2025.
Transparency logRelease files / llm_fragments_github-0.4-py3-none-any.whl
| Download URL | llm_fragments_github-0.4-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
679fe037481f2091b31754b652efe655a13d4456cb25fc4a99616819e7f89b39
|
|
BLAKE2b-256 checksum How to use checksums |
dfaa2f2c344059fadcf5175a8663704bc0889aadc78e88a2b581ba80de3b5f65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2025.
Transparency log