Skip to main content

GitHub repo visualizer for terminal

Project description

โ˜• Caffeine

Beautiful GitHub repository visualizer for your terminal.

Turn any GitHub repo URL into a stunning terminal dashboard with stats, visualizations, and insights.

caffeine python/cpython

Caffeine Demo


โœจ Features

  • ๐Ÿ“Š Repository Stats - Stars, forks, watchers, size at a glance
  • ๐ŸŽจ Language Breakdown - Visual progress bars showing code composition
  • ๐Ÿ“ˆ Commit Activity - Sparkline visualization of the past year
  • ๐Ÿ‘ฅ Top Contributors - Leaderboard with contribution bars
  • ๐ŸŽฏ Issues & PRs - Stats with close/merge rates + recent open issues
  • ๐Ÿท๏ธ Recent Releases - Timeline of latest releases
  • ๐Ÿ”ฅ Trending Repos - Discover what's hot on GitHub
  • ๐Ÿ” Search - Find repositories by keywords
  • ๐Ÿ“– README Preview - View README directly in terminal
  • ๐Ÿ“ File Tree - Explore repository structure
  • ๐Ÿ”‘ Token Support - 5,000 API requests/hour with authentication

๐Ÿ“ฆ Installation

pip install caffeine-gitvs

Or install from source:

git clone https://github.com/yourusername/caffeine-gitvs.git
cd caffeine-gitvs
pip install -e .

๐Ÿš€ Usage

Basic Repository Visualization

# Using owner/repo format
caffeine python/cpython

# Using full GitHub URL
caffeine https://github.com/facebook/react

# Quick mode (faster, fewer API calls)
caffeine rust-lang/rust --quick
caffeine rust-lang/rust -q

# Hide the ASCII logo
caffeine torvalds/linux --no-logo

๐Ÿ“– README Preview

View a repository's README directly in your terminal:

caffeine python/cpython --readme
caffeine facebook/react -r

๐Ÿ“ File Tree

Explore the repository's file structure:

caffeine torvalds/linux --tree
caffeine rust-lang/rust -t

๐Ÿ”ฅ Trending Repositories

Discover what's trending on GitHub:

# Today's trending repos
caffeine trending

# Filter by language
caffeine trending --lang python
caffeine trending --lang rust
caffeine trending --lang javascript

# Different time periods
caffeine trending --since daily      # Default
caffeine trending --since weekly
caffeine trending --since monthly

# Show more results
caffeine trending --limit 20

# Combine options
caffeine trending --lang go --since weekly --limit 15

๐Ÿ” Search Repositories

Find repositories by keywords:

# Basic search
caffeine search "machine learning"
caffeine search "web framework"

# Filter by language
caffeine search cli --lang rust
caffeine search api --lang python

# Filter by minimum stars
caffeine search database --stars 1000
caffeine search "game engine" --stars 5000

# Sort options: stars (default), forks, updated
caffeine search react --sort stars
caffeine search react --sort forks
caffeine search react --sort updated

# Combine options
caffeine search "http client" --lang rust --stars 500 --limit 15

โš™๏ธ Configuration

Manage your GitHub token for higher rate limits:

# Show current configuration
caffeine config show

# Set your GitHub token (increases rate limit from 60 to 5,000/hour)
caffeine config set-token ghp_xxxxxxxxxxxxxxxxxxxx

# Remove saved token
caffeine config remove-token

๐Ÿ”‘ GitHub Token Setup

Without a token, GitHub allows 60 API requests per hour. With a token, you get 5,000 requests per hour.

How to Get a Token

  1. Go to GitHub Settings โ†’ Developer Settings โ†’ Personal Access Tokens
  2. Click "Generate new token (classic)"
  3. Give it a name (e.g., "Caffeine CLI")
  4. No scopes needed for public repositories
  5. Click Generate token
  6. Copy the token and run:
caffeine config set-token ghp_your_token_here

Alternative: Environment Variable

You can also set the token via environment variable:

export GITHUB_TOKEN=ghp_your_token_here
# or
export GH_TOKEN=ghp_your_token_here

๐Ÿ“‹ Command Reference

Command Description
caffeine <repo> Visualize a repository
caffeine <repo> --quick Quick mode (essential info only)
caffeine <repo> --readme Show README preview
caffeine <repo> --tree Show file tree
caffeine trending Show trending repositories
caffeine search <query> Search for repositories
caffeine config show Show current configuration
caffeine config set-token <token> Save GitHub token
caffeine config remove-token Remove saved token

Options

Option Short Description
--quick -q Quick mode (fewer API calls)
--readme -r Show README preview
--tree -t Show file tree structure
--no-logo Hide ASCII logo
--lang -l Filter by language (trending/search)
--since -s Time period: daily, weekly, monthly (trending)
--stars Minimum stars (search)
--sort Sort by: stars, forks, updated (search)
--limit -n Number of results to show
--version -v Show version
--help Show help

๐ŸŽจ What You'll See

Repository Dashboard

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ˜• CAFFEINE  python/cpython โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ The Python programming language                                              โ”‚
โ”‚ ๐ŸŒ https://www.python.org  โ”‚  ๐Ÿ“œ PSF-2.0  โ”‚  Created: 8 years ago           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  โญ 65.2k     ๐Ÿด 31.1k     ๐Ÿ‘๏ธ 2.4k     ๐Ÿ“ฆ 764 MB     ๐Ÿ”€ main

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Languages โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚   Python      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   62.0%                         โ”‚
โ”‚   C           โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   35.8%                         โ”‚
โ”‚   Other       โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘    2.2%                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Commit Activity (52 weeks) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚   โ–„โ–ƒโ–ƒโ–ƒโ–ƒโ–„โ–„โ–ƒโ–ƒโ–…โ–„โ–…โ–‡โ–ˆโ–‚โ–†โ–„โ–‚โ–‚โ–ƒโ–‚โ–‚โ–ƒโ–‚โ–ƒโ–โ–ƒโ–‚โ–‚โ–โ–„โ–ƒโ–…โ–โ–‚โ–ƒโ–ƒโ–‚โ–ƒโ–„โ–…โ–ƒโ–ƒโ–‚โ–„โ–…โ–‚โ–‚โ–ƒโ–ƒโ–‚                        โ”‚
โ”‚   Total: 5.9k  โ”‚  Avg: 114/week  โ”‚  Peak: 245 (Week 14)                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Issues Panel with Recent Issues

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Issues & Pull Requests โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚   Issues        Open: 7.2k    Closed: 67.9k                                  โ”‚
โ”‚                 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 90% closed                              โ”‚
โ”‚                                                                              โ”‚
โ”‚   Pull Requests Open: 2.1k    Merged: 56.5k                                  โ”‚
โ”‚                 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ 83% merged                              โ”‚
โ”‚                                                                              โ”‚
โ”‚   โ”€โ”€โ”€ Recent Open Issues โ”€โ”€โ”€                                                 โ”‚
โ”‚                                                                              โ”‚
โ”‚   #144217 Add dicom to mimetypes  type-feature                               โ”‚
โ”‚      @benediktjohannes โ€ข 4 hours ago                                         โ”‚
โ”‚   #144212 Add `image/jxl` to `mimetypes`  type-feature   stdlib              โ”‚
โ”‚      @FooIbar โ€ข 16 hours ago โ€ข ๐Ÿ’ฌ 1                                          โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Trending Repos

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ”ฅ Trending Today โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  #    Repository                           Language          โญ     ๐Ÿด       โ”‚
โ”‚  1    torvalds/linux                       C             215.1k  60.1k       โ”‚
โ”‚       Linux kernel source tree                                               โ”‚
โ”‚  2    microsoft/vscode                     TypeScript    181.0k  37.6k       โ”‚
โ”‚       Visual Studio Code                                                     โ”‚
โ”‚  3    ollama/ollama                        Go            160.5k  14.3k       โ”‚
โ”‚       Get up and running with LLMs                                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ› ๏ธ Tech Stack

  • Typer - Modern CLI framework
  • Rich - Beautiful terminal formatting
  • httpx - Modern HTTP client

๐Ÿ“ Rate Limits

Mode Requests/Hour Repos/Hour (approx)
Without token 60 ~7-8
With token 5,000 ~600+

The remaining rate limit is shown in the footer of each visualization.


๐Ÿค Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE for details.


Made with โ˜• and Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caffeine_gitvs-0.1.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caffeine_gitvs-0.1.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file caffeine_gitvs-0.1.0.tar.gz.

File metadata

  • Download URL: caffeine_gitvs-0.1.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for caffeine_gitvs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06c2ee328a9a8a99a798543084d39c58a873378b14b8607ca1a3124f8e50bc29
MD5 d1366c96fb6e55035ffccb56d94421ce
BLAKE2b-256 3757f63b1c727c244e5b69a4dbdd895f57365736ab2ed1187b84a4fbe96e12a4

See more details on using hashes here.

File details

Details for the file caffeine_gitvs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: caffeine_gitvs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for caffeine_gitvs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f262de5c86969b2e3d40ace480d61e6b54711ad4329c30dcee1a72a1a272526
MD5 f1e7f23bb5991384899ab47359c159e7
BLAKE2b-256 c5becd485779b6d9b13881a11497e31ec627a3c4e3e656c2bb2bcb6280989d28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page