Skip to content

4okimi7uki/repo-spector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repo-spector

aggerecate_img

Go Version CI

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.

Features

  • 📊 Aggregate top languages across repositories
  • 🔍 Inspect tech stacks via GitHub GraphQL
  • ⚡ Fast, lightweight Go-based CLI

Requirements

  • Go 1.25 or later (recommended)
  • GitHub Personal Access Token (set as GH_TOKEN)
    • The accessible repositories are determined by the token's scopes

Usage

GitHub Actions

To enable automatic updates, follow these two steps:

  1. 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
    (with repo and workflow scopes)
  1. 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

CLI

TBD

Options

Exclude language

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.

About

A Go-based CLI inspired by self-reposcope.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors