Skip to content

Logit GitHub Card

Actions

About

Generate SVG profile cards from GitHub contribution statistics
0.1.0
Latest
Star (0)

Tags

 (1)

logit — lines of git

CLI tool for analyzing Git repository statistics — locally or from GitHub.

Install

cargo install --path . --features github

Without GitHub features:

cargo install --path .

Usage

Scan repositories

Find Git repositories under a directory:

logit scan /path/to/projects

Local statistics

Analyze one or more local repos:

# Single repo (current directory)
logit stats

# Multiple repos
logit stats /path/to/repo1 /path/to/repo2

# Recursive scan + stats
logit stats /path/to/projects

# Filter by author, period, language
logit stats --author "Alice" --period week --lang Rust

# Multi-level grouping
logit stats --group repo,author,period
logit stats --group repo,language

# Compact / short output
logit stats --compact --short

Group options

--group accepts a comma-separated list: repo, author, period, language.

  • Single group behaves like a flat table (backward-compatible).
  • Multiple groups produce a nested tree. For example --group repo,author shows authors within each repo.
  • If a grouping level has only one unique value across all data, it is automatically skipped.
  • language can only appear as the last group.

Excluding repos, languages, and paths

--exclude filters repos, languages, or file paths. Repeatable.

# Exclude entire repos
logit stats --exclude old-project --exclude archived-repo

# Exclude a language within a specific repo
logit stats --exclude my-repo:lang:markdown

# Exclude file paths matching a glob within a repo
logit stats --exclude my-repo:path:docs/**
logit stats --exclude frontend:path:**/*.test.ts

# Combine qualifiers for one repo
logit stats --exclude "my-repo:lang:md,p:*.md"

# Global language/path exclusion (no repo prefix)
logit stats --exclude :lang:json --exclude :path:**/*.lock

GitHub statistics

Requires a GITHUB_TOKEN environment variable (PAT with read:user scope).

# Fetch contribution stats
logit github fetch <username>
logit github fetch <username> --period week --include-contributed

# Include private repos (token must belong to <username>; bypasses fine-grained PAT
# limitation that hides private contributions in contributionsCollection)
logit github fetch <username> --include-private --include-contributed --include-forks

# Generate SVG profile card
logit github card <username>
logit github card <username> --short --days 90

# Multi-period comparison card
logit github multi <username> -p week,month,year

Output formats

# Table (default), JSON, or TUI (if compiled with tui feature)
logit stats -f table
logit stats -f json
logit stats -f tui

# Write to file
logit stats -o stats.txt
logit github card <username> -o card.svg

GitHub Action

Use logit as a GitHub Action to automatically generate and update profile cards:

name: Update Profile Card
on:
  schedule:
    - cron: '0 0 * * 1'  # Weekly
  workflow_dispatch:

jobs:
  card:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - uses: hugefiver/logit@master
        with:
          username: ${{ github.actor }}
          # token: ${{ github.token }}  # default, or use a PAT for private repos
          command: card
          days: '365'
          include-contributed: 'true'
          output: profile-card.svg

      - uses: stefanzweifel/git-auto-commit-action@v7
        with:
          commit_message: 'chore: update profile card'
          file_pattern: 'profile-card.svg'

Action inputs

Input Default Description
username (required) GitHub username
token ${{ github.token }} GitHub token
command card card or multi
days 365 Lookback days (card)
periods week,month,year Periods (multi)
include-forks false Include forks
include-contributed false Include contributed repos
include-private false Include token holder's private repos (requires PAT matching username; default ${{ github.token }} is silently ignored)
exclude-lang Languages to exclude
exclude Multi-line exclusions (repo[:lang:LANG])
short false Compact card layout
lang-rows 2 Language rows
title Custom title
output profile-card.svg Output path
retry-count 3 Retry attempts on failure
retry-delay 5 Seconds between retries

License

Anti American AI Public License - See LICENSE for details.

Logit GitHub Card is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generate SVG profile cards from GitHub contribution statistics
0.1.0
Latest

Tags

 (1)

Logit GitHub Card is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.