github-dependents-info
🚀 Features
GitHub API does not allow to collect information about package usage (Used by on home, Dependents in insights section)
This package uses GitHub HTML to collect dependents information and can:
- Automate all the actions below using a simple GitHub Action !
- Output as text
- Output as json (including shields.io markdown badges)
- Generate summary markdown file
- Optionally add an AI-generated usage summary (via
litellm) when an LLM API key is present - Update existing markdown by inserting Used by badge within tags
<!-- gh-dependents-info-used-by-start -->and<!-- gh-dependents-info-used-by-end -->
- Handle multiple repositories packages
- Filter results using minimum stars or by repository owner
- Keep huge ecosystems manageable with pagination controls (
--max-scraped-pages,--pagination/--no-pagination,--page-size) - Fetch dependents faster thanks to asynchronous
httpxrequests and parallelized page scraping
Badges example
JSON output
Note: when AI usage summary is enabled and an LLM API key is present, the JSON output also includes llm_summary.
{
"all_public_dependent_repos": [
{
"name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",
"stars": 0
},
{
"name": "Moaz-Adel/Jobsity-Challenge",
"stars": 0
},
{
"name": "Moaz-Adel/automation-exercise-cypress",
"stars": 0
},
{
"name": "RecuencoJones/vscode-groovy-lint-issue",
"stars": 0
},
{
"name": "aboe026/data-structures",
"stars": 0
},
{
"name": "aboe026/shields.io-badge-results",
"stars": 0
},
{
"name": "aboe026/software-update-checker",
"stars": 2
},
{
"name": "katalon-labs/katalon-recorder-extension",
"stars": 0
},
{
"name": "mashafrancis/sa-jenkins",
"stars": 0
},
{
"name": "nvuillam/vscode-groovy-lint",
"stars": 52
},
{
"name": "run2cmd/dotfiles",
"stars": 2
}
],
"packages": [
{
"id": null,
"name": "nvuillam/npm-groovy-lint",
"url": "https://github.com/nvuillam/npm-groovy-lint/network/dependents",
"public_dependent_stars": 56,
"public_dependents": [
{
"name": "CIT-SeniorDesign/CIT-SeniorDesign.github.io",
"stars": 0
},
{
"name": "Moaz-Adel/Jobsity-Challenge",
"stars": 0
},
{
"name": "Moaz-Adel/automation-exercise-cypress",
"stars": 0
},
{
"name": "RecuencoJones/vscode-groovy-lint-issue",
"stars": 0
},
{
"name": "aboe026/data-structures",
"stars": 0
},
{
"name": "aboe026/shields.io-badge-results",
"stars": 0
},
{
"name": "aboe026/software-update-checker",
"stars": 2
},
{
"name": "katalon-labs/katalon-recorder-extension",
"stars": 0
},
{
"name": "mashafrancis/sa-jenkins",
"stars": 0
},
{
"name": "nvuillam/vscode-groovy-lint",
"stars": 52
},
{
"name": "run2cmd/dotfiles",
"stars": 2
}
],
"public_dependents_number": 11,
"private_dependents_number": 4,
"total_dependents_number": 15,
"badges": {
"total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"
}
}
],
"total_dependents_number": 15,
"public_dependents_number": 11,
"private_dependents_number": 4,
"public_dependents_stars": 56,
"badges": {
"total": "[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"public": "[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"private": "[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)",
"stars": "[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)"
}
}
Markdown output for single package
# Dependents stats for nvuillam/npm-groovy-lint
## Package nvuillam/npm-groovy-lint
[](https://github.com/nvuillam/npm-groovy-lint/network/dependents)
[&message=11&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)
[&message=4&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)
[&message=56&color=informational&logo=slickpic)](https://github.com/nvuillam/npm-groovy-lint/network/dependents)
| Repository | Stars |
|:--------------------------------------------------------------------------------------------------------------|------:|
| [CIT-SeniorDesign/CIT-SeniorDesign.github.io](https://github.com/CIT-SeniorDesign/CIT-SeniorDesign.github.io) | 0 |
| [Moaz-Adel/Jobsity-Challenge](https://github.com/Moaz-Adel/Jobsity-Challenge) | 0 |
| [Moaz-Adel/automation-exercise-cypress](https://github.com/Moaz-Adel/automation-exercise-cypress) | 0 |
| [RecuencoJones/vscode-groovy-lint-issue](https://github.com/RecuencoJones/vscode-groovy-lint-issue) | 0 |
| [aboe026/data-structures](https://github.com/aboe026/data-structures) | 0 |
| [aboe026/shields.io-badge-results](https://github.com/aboe026/shields.io-badge-results) | 0 |
| [aboe026/software-update-checker](https://github.com/aboe026/software-update-checker) | 2 |
| [katalon-labs/katalon-recorder-extension](https://github.com/katalon-labs/katalon-recorder-extension) | 0 |
| [mashafrancis/sa-jenkins](https://github.com/mashafrancis/sa-jenkins) | 0 |
| [nvuillam/vscode-groovy-lint](https://github.com/nvuillam/vscode-groovy-lint) | 52 |
| [run2cmd/dotfiles](https://github.com/run2cmd/dotfiles) | 2 |
_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_
Note: If your repository packages have millions of dependents, running github-dependent-infos could take hours, as it works by browsing and scraping HTML pages returned by GitHub. For example, angular/angular dependents did run during several hours !
⚙️ Installation
pip install -U github-dependents-info
or install with Poetry
poetry add github-dependents-info
🛠️ Usage
github-dependents-info [OPTIONS]
| Parameter | Type | Description |
|---|---|---|
| --repo | String | Repository. Example: oxsecurity/megalinter |
| -b --badgemarkdownfile |
String | (optional) Path to markdown file where to insert/update Used by badge (must contain tags <!-- gh-dependents-info-used-by-start --> and <!-- gh-dependents-info-used-by-end -->) |
| -s --sort |
String | (optional) Sort order: name (default) or stars |
| -x --minstars |
String | (optional) If set, filters repositories to keep only those with more than X stars |
| -m --markdownfile |
String | (optional) Output markdown file file |
| -d --docurl |
String | (optional) Hyperlink to use when clicking on badge markdown file badge. (Default: link to markdown file) |
| -p --mergepackages |
String | (optional) In case of multiple packages, merge their stats in a single one in markdown and json output |
| -j --json |
String | (optional) Output in json format |
| -u --owner |
String | (optional) If set, filters repositories to keep only those owned by the specified user/organization |
| -n --max-scraped-pages |
Integer | (optional) Maximum number of GitHub pages to scrape per package (0 uses all available pages) |
| --pagination --no-pagination |
Boolean | (optional) Enable (default) or disable pagination when writing markdown output |
| --page-size | Integer | (optional) Number of repositories per markdown page when pagination is enabled (default: 500) |
| --llm-summary --no-llm-summary |
Boolean | (optional) Generate an AI usage summary in markdown output when an LLM API key is present (default: enabled) |
| --llm-model | String | (optional) LiteLLM model to use for the summary. If not set, a lightweight model is selected based on the detected API key provider |
| --llm-max-repos | Integer | (optional) Max dependent repos included in the summary prompt payload (default: 500) |
| --llm-max-words | Integer | (optional) Max words for the generated summary (default: 300) |
| --llm-timeout | Float | (optional) Timeout (seconds) for the summary LLM call (default: 120) |
| -v --version |
Boolean | (optional) Displays version of github-dependents-info |
| --verbose | Boolean | (optional) Verbose output |
Badge tags example (the tool replaces everything between the markers):
<!-- gh-dependents-info-used-by-start -->
[](https://github.com/nvuillam/github-dependents-info/blob/main/docs/github-dependents-info.md)<!-- gh-dependents-info-used-by-end -->
🧪 Examples
-
Text output
github-dependents-info --repo nvuillam/npm-groovy-lint -
JSON output
github-dependents-info --repo nvuillam/npm-groovy-lint --json -
Insert/Update Used by markdown badge within an existing markdown file containing tags
<!-- gh-dependents-info-used-by-start -->and<!-- gh-dependents-info-used-by-end -->github-dependents-info --repo nvuillam/npm-groovy-lint --badgemarkdownfile ./README.md -
Build markdown file with dependent repos (single package), sorted by name
github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --verbose -
Build markdown file with dependent repos (single package), with minimum 10 stars
github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --minstars 10 --verbose -
Build markdown file with dependent repos (multiple package), sorted by stars
github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --verbose -
Build markdown file with dependent repos (multiple package), with merged list of packages in output markdown
github-dependents-info --repo oxsecurity/megalinter --markdownfile ./docs/package-usage.md --sort stars --mergepackages --verbose -
Limit scraping to repositories owned by a specific organization and cap pagination to 5 pages per package
github-dependents-info --repo oxsecurity/megalinter --owner oxsecurity --max-scraped-pages 5 --verbose
-
Generate paginated markdown with 250 repositories per page (use
--no-paginationto force a single file)github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --page-size 250 --mergepackages
-
Disable AI usage summary generation
github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --no-llm-summary
-
Force a specific LiteLLM model for the summary
github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --llm-model gpt-4o-mini
-
Generate markdown with AI summary using
OPENAI_API_KEYGEMINI_API_KEY=YOUR_KEY github-dependents-info --repo nvuillam/npm-groovy-lint --markdownfile ./docs/package-usage.md --llm-model gemini-3-flash-preview
AI usage summary (optional)
If an LLM API key is detected in the environment (for example OPENAI_API_KEY), the tool will call a lightweight model (via litellm) to generate a short usage summary and include it in the generated markdown.
-
Supported provider env vars (most common):
- OpenAI:
OPENAI_API_KEY - Azure OpenAI:
AZURE_OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - Google Gemini:
GEMINI_API_KEY(orGOOGLE_API_KEY) - Mistral:
MISTRAL_API_KEY - Cohere:
COHERE_API_KEY - Groq:
GROQ_API_KEY
- OpenAI:
-
Disable with
--no-llm-summary(or env varGITHUB_DEPENDENTS_INFO_LLM_SUMMARY=false) -
Override model with
--llm-model(or env varGITHUB_DEPENDENTS_INFO_LLM_MODEL/LITELLM_MODEL) -
Adjust max summary length with
--llm-max-words(or env varGITHUB_DEPENDENTS_INFO_LLM_MAX_WORDS) -
The summary is cached in
--csvdirectory(filellm_summary_<repo>.json) and reused on subsequent runs -
A previously generated summary is never lost: if a new summary can not be generated (no API key anymore, no credit left, rate limit, timeout...), the summary found in the cache or in the existing
--markdownfileis reused
Use as GitHub Action
Allow GitHub Actions to create Pull Requests in Settings > Actions > General
Create a file .github/workflows/github-dependents-info.yml in your repository with the following YAML content.
If will generate a new Pull Request (or replace the pending one) every time the usage stats will have changed :)
Don't forget to add tags <!-- gh-dependents-info-used-by-start --> and <!-- gh-dependents-info-used-by-end --> in your README.md, at the end of another badge line if you want github-dependents-info to replace its content automatically.
# GitHub Dependents Info workflow
# More info at https://github.com/nvuillam/github-dependents-info/
name: GitHub Dependents Info
# Let by default
on:
# On manual launch
workflow_dispatch:
# On every push on selected branches (usually just main)
push:
branches: [main,master,setup-gdi]
# Scheduled interval: Use CRON format https://crontab.guru/
schedule:
- cron: "0 0 * * 0" # Every sunday at midnight
permissions: read-all
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: GitHub Dependents Info
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
persist-credentials: false
# Collect data & generate markdown
- name: GitHub Dependents Info
uses: nvuillam/github-dependents-info@fa4a7bc373174a9060ad9935ee32557eef05ea89 # v1.6.3
# See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage
with:
repo: ${{ github.repository }}
outputrepo: ${{ github.repository }}
# markdownfile: docs/github-dependents-info.md
# badgemarkdownfile: README.md
# sort: stars
# minstars: "0"
# pagination: "true" # set to "false" to write a single markdown file
# page-size: "500" # number of repositories per markdown page
# max-scraped-pages: "0" # max pages to scrape per package (0 = no limit)
# llm-summary: "true" # set to "false" to disable AI usage summary
# llm-model: "" # optional: override LiteLLM model (example: gpt-4o-mini, gemini-3-flash-preview)
# llm-max-repos: "500" # optional: cap repos sent to the summary prompt
# llm-max-words: "250" # optional: cap summary length
# llm-timeout: "120" # optional: timeout (seconds) for the LLM call
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# To enable the AI usage summary, provide one of the supported provider API keys, for example:
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
# Workaround for git issues
- name: Prepare commit
run: sudo chown -R $USER:$USER .
# Create pull request
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
branch: github-dependents-info-auto-update
commit-message: "[GitHub Dependents Info] Updated markdown file(s)"
delete-branch: true
title: "[GitHub Dependents Info] Updated markdown file"
body: "_Generated with [github-dependents-info](https://github.com/nvuillam/github-dependents-info), by [Nicolas Vuillamy](https://github.com/nvuillam)_"
labels: documentation
- name: Create PR output
run: |
echo "Pull Request Number - ${STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER}"
echo "Pull Request URL - ${STEPS_CPR_OUTPUTS_PULL_REQUEST_URL}"
env:
STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
STEPS_CPR_OUTPUTS_PULL_REQUEST_URL: ${{ steps.cpr.outputs.pull-request-url }}
GitHub Action inputs
Action inputs are named after the CLI options, without the leading --. Boolean CLI flags such as --no-pagination become inputs with a "true" / "false" value.
| Input | Description | CLI equivalent | Default |
|---|---|---|---|
repo |
Owner and name of the repository (required) | --repo |
(required) |
outputrepo |
Owner and name of the output repository, if different from repo |
--outputrepo |
"" |
markdownfile |
Path of the output markdown file | --markdownfile |
"docs/github-dependents-info.md" |
badgemarkdownfile |
File where badges are replaced (between the gh-dependents-info-used-by tags) |
--badgemarkdownfile |
"README.md" |
docurl |
Custom URL for the badges hyperlink | --docurl |
"" |
markdownbadgecolor |
Color of the generated badges | --markdownbadgecolor |
"informational" |
sort |
Sort criteria: stars or name |
--sort |
"stars" |
minstars |
Minimum number of stars to appear in the results | --minstars |
"0" |
timedelay |
Delay in seconds between GitHub requests | --timedelay |
"0.1" |
csvdirectory |
Directory where CSV progress files are written | --csvdirectory |
"" |
mergepackages |
true to merge multiple packages into a single result |
--mergepackages |
"false" |
json |
true to emit JSON output |
--json |
"false" |
verbose |
true to enable verbose logging |
--verbose |
"false" |
overwrite |
true to overwrite existing CSV progress files |
--overwrite |
"false" |
owner |
Filter dependent repositories by owner | --owner |
"" |
max-scraped-pages |
Max pages to scrape per package (0 = no limit) |
--max-scraped-pages |
"0" |
pagination |
false to write a single markdown file instead of multiple pages |
--pagination / --no-pagination |
"true" |
no-pagination |
true to disable pagination (same as pagination: "false") |
--no-pagination |
"false" |
page-size |
Number of repositories per markdown page when pagination is enabled | --page-size |
"500" |
llm-summary |
false to disable the AI usage summary |
--llm-summary / --no-llm-summary |
"true" |
llm-model |
LiteLLM model for the AI usage summary | --llm-model |
"" |
llm-max-repos |
Max dependent repos included in the summary prompt | --llm-max-repos |
"500" |
llm-max-words |
Max words for the generated summary | --llm-max-words |
"250" |
llm-timeout |
Timeout (seconds) for the summary LLM call | --llm-timeout |
"120" |
🛡 License
This project is licensed under the terms of the MIT license. See LICENSE for more details.
Credits 
This package has been inspired by stackexchange post How to use GitHub API to get a repository's dependents information in GitHub?
This project was generated with python-package-template
Metadata
Release files for github-dependents-info 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| github_dependents_info-4.1.0.tar.gz | 29.9 kB | With provenance | Details for github_dependents_info-4.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| github_dependents_info-4.1.0-py3-none-any.whl | Python 3 | none | any | Details for github_dependents_info-4.1.0-py3-none-any.whl |
Total release size: 54.6 kB
Release files / github_dependents_info-4.1.0.tar.gz
| Download URL | github_dependents_info-4.1.0.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3ede72a9cf94c0650af8696219b8a3b9bbb29b0c5a4673a1a991db5ec12d19b
|
|
BLAKE2b-256 checksum How to use checksums |
6cd67046bcb6665a8c3d5203ee1359c404eee732baebda131f490c2eec255b9f
|
| 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 31, 2026.
Transparency logRelease files / github_dependents_info-4.1.0-py3-none-any.whl
| Download URL | github_dependents_info-4.1.0-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
051671a583a6a6d1a57d4bf987e2d7079329f3b286e41e4e0a9593bd033e079b
|
|
BLAKE2b-256 checksum How to use checksums |
53eb0efa52563aac460a939d35b22f53f3c50312c3cc5a729bd72bce535f7138
|
| 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 31, 2026.
Transparency logSecurity for github-dependents-info 4.1.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.
Attestation for github_dependents_info-4.1.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 31, 2026.
Transparency logA 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.