No project description provided
Project description
gh-llm
CLI tooling for LLM-first GitHub reading and review workflows.
Core Goal
gh-llm is primarily built to help an LLM quickly capture the same key context a human reviewer would get on GitHub Web, and provide actionable next commands at exactly the right places.
Key Ideas
- Timeline-first rendering: merge comments, reviews, commits, labels, references, force-push, and state changes into one ordered stream that mirrors GitHub Web reading.
- Real cursor pagination:
use GitHub GraphQL
first/afterandlast/before, so page expansion always pulls real server-side data instead of fake local slicing. - Progressive context loading: show first + last page first (high-signal summary), then expand hidden pages/events only when needed.
- Action-oriented output:
place ready-to-run
gh/gh-llmcommands at decision points (expand, view detail, reply, resolve, review). - Stateless interaction model: no fragile local session state required between commands.
Requirements
- Python
3.14+ ghinstalled and authenticated (gh auth status)
Install
As CLI (recommended)
uv tool install gh-llm
gh-llm --help
As gh extension
gh extension install ShigureLab/gh-llm
gh llm --help
The extension entrypoint forwards to local repository path via uv run --project <extension_repo_path> gh-llm ....
gh llm ... and gh-llm ... are equivalent command surfaces.
Quick Start
PR Reading
# Show first + last timeline pages with actionable hints
gh-llm pr view 77900 --repo PaddlePaddle/Paddle
gh llm pr view 77900 --repo PaddlePaddle/Paddle
# Expand one hidden timeline page
gh-llm pr timeline-expand 2 --pr 77900 --repo PaddlePaddle/Paddle
# Auto-expand folded content in default/timeline view
gh-llm pr view 77900 --repo PaddlePaddle/Paddle --expand resolved,hidden
gh-llm pr timeline-expand 2 --pr 77900 --repo PaddlePaddle/Paddle --expand all
# Show full content for one event index
gh-llm pr event 15 --pr 77900 --repo PaddlePaddle/Paddle
# Expand resolved review details in batch
gh-llm pr review-expand PRR_xxx,PRR_yyy --pr 77900 --repo PaddlePaddle/Paddle
# Checks
gh-llm pr checks --pr 77900 --repo PaddlePaddle/Paddle
gh-llm pr checks --pr 77900 --repo PaddlePaddle/Paddle --all
Issue Reading
gh-llm issue view 77924 --repo PaddlePaddle/Paddle
gh-llm issue timeline-expand 2 --issue 77924 --repo PaddlePaddle/Paddle
gh-llm issue event 6 --issue 77924 --repo PaddlePaddle/Paddle
gh-llm issue view 77924 --repo PaddlePaddle/Paddle --expand hidden,details
--expand values:
- PR:
resolved,hidden,details,all - Issue:
hidden,details,all - Supports comma-separated values and repeated flags.
Comment / Thread Actions
# Edit comment
gh-llm pr comment-edit IC_xxx --body '<new_body>' --pr 77900 --repo PaddlePaddle/Paddle
gh-llm issue comment-edit IC_xxx --body '<new_body>' --issue 77924 --repo PaddlePaddle/Paddle
# Reply / resolve / unresolve review thread
gh-llm pr thread-reply PRRT_xxx --body '<reply>' --pr 77900 --repo PaddlePaddle/Paddle
gh-llm pr thread-resolve PRRT_xxx --pr 77900 --repo PaddlePaddle/Paddle
gh-llm pr thread-unresolve PRRT_xxx --pr 77900 --repo PaddlePaddle/Paddle
PR Review Workflow
1) Start from diff hunks
gh-llm pr review-start --pr 77938 --repo PaddlePaddle/Paddle
It prints per-hunk anchor lines and ready-to-run comment/suggestion commands.
2) Add inline comment
gh-llm pr review-comment \
--path 'paddle/phi/api/include/compat/torch/library.h' \
--line 106 \
--side RIGHT \
--body 'Please add a regression test for duplicate keyword arguments.' \
--pr 77938 --repo PaddlePaddle/Paddle
3) Add inline suggestion
gh-llm pr review-suggest \
--path 'path/to/file' \
--line 123 \
--side RIGHT \
--body 'Suggested update' \
--suggestion 'replacement_code_here' \
--pr 77938 --repo PaddlePaddle/Paddle
4) Submit review
gh-llm pr review-submit \
--event COMMENT \
--body 'Overall feedback...' \
--pr 77938 --repo PaddlePaddle/Paddle
Submit behavior:
- If you already have a pending review on this PR,
review-submitsubmits that pending review. - Otherwise, it creates and submits a new review.
This supports the normal flow where one review contains multiple inline comments.
Render Conventions
- PR/Issue metadata is rendered as frontmatter.
- PR description uses
<pr_description>...</pr_description>. - Issue description uses
<issue_description>...</issue_description>. - Comment body uses
<comment>...</comment>to avoid markdown fence ambiguity. - Hidden timeline sections are separated by
---and include expand commands.
Development
uv run ruff check
uv run pyright
uv run pytest -q
License
MIT
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 gh_llm-0.1.3.tar.gz.
File metadata
- Download URL: gh_llm-0.1.3.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75c0c8bf27dd06da7e5e6ce87215afc00ef09454231c676576cebdfcf19a9e8f
|
|
| MD5 |
6e6b0850569ef55b1e5da46acb7b675f
|
|
| BLAKE2b-256 |
6cdbb9bd8b3575fcf11308e6ce955627d26a5b88eed6aa56f7d8b459f3ef6338
|
Provenance
The following attestation bundles were made for gh_llm-0.1.3.tar.gz:
Publisher:
release.yml on ShigureLab/gh-llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_llm-0.1.3.tar.gz -
Subject digest:
75c0c8bf27dd06da7e5e6ce87215afc00ef09454231c676576cebdfcf19a9e8f - Sigstore transparency entry: 962502407
- Sigstore integration time:
-
Permalink:
ShigureLab/gh-llm@2a16919f0b7e910b57fb7957653b63fb183f0e64 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ShigureLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2a16919f0b7e910b57fb7957653b63fb183f0e64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gh_llm-0.1.3-py3-none-any.whl.
File metadata
- Download URL: gh_llm-0.1.3-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b54837ceeda95418276fabcc9f535932f7660b148976fd013bb9f8b650d9f85
|
|
| MD5 |
12728686786abc1e4292be54e85db29e
|
|
| BLAKE2b-256 |
2076000192bbb392b5c3b372da2919a2b49ad504432c84a5b9fd3ac36672c91e
|
Provenance
The following attestation bundles were made for gh_llm-0.1.3-py3-none-any.whl:
Publisher:
release.yml on ShigureLab/gh-llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_llm-0.1.3-py3-none-any.whl -
Subject digest:
1b54837ceeda95418276fabcc9f535932f7660b148976fd013bb9f8b650d9f85 - Sigstore transparency entry: 962502414
- Sigstore integration time:
-
Permalink:
ShigureLab/gh-llm@2a16919f0b7e910b57fb7957653b63fb183f0e64 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ShigureLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2a16919f0b7e910b57fb7957653b63fb183f0e64 -
Trigger Event:
push
-
Statement type: