Skip to content

internetOnion/github-activity-cli

Repository files navigation

GitHub Activity CLI

A command-line tool to fetch and display recent GitHub activity for any user, built with Java.

Features

  • Fetches recent GitHub public events for any user
  • Displays activity in a human-readable format
  • Supports multiple event types:
    • Push events (with commit count)
    • Issues (opened/updated)
    • Pull requests (opened/updated)
    • Stars, forks, creates, deletes, comments

Requirements

  • Java 21+
  • Maven 3+

Installation

1. Clone the repository

git clone https://github.com/your-username/github-activity.git
cd github-activity

2. Build the JAR

mvn package

3. (Optional) Create a shell script for easier usage

Create a file called github-activity in /usr/local/bin/:

#!/bin/bash
java -jar /path/to/target/github-activity-1.0-SNAPSHOT.jar "$@"

Make it executable:

chmod +x /usr/local/bin/github-activity

Usage

java -jar target/github-activity-1.0-SNAPSHOT.jar <username>

Or if you set up the shell script:

github-activity <username>

Example

github-activity kamranahmedse

Example Output

GitHub Activity for user: borared
- Pushed 3 commits to borared/developer-roadmap at 2026-03-05 10:22:11
- Opened an issue in borared/developer-roadmap at 2026-03-05 09:15:43
- Starred borared/developer-roadmap at 2026-03-04 22:10:05

Project Structure

src/
└── main/
    └── java/
        └── com/reaksmey/github_activity/
            ├── Application.java          # Entry point, CLI handling, output formatting
            ├── GitHubActivityClient.java # HTTP client for GitHub API
            └── GitHubEvent.java          # Event model

Dependencies

Dependency Version Purpose
Jackson Databind 3.1.0 JSON parsing
Lombok 1.18.42 Boilerplate reduction

GitHub API

This project uses the GitHub Events API:

GET https://api.github.com/users/{username}/events

Note: The API is unauthenticated and limited to 60 requests per hour per IP. Returns up to the last 90 days of public activity.

About

A command-line tool to fetch and display recent GitHub activity for any user, built with Java.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages