A simple command-line application built in Node.js that fetches and displays a GitHub user’s recent public activity. This project allows users to view actions such as commits, issues, stars, and forks directly from the terminal.
- Fetch recent public activity of a GitHub user
- Display activity in a readable, human-friendly format
- Supports common GitHub events (pushes, issues, stars, forks)
- Graceful error handling for invalid usernames and API failures
- No external libraries or frameworks required
- Node.js (version 16 or higher recommended)
- npm (included with Node.js)
- Command Line (CMD, PowerShell, or Terminal)
git clone https://github.com/your-username/github-activity.git
cd github-activitynpm install This project does not use external dependencies. npm is only required for CLI setup.
node github-activity.js <username>Example:
node github-activity.js octocatnode github-activity.js octocatnpm linkThen run:
github-activity octocat- Pushed 3 commits to octocat/Hello-World
- Opened an issue in octocat/Hello-World
- Starred octocat/Spoon-Knife
- Forked octocat/Hello-World to yourname/Hello-WorldThe application uses the GitHub public events API:
https://api.github.com/users/<username>/events/publicThe API returns a list of recent public events performed by the specified user.
The application handles the following cases:
- Invalid or non-existent GitHub usernames (404 errors)
- GitHub API rate limiting (403 or 429 errors)
- Network or connection failures
- Users with no recent public activity Clear and informative error messages are displayed when an error occurs.
https://roadmap.sh/projects/github-user-activity
- No external libraries or frameworks are used.
- All HTTP requests are made using Node.js native modules.
- This project is intended for learning and practice purposes.