A lightweight and efficient Command Line Interface (CLI) application to fetch the recent activity of a GitHub user and display it directly in your terminal. This project interacts with the GitHub REST API to parse and cleanly format public user events.
Project link: https://roadmap.sh/projects/github-user-activity
- Fetch User Activity: Retrieve recent public events for any valid GitHub username using the GitHub API.
- Categorized Event Display: Automatically filters and displays relevant user actions:
- Pushes: Shows the number of commits pushed to specific repositories.
- Creations: Tracks newly created branches or tags.
- Forks: Lists repositories forked by the user.
- Stars: Displays repositories starred (watched) by the user.
- Releases: Highlights recently published releases.
The application runs directly from your command line. Before running it, ensure you have Python and the requests library installed.
Execute the script by passing the target GitHub username as an argument.
python github-activity.py kamranahmedseWhen a user has recent public events, the CLI will output a clean summary: Plaintext
---------- Recent activity of kamranahmedse ----------
Pushed 3 commits to kamranahmedse/developer-roadmap
Starred kamranahmedse/developer-roadmap
Created 1 branches/tags in kamranahmedse/developer-roadmappython github-activity.pyOutput: Error: Username not provided.
python github-activity.py invalid-username-12345Output: Error: User not found