Project

gitfollow

0.0
There's a lot of open issues
No release in over a year
A CLI tool to monitor your GitHub followers, detect new followers and unfollows, and generate detailed reports with automated notifications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 13.0
~> 3.12
~> 1.60
~> 0.22
~> 6.2
~> 3.19

Runtime

~> 1.1
~> 3.2
~> 3.0
~> 8.0
~> 1.3
~> 0.12
 Project Readme

GitFollow

Gem Version Daily Follower Check CI License: MIT

GitFollow is a CLI tool to track your GitHub followers and unfollows. Get notified when someone follows or unfollows you, generate detailed reports, and automate monitoring with GitHub Actions.

Features

  • Track new followers and detect unfollows automatically
  • Generate detailed statistics and reports (text and Markdown)
  • Create GitHub Issues automatically on changes, with a 7-day activity summary
  • Complete history with timestamps stored locally in JSON
  • JSON and CSV export support
  • Colorized terminal output with formatted tables

Installation

gem install gitfollow

Or from source:

git clone https://github.com/bulletdev/gitfollow.git
cd gitfollow
bundle install
gem build gitfollow.gemspec
gem install ./gitfollow-*.gem

Configuration

GitFollow requires a GitHub Personal Access Token with read:user scope.

  1. Generate a token at GitHub Settings -> Developer settings -> Personal access tokens
  2. Set it as an environment variable:
export OCTOCAT_TOKEN="your_github_token_here"

Or create a .env file:

OCTOCAT_TOKEN=your_github_token_here

Usage

Initialize

Create your first snapshot:

gitfollow init
Fetching initial data... Done!

Initialization complete!
Username: @yourname
Followers: 542
Following: 123
Mutual: 89

Run 'gitfollow check' to detect changes.

Check for Changes

gitfollow check
Checking for changes... Done!

Changes detected for @yourname

+ New Followers (2):
  * @newuser1
  * @newuser2

- Unfollowed (1):
  * @olduser

Net change: +1
Previous: 542 -> Current: 543

Statistics

gitfollow stats
Follower Statistics for @yourname
==================================================
┌──────────────────────┬─────┐
│ Followers            │ 543 │
│ Following            │ 123 │
│ Mutual               │  89 │
│ Ratio                │4.41 │
│ Total New Followers  │  15 │
│ Total Unfollows      │   3 │
└──────────────────────┴─────┘

Last Updated: 2026-10-07 09:00:00 UTC

Reports

gitfollow report
gitfollow report --format=markdown
gitfollow report --format=markdown --output=report.md
GitFollow Report for @yourname
==================================================

Last Updated: 2026-10-07 09:00:00 UTC

Statistics:
  Followers:         543
  Following:         123
  Mutual:             89
  Ratio:            4.41
  Total New:          15
  Total Unfollows:     3

Recent Activity:
--------------------------------------------------
  [2026-10-07 09:00] NEW @newuser1
  [2026-10-06 09:00] UNFOLLOW @olduser

Mutual Followers and Non-Followers

gitfollow mutual
gitfollow non-followers

Export Data

gitfollow export json data.json
gitfollow export csv data.csv

Advanced Options

gitfollow check --json          # JSON output
gitfollow check --table         # table format
gitfollow check --quiet         # suppress output if no changes
gitfollow check --data-dir=/path/to/data
gitfollow check --notify="owner/repo"   # create a GitHub Issue on changes

Automated Monitoring with GitHub Actions

Setup

  1. Add your token as a repository secret named OCTOCAT_TOKEN
  2. Create .github/workflows/daily-check.yml:
name: Daily Follower Check

on:
  schedule:
    - cron: '0 9 * * *'
  workflow_dispatch:

jobs:
  check-followers:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.4.5'
          bundler-cache: true

      - name: Install GitFollow
        run: |
          gem build gitfollow.gemspec
          gem install ./gitfollow-*.gem

      - name: Cache follower data
        uses: actions/cache@v4
        with:
          path: ~/.gitfollow
          key: gitfollow-data-${{ github.repository_owner }}-${{ github.run_id }}
          restore-keys: |
            gitfollow-data-${{ github.repository_owner }}-

      - name: Initialize if first run
        env:
          OCTOCAT_TOKEN: ${{ secrets.OCTOCAT_TOKEN }}
        run: |
          if [ ! -f ~/.gitfollow/snapshots.json ]; then
            gitfollow init
          fi

      - name: Check for changes
        env:
          OCTOCAT_TOKEN: ${{ secrets.OCTOCAT_TOKEN }}
          REPO: ${{ github.repository }}
        run: gitfollow check --notify="$REPO" --quiet

Issue Format

When changes are detected, GitFollow creates a GitHub Issue with:

  • Today's diff: new followers and unfollows since the last run
  • Summary: previous/current count and net change
  • Last 7 days activity: full table of recent events

CLI Reference

Command Description
gitfollow init Initialize and create first snapshot
gitfollow check Check for follower changes
gitfollow report Generate detailed report
gitfollow stats Display statistics
gitfollow mutual List mutual followers
gitfollow non-followers List non-followers
gitfollow export FORMAT FILE Export data (json/csv)
gitfollow clear Clear all stored data
gitfollow version Display version

Data Storage

Data is stored in ~/.gitfollow/ by default:

~/.gitfollow/
├── snapshots.json  # follower snapshots
└── history.json    # change history

Use --data-dir to change the location.

Development

bundle install
bundle exec rspec       # run tests
bundle exec rubocop     # lint
gem build gitfollow.gemspec

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes with tests
  4. Open a Pull Request

Security

  • Never commit your GitHub token to version control
  • Use GitHub Secrets for CI/CD workflows
  • Keep .env in .gitignore

License

MIT — see LICENSE.


Made with Ruby by Michael D. Bullet