| Crates.io | gh-stars |
| lib.rs | gh-stars |
| version | 0.1.11 |
| created_at | 2025-04-19 05:23:41.657831+00 |
| updated_at | 2025-04-19 22:01:48.797024+00 |
| description | A CLI tool to fetch, cache, and search GitHub stars with vector search |
| homepage | https://github.com/prabirshrestha/gh-stars |
| repository | https://github.com/prabirshrestha/gh-stars |
| max_upload_size | |
| id | 1640330 |
| size | 130,897 |
A command-line tool to fetch, cache, and search GitHub stars for any user, with powerful semantic search capabilities.
cargo install --path .
The tool supports GitHub API authentication to avoid rate limits:
Environment Variable: Set the GITHUB_TOKEN environment variable with your GitHub personal access token:
export GITHUB_TOKEN=your_github_token_here
Command Line: Provide your token directly via the command line:
gh-stars fetch <username> --token your_github_token_here
The command line option takes precedence over the environment variable.
public_repo scope (or repo for private repositories)# First-time fetch
gh-stars fetch <username>
# Force refresh of existing cache
gh-stars fetch <username> --force
# Fetch using a GitHub token
gh-stars fetch <username> --token your_github_token_here
# List for specific user(s)
gh-stars list --username=<username>
# List for multiple users
gh-stars list --username=user1,user2,user3
# List all cached users' stars (if no username specified)
gh-stars list
# Limit results
gh-stars list --username=<username> --limit 100
# Basic keyword search for specific user(s)
gh-stars search --username=<username> search query
# Search across multiple users
gh-stars search --username=user1,user2,user3 search query
# Search across all cached users (if no username specified)
gh-stars search search query
# Search with language filtering
gh-stars search --username=<username> --language=rust,go search query
# Limit search results
gh-stars search --username=<username> --limit 100 search query
# Multi-word search terms don't need quotes anymore
gh-stars search chat gpt
gh-stars info user/repo
Use the format user/repo such as octocat/Hello-World.
# Fetch and cache stars for user "octocat"
gh-stars fetch octocat
# Fetch with authentication to avoid rate limits
gh-stars fetch octocat --token your_github_token_here
# List all stars for octocat
gh-stars list --username=octocat
# List stars for multiple users
gh-stars list --username=octocat,rust-lang
# List stars from all cached users
gh-stars list
# Search across all octocat's stars
gh-stars search --username=octocat web framework
# Search across multiple users' stars
gh-stars search --username=octocat,rust-lang web framework
# Search all cached users' stars
gh-stars search web framework
# Search for Rust or Go projects
gh-stars search --username=octocat --language=rust,go
# View details for a specific repository
gh-stars info octocat/Hello-World
Stars are cached in your system's cache directory:
~/.cache/gh-stars/~/Library/Caches/gh-stars/C:\Users\<username>\AppData\Local\Cache\gh-stars\The tool uses:
If you encounter issues with vector search:
--force to regenerate the database if neededIf you encounter GitHub API rate limits:
--token flag or GITHUB_TOKEN environment variable