A simple Rust CLI that fetches your GitHub starred repositories and caches them locally as structured JSON.
Current phase: Phase 1 — basic fetcher and JSON cache.
AI-powered organization and description enrichment are planned for a later phase.
- Fetch starred repositories from the GitHub API
- Paginate through all stars automatically
- Cache raw API results locally as JSON
- Use cache on subsequent runs to avoid repeated API calls
- AI-friendly structured output for future enrichment
Requires Rust.
git clone <repository-url>
cd github-star-organize
cargo build --releaseThe binary will be available at target/release/github-star-organize.
Provide a GitHub personal access token:
github-star-organize fetch --token <GITHUB_TOKEN>Or set the GITHUB_TOKEN environment variable:
export GITHUB_TOKEN=<your-token>
github-star-organize fetchgithub-star-organize fetch --username octocat| Option | Description | Default |
|---|---|---|
-u, --username <USER> |
GitHub username | authenticated user |
-t, --token <TOKEN> |
GitHub token (or GITHUB_TOKEN env) |
none |
-c, --cache <PATH> |
Cache JSON path | .github-stars-cache/stars.json |
--force |
Re-fetch from GitHub | false |
# Default cache path
github-star-organize fetch --token $GITHUB_TOKEN
# Custom cache path
github-star-organize fetch \
--token $GITHUB_TOKEN \
--cache .cache/stars.json
# Force refresh
github-star-organize fetch --token $GITHUB_TOKEN --forceThe cache is a plain JSON file containing metadata and an array of repositories:
{
"fetched_at": "2026-06-26T03:53:45Z",
"username": "octocat",
"repos": [
{
"id": 1296269,
"full_name": "octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"description": "My first repository on GitHub!",
"language": null,
"stargazers_count": 3649,
"topics": [],
"starred_at": "2011-01-26T19:01:12Z"
}
]
}This format is ideal for feeding into an AI for categorization, summarization, or report generation.
- Go to GitHub → Settings → Developer settings → Personal access tokens.
- Generate a classic token.
- For public stars, no scopes are required — the token simply raises the API rate limit from 60 to 5,000 requests per hour.
- For private starred repositories, enable the
reposcope.
├── src
│ ├── main.rs # CLI entry point
│ ├── lib.rs # Module declarations
│ ├── cli.rs # Command-line argument parsing
│ ├── models.rs # Data structures
│ ├── github.rs # GitHub API client
│ └── cache.rs # JSON cache read/write
├── PLAN.md # Implementation plan
├── AGENTS.md # Coding guidelines for agents
└── README.md # This file
- Phase 1: Fetcher and JSON cache
- Phase 2: Optional AI enrichment (categorization, improved descriptions)
MIT