@0x-may/git-peek
v1.0.2
Published
Peek into your github activity from the terminal
Readme
git-peek
View your GitHub activity directly from the terminal
A lightweight, secure CLI tool that displays your GitHub contributions, activity, and stats without opening a browser.
Features
- Secure authentication with GitHub Personal Access Tokens
- Daily activity tracking - See today's commits, PRs, and issues
- Weekly summaries - 7-day activity overview
- Monthly reports - 30-day contribution history
- Local storage - No external servers, your data stays private
- Lightning fast - Instant results from GitHub's API
Installation
# Install globally via npm
npm install -g @0x-may/git-peek
# Or clone and install locally
git clone https://github.com/0x-mayank/git-peek.git
cd git-peek
npm install
npm linkGetting Started
1. Generate a GitHub Token
- Go to GitHub Settings
- Click Developer settings → Personal access tokens → Fine-grained tokens
- Click Generate new token
- Give it a name (e.g.,
git-peek-cli) - Set expiration (30-90 days recommended)
Repository Access
- Select All repositories (recommended)
- This applies to all current and future repositories you own
- Also includes public repositories (read-only)
Required Permissions
Under Repositories tab, grant these read-only permissions:
- Commit statuses - Read-only
- Contents - Read-only
(Repository contents, commits, branches, downloads, releases, and merges) - Issues - Read-only
(Issues and related comments, assignees, labels, and milestones) - Metadata - Read-only (Required)
(Search repositories, list collaborators, and access repository metadata) - Pull requests - Read-only
(Pull requests and related comments, assignees, labels, milestones, and merges)
Under Account tab:
- Email addresses - Read-only
(Manage a user's email addresses) - Followers - Read-only
(A user's followers) - Profile - Read and write
(Manage a user's profile settings)
Do NOT grant:
- Write access to repositories
- Admin access
- Workflow access
- Secrets access
- Click Generate token and copy it immediately
- Important: GitHub will not show this token again!
2. Login
git-peek login YOUR_TOKEN_HEREYou should see:
Logged in as your-usernameUsage
Check Authentication
git-peek whoamiShows your GitHub username, public repos, and follower count.
Today's Activity
git-peek todayDisplays:
- Commits made today
- Pull requests opened
- Issues created
- Active repositories
Weekly Summary
git-peek weekShows last 7 days of activity with:
- Daily breakdown
- Total commits, PRs, issues
- Active repositories
Monthly Report
git-peek month30-day activity overview with:
- Active days count
- Total contributions
- Repository activity
Logout
git-peek logoutRemoves stored token and logs you out.
Example Output
Today's GitHub Activity
Date: 4/1/2026
Commits : 5
PRs opened : 2
Issues opened: 1
Active repos : git-peek, my-projectHow It Works
- Authentication: Uses GitHub Personal Access Tokens (no username/password)
- Storage: Token stored locally in
~/.git-peek/config.json - API: Leverages GitHub REST API for recent activity
- Privacy: No external servers, all data fetched directly from GitHub
- Security: Read-only access, token can be revoked anytime
Security
- Token stored only on your machine
- No telemetry or tracking
- No backend servers
- Read-only GitHub access
- Token revocable anytime from GitHub settings
Important Notes
Activity Tracking vs. Exact Commits
git-peek shows GitHub activity, not exact commit counts:
- Uses GitHub Events API (limited to ~90 days of history)
- Counts push events, which may differ from actual commits
- Best for recent activity tracking (today, week, month)
- Yearly stats may be incomplete due to API limitations
For exact contribution data, refer to your GitHub contribution graph.
Technical Details
Built with:
- Node.js
- Axios (HTTP client)
- Chalk (terminal styling)
- GitHub REST API
Requirements:
- Node.js >= 14.0.0
- GitHub Personal Access Token
Author
Mayank
- GitHub: @0x-mayank
Show Your Support
Give a ⭐️ if this project helped you!
Feedback
Found a bug or have a feature request? Open an issue!
Made with ❤️ by mayank.
