Skip to main content

Easier open source contribution process for newcomers

Stop digging through stale GitHub issues. gh-issue-lens finds unassigned, beginner-friendly open source issues in any repository and prepares them for LLM analysis in seconds. It bypasses API rate limits by grabbing issues, linked Pull Requests, assignees, and non-bot comments in a single network pass.

If you would like to contribute to gh-issue-lens, which something I really appreciate, checkout CONTRIBUTING.md.

How to use it?

Option 1: Install from PyPI

pip install gh-issue-lens

Export your GitHub Personal Access Token:

First of all, create your personal github token from your github account then use it.

export GITHUB_TOKEN="your_personal_access_token"

Fetch issues:

gh-issue-lens kubernetes kubernetes -d 200

Filter by labels:

gh-issue-lens kubernetes kubernetes -l "good first issue" "help wanted" -d 50

And for more commands, you can see the sections below. The guidelines are the same. The only difference is to use gh-issue-lens directly instead of python3 cli.py.

Option 2: Build it manually

Clone the repo:

git clone https://github.com/MohamedM216/gh-issue-lens.git

Install requirements:

pip3 install requests

Export your GitHub Personal Access Token:

First of all, create your personal github token from your github account then use it, see how to setup your .env file.

Verify it works:

cd src/gh_issue_lens/
python3 cli.py --help

Fetch 100 issues from a repository:

100 issues is the default depth you can change it using the -d option.

python3 cli.py kubernetes kubernetes

Filter by up to 5 labels (ORed) and set a depth limit:

This fetches a maximum of 50 issues that have EITHER the "good first issue", "help wanted", or "bug" label.

python3 cli.py kubernetes kubernetes -l "good first issue" "help wanted" "bug" -d 50

Save to a custom JSON file:

If you want to use a custom name for the output file, you can run:

python3 cli.py kubernetes kubernetes -l "feature" -d 10 -o custom_dataset.json

Auto-labeled output files:

When you don't pass -o, every command gets its own file, named after the command that produced it and the time it ran:

{repo}_{labels}_d{depth}[_no-open-prs]_{signature}_{UTC timestamp}.jsonl

Example: running -l "good first issue" "help wanted" -d 50 produces something like:

kubernetes_good-first-issue_help-wanted_d50_3f9a2b1c4d5e_20261028T143022Z.jsonl
  • Command part (labels, depth, flags): tells you exactly which query produced the dataset.
  • Signature: the same 12-char hash used by checkpointing, so a resumed run always finds its file.
  • Timestamp (UTC): re-running the same command later creates a new file instead of overwriting the previous export.

If you prefer to manage filenames yourself, pass -o and the behavior stays exactly as before.

Incremental Saving & Resumability (Checkpointing):

When scraping massive repositories (like Kubernetes), hitting GitHub's API rate limits or network timeouts is common. You no longer have to worry about losing your progress!

  • JSONL Format: Issues are now saved line-by-line instantly as they are fetched, ensuring zero data loss.
  • Auto-Resume: The tool creates a hidden .checkpoint file tracking your progress. If the script crashes or you stop it, simply run the exact same command again. It will automatically resume from the exact page it left off, saving your API budget and time. The checkpoint stores a signature of the options that affect results (labels, depth, filters, cache mode, output file). If you re-run with different options after a crash, gh-issue-lens detects the mismatch, discards the old checkpoint and starts clean; no silently mixed result sets. Resume also keeps writing to the same auto-generated file, so a single interrupted run never ends up split across two files.

Exclude issues with open PRs:

python3 cli.py kubernetes kubernetes --exclude-open-prs

Is this issue actually available? (Stale PR detection)

An issue with a fresh open PR is probably taken. An issue whose only PR was abandoned months ago, or closed without merging is usually still up for grabs.

Every exported issue now includes an availability field:

  • likely_taken: a fresh open PR exists (updated within --stale-pr-days)
  • stale_pr_open: open PRs exist but all are stale, usually still approachable
  • merged_pr_linked: a linked PR was merged
  • pr_closed_unmerged: a previous attempt failed, the issue is open again
  • no_linked_pr: nobody has opened a PR yet
gh-issue-lens kubernetes kubernetes --stale-pr-days 60

Note: --exclude-open-prs now skips only issues with a fresh open PR, so abandoned-PR issues are no longer hidden from you.

SQLite caching:

gh-issue-lens can cache already-exported issues in a local SQLite database. This prevents duplicate issues from being written again when you run the same export multiple times.

Enable caching:

python3 cli.py kubernetes kubernetes -d 200 --cache

By default, the cache is stored in .gh_issue_lens_cache.db. Use a custom cache database:

python3 cli.py kubernetes kubernetes -d 200 --cache --cache-db my_cache.db

Run again with caching enabled. Issues that were already exported in previous runs will be skipped. You can also enable early stopping when the tool keeps finding only cached issues:

python3 cli.py kubernetes kubernetes -d 200 --cache --cache-stop

This is useful when re-running the tool against the same repository and you only want newly discovered issues. To reset the cache, delete the cache file:

rm .gh_issue_lens_cache.db

Caching is different from checkpointing: checkpointing helps resume a crashed or interrupted run, while caching helps avoid exporting the same issues again across separate runs.

LLM comment summarization (smaller exports for LLM analysis):

Comment threads are usually the biggest part of an export and the main cause of LLM context-window bloat. With --summarize-comments, gh-issue-lens runs each issue's comment thread through an LLM and exports a compact summary instead of the raw comments. Nothing is character-cut: the LLM condenses the discussion so the context survives while the file stays small.

gh-issue-lens kubernetes kubernetes -d 50 --summarize-comments

Summarized issues carry comments_summary, comments_count and comments_summarized: true instead of the raw comments array.

The summarizer is embedded in the package (plain HTTP, no SDK) and talks to any OpenAI-compatible endpoint:

  • GH_ISSUE_LENS_LLM_BASE_URL — default https://api.openai.com/v1
  • GH_ISSUE_LENS_LLM_API_KEY — not needed for local servers
  • GH_ISSUE_LENS_LLM_MODEL — default gpt-4o-mini

Free and private with a local model (Ollama):

GH_ISSUE_LENS_LLM_BASE_URL="http://127.0.0.1:11434/v1"
GH_ISSUE_LENS_LLM_MODEL="llama3.2"
gh-issue-lens kubernetes kubernetes -d 50 --summarize-comments

If the LLM call keeps failing, the run stops cleanly and the checkpoint is saved, so an export file never mixes raw and summarized issues.

Setup your .env file

gh-issue-lens relies on external APIs (GitHub and LLMs) which require authentication. To keep your secrets safe and out of your terminal history, the tool automatically loads a local .env file.

In the root of your project (or the directory where you run the tool), create a file named .env:

touch .env

Open .env and add your credentials. Here is the complete template:

# --- GitHub Authentication (Required for ALL commands) ---
GITHUB_TOKEN=ghp_your_github_personal_access_token_here

# --- LLM Configuration (Required ONLY if using --summarize-comments) ---

# Provider options: nvidia, openai, ollama
GH_ISSUE_LENS_LLM_PROVIDER=nvidia

# Your API key for the chosen provider (Not needed for local Ollama)
GH_ISSUE_LENS_LLM_API_KEY=nvapi_your_nvidia_api_key_here

# Optional: Override the default model
# GH_ISSUE_LENS_LLM_MODEL=nvidia/nemotron-3.5-lightning-30b-a3b

# Optional: Override the base URL (useful for custom endpoints)
# GH_ISSUE_LENS_LLM_BASE_URL=https://integrate.api.nvidia.com/v1

Compare repositories: which community should you start with?

gh-issue-lens stats answers the question every beginner asks first: which repo should I even try?

gh-issue-lens stats kubernetes/kubernetes pandas-dev/pandas

Analyze difficulty using the embedded LLM

gh-issue-lens stats kubernetes/kubernetes pandas-dev/pandas --analyze-difficulty

Or from a file (one owner/repo per line, # comments allowed):

gh-issue-lens stats --repos-file repos.txt

Three output layers:

  • Terminal (default): comparison table + bar chart, plus a 0-100 beginner score.
  • HTML report: --html report.html writes a self-contained page with bar charts.
  • Raw JSON for LLMs: --json stats.json, or --json - to print to stdout and pipe anywhere.

What the numbers mean

  • VERDICT (decide in 2 seconds): 🌱 GREAT (≥75) · 👍 GOOD (≥55) · ⚠️ MIXED (≥35) · 🧊 COLD (<35).
  • beginner score (0-100): responsiveness (30) + beginner-issue funnel (20) + answered-issue share (15) + freshness (15) + merged-PR pace per week (12) + push recency (8).
    • Note: If --analyze-difficulty is used, the 20 funnel points are split into 10 points for quantity and 10 points for LLM-verified quality.
  • DIFF: median LLM-scored difficulty (1-5) of the 10 most recent beginner issues. Only shown when --analyze-difficulty is passed.
  • REPLY: median time until the first non-bot, non-author comment on the 100 most recent open issues.
  • UNANSW / STALE: share of those 100 issues with no human reply / untouched for --stale-days (default 180).
  • PR/WK: pull requests merged in the last 7 days (the monthly count is in the JSON and HTML report).
  • The HTML report (--html) adds a summary per repo: how fast people answer, how many beginner issues are open, and how active the merge pace is.

What's next?

The generated JSON file is suitable to be used as context for Large Language Models (like Gemini, Claude, or ChatGPT). Use --summarize-comments for an even more compact file. You can upload the output file to an LLM and use targeted prompts to find the perfect issue to work on.

Example Prompts to try:

"I am a newcomer to this repository. Based on the attached JSON, find an issue that is easy to implement, has no active PRs, and doesn't have a long, debated comment history."

"Filter these issues and list only the ones related to [backend / frontend / database / specific component]."

"Read the comments on these issues. Which maintainers seem the most responsive and welcoming to beginners? Point me to issues authored or reviewed by them."

"Summarize the technical requirements for issue #123 based on its description and comment thread. What files should I look at first?"

Don't forget to STAR the repository :)

Happy hacking!

Metadata

Release files for gh-issue-lens 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-issue-lens 0.3.0
File Size Uploaded Provenance Actions
gh_issue_lens-0.3.0.tar.gz 30.0 kB With provenance Details for gh_issue_lens-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gh-issue-lens 0.3.0
File Interpreter ABI Platform Actions
gh_issue_lens-0.3.0-py3-none-any.whl Python 3 none any Details for gh_issue_lens-0.3.0-py3-none-any.whl

Total release size: 56.0 kB

Release files / gh_issue_lens-0.3.0.tar.gz

Download URL gh_issue_lens-0.3.0.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b07a4f9a5138c5612b73d813f06cbd944ee61fc09a3640074877e7978a641408
BLAKE2b-256 checksum
How to use checksums
9e9c26a7ef20b294940c2eadd104c07f7687d834ae1a63030519f9a873521261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / gh_issue_lens-0.3.0-py3-none-any.whl

Download URL gh_issue_lens-0.3.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fecc160738f03e74622df1c166ebf1ac7d19162e3ad04cbb41664981f852b04
BLAKE2b-256 checksum
How to use checksums
ee26a528a7feee6e7909d8539ffe627bd60729b51bfbb407e195b9569641c74a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for gh-issue-lens 0.3.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gh_issue_lens-0.3.0.tar.gz

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 Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page