| Crates.io | gh-context |
| lib.rs | gh-context |
| version | 0.1.3 |
| created_at | 2026-01-18 19:29:48.075546+00 |
| updated_at | 2026-01-21 22:07:51.690078+00 |
| description | A CLI tool for fetching GitHub Issue and Pull Request context. |
| homepage | |
| repository | https://github.com/hdcodedev/gh-context |
| max_upload_size | |
| id | 2052926 |
| size | 6,212,090 |
A CLI tool to fetch and format GitHub Issues and Pull Requests context, ready for use in LLM prompts.
This tool requires the GitHub CLI (gh) to be installed and authenticated.
# macOS
brew install gh
# Authenticate
gh auth login
To install from crates.io:
cargo install gh-context
To install from source (locally):
cargo install --path .
Once installed, you can use gh-context directly:
gh-context <input> [OPTIONS]
You can run the tool without installing it using cargo run. Note the -- separator used to pass arguments to the CLI.
cargo run -- <input> [OPTIONS]
Fetch context for a PR (creates repo-issue-123/repo-issue-123.md context by default, where repo is the repository name):
gh-context owner/repo#123
Bulk fetch open issues for a repo (one file per issue, first page by default):
gh-context https://github.com/openai/codex/issues --bulk
Bulk fetch multiple pages:
gh-context openai/codex --bulk --pages 3 --per-page 50
Fetch context for an issue and copy to clipboard:
gh-context https://github.com/owner/repo/issues/123 --clip
Save as JSON (prints to stdout):
gh-context owner/repo#123 --format json
Using cargo run:
cargo run -- https://github.com/hdcodedev/resume256/issues/48
--format <json|md>: Output format (default: md)--out <path>: Write output to file (single) or directory (bulk)--clip: Copy output to clipboard (macOS only)--issue: Treat input as issue (disambiguate shorthand)--pr: Treat input as PR (disambiguate shorthand)--bulk: Fetch multiple issues for a repo (list mode)--state <open|closed|all>: Issue state filter for bulk mode (default: open)--per-page <n>: Items per page for bulk mode (default: 30)--pages <n>: Number of pages to fetch in bulk mode (default: 1)