gh-wrapped-2025
v1.0.18
Published
Your GitHub year in review - in your terminal
Maintainers
Readme
GitHub Wrapped 2025
Your GitHub year in review, beautifully visualized in your terminal
Quick Start • Features • Demo • Token Setup • Contributing
Demo

Interactive terminal experience - from stats loading to image export
Quick Start
No installation required. Run it instantly:
# With Bun (recommended - fastest)
bunx gh-wrapped-2025
# With npm
npx gh-wrapped-2025Usage:
- Enter your GitHub username
- Watch your stats load in real-time
- Navigate with arrow keys / spacebar
- Press
[E]to export as image
Note: Most users don't need a token. The app will only prompt you if you hit GitHub's rate limit (60 requests/hour).
Features
Comprehensive Analytics
- Total commits, PRs, issues, and code changes
- Contribution streaks (current & longest)
- Peak productivity hours
- Most active repository
Language Insights
- Top 5 programming languages
- Usage percentages and visual breakdown
- Language-based statistics
Developer Profile
- Archetype Classification: Night Owl, Early Bird, Weekend Warrior, etc.
- Achievement System: Unlock badges based on your activity
- Smart Insights: AI-generated observations about your coding patterns
Export & Share
- Generate beautiful PNG images
- Optimized for social media sharing
- Background Chromium installation (seamless first-time setup)
Privacy & Performance
- 100% Local Processing - No data sent to external servers
- Optimized API Calls - Efficient GraphQL queries with caching
- Optional Authentication - Works without a token for most users
Installation
Run with bunx (Recommended - 100x faster!)
bunx gh-wrapped-2025No installation needed! Just run it once and the app handles everything.
Run with npx (Also works)
npx gh-wrapped-2025Install Globally
# With Bun
bun install -g gh-wrapped-2025
github-wrapped
# With npm
npm install -g gh-wrapped-2025
github-wrappedFor Developers
git clone https://github.com/d3varaja/gh-wrapped-cli.git
cd gh-wrapped-cli
# Install dependencies
bun install # or npm install
# Build the project
bun run build # or npm run build
# Run the built version (use Node, not Bun - see note below)
npm start
# or
node dist/index.js⚠️ Important: Always use Node to run the built version (npm start or node dist/index.js), not bun start. The image export feature uses Playwright which has known compatibility issues with Bun's runtime, especially on Windows. Bun is great for development and building, but Node is required for running the final output.
How It Works
- Fetches your public GitHub data via GitHub API
- Analyzes commits, repositories, languages, and contribution patterns
- Calculates streaks, peak hours, and determines your developer archetype
- Displays results in a beautiful terminal interface
- Optionally exports to a shareable image
Tech Stack
| Package | Purpose | |---------|---------| | TypeScript | Type-safe development | | React + Ink | Terminal UI framework | | Octokit GraphQL | GitHub API client | | Playwright | Headless browser for image generation | | Bun/Node.js | Runtime environments |
Development
Prerequisites
- Bun >= 1.0.0 (recommended) OR Node.js >= 18
- For Bun installation:
curl -fsSL https://bun.sh/install | bash(macOS/Linux) orpowershell -c "irm bun.sh/install.ps1 | iex"(Windows)
Setup
# With Bun (recommended)
bun install
# Or with npm
npm installDevelopment mode
# With Bun (recommended - hot reload)
bun run dev
# Or with npm
npm run devBuild
# With Bun (recommended - faster)
bun run build
# Or with npm
npm run buildRun built version
# IMPORTANT: Use Node, not Bun (Playwright compatibility)
npm start
# or
node dist/index.jsProject Structure
src/
├── index.tsx # Main CLI entry point
├── github-graphql.ts # GitHub GraphQL API client
├── analytics.ts # Stats calculation & insights
├── ui.tsx # Terminal UI components
├── export-playwright.ts # PNG export with Playwright
├── tier-calculator.ts # Scoring and tier system
├── types.ts # TypeScript type definitions
└── utils/
├── avatar-fetcher.ts # Avatar download utility
├── browser-installer.ts # Background Chromium setup
└── html-injector.ts # Template data injectionAPI Usage
You can also use this as a library:
import { GitHubGraphQLClient } from 'gh-wrapped-2025';
const client = new GitHubGraphQLClient('username', 'optional_token');
const user = await client.getUser();
const repos = await client.getRepositories();
const commits = await client.getCommitsForYear(2025);
const languages = await client.getLanguages();Rate Limits & Authentication
GitHub API has rate limits:
- Without token: 60 requests/hour (you'll likely hit this)
- With token: 5,000 requests/hour
How Token Authentication Works
The app handles this for you! When you hit the rate limit:
⚠ GitHub API Rate Limit Exceeded
Get a token at: https://github.com/settings/tokens
Paste your GitHub token (or press Ctrl+C to exit): _That's it! Just paste your token and the app continues.
- ✓ Valid token? → App continues with your data
- ✗ Invalid token? → Shows error, lets you try again
- Ctrl+C → Exit anytime
Getting a GitHub Token (30 seconds)
- Visit: https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Give it a name (e.g., "GitHub Wrapped")
- Leave all scopes unchecked - No permissions needed for public data
- Click "Generate token" at the bottom
- Copy the token
- Paste it when the app asks
Security Note: A token with no scopes can only read public data - it's completely safe and cannot modify anything.
Advanced: Skip the Prompt (Optional)
If you're developing or running this locally, you can set a token beforehand:
# Environment variable (one-time)
GITHUB_TOKEN=your_token npx gh-wrapped-2025
# Or create .env file in project directory
echo "GITHUB_TOKEN=your_token" > .envFor most users: just let the app prompt you!
Performance & Optimizations
This project is optimized for performance:
- Efficient API Usage: Single GraphQL query with caching (vs multiple REST calls)
- Smart Rate Limiting: Fetches only top 10 repositories (adjustable)
- Background Processing: Chromium installs silently while you browse stats
- Async I/O: Non-blocking file operations
- Type Safety: 100% TypeScript with strict type checking
- Small Bundle: ~800KB minified (externalized dependencies)
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and build (
bun run build && bun run build:types) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows existing style and conventions
- TypeScript compiles without errors
- No breaking changes without discussion
License
MIT License - see LICENSE file for details
Author
d3varaja
- GitHub: @d3varaja
