repo-spector (a.k.a. self-reposcope) is a reimagined Go-based implementation of the original Rust-based self-reposcope, featuring a renewed design and a migration from the GitHub REST API to GitHub GraphQL.
- 📊 Aggregate top languages across repositories
- 🔍 Inspect tech stacks via GitHub GraphQL
- ⚡ Fast, lightweight Go-based CLI
- Go 1.25 or later (recommended)
- GitHub Personal Access Token (set as
GH_TOKEN)- The accessible repositories are determined by the token's scopes
To enable automatic updates, follow these two steps:
- Set up a
GitHub Personal Access Token
Go to Settings > Secrets and variables > Actions > [Repository secrets], then add a new secret with:
- Name:
GH_TOKEN - Value: Your GitHub Personal Access Token
(withrepoandworkflowscopes)
- Add the following workflow file to
.github/workflows/repo-spector.yml.
name: repo-spector
on:
schedule:
- cron: "0 0 * * 1" # Every Monday (UTC)
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout target repo
uses: actions/checkout@v4
- name: Download repo-spector binary from GitHub Release
shell: bash
run: |
curl -L https://github.com/4okimi7uki/repo-spector/releases/latest/download/repo-spector -o repo-spector
chmod +x ./repo-spector
- name: Run repo-spector CLI
shell: bash
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
mkdir -p output
./repo-spector -x "${{ secrets.EXCLUDED_LANGUAGES }}"
- name: Commit and Push updated SVGs
shell: bash
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add output/*.svg
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "update: language stats svg"
git push https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }} HEAD:main
fi
TBD
You can exclude specific languages either by using the -x, --excluded-languages CLI option or the secret: EXCLUDED_LANGUAGES.
For example, to exclude HTML, CSS and dockerfile:
secret
- Name:
EXCLUDED_LANGUAGES - Value:
html,css,dockerfile
CLI
./repo-scope -x 'html,css,dockerfile'2026 Aoki Mizuki – Developed with 🍭 and a sense of fun.