Skip to content

About

CLI to fetch GitHub user activity

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

GitHub User Activity CLI

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.

Features

  • 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

Requirements

  • Node.js (version 16 or higher recommended)
  • npm (included with Node.js)
  • Command Line (CMD, PowerShell, or Terminal)

How to Run the Project

1. Clone the Repository

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

2. Install the Project

npm install This project does not use external dependencies. npm is only required for CLI setup.

3. Run the Application

node github-activity.js <username>

Example:

node github-activity.js octocat

Usage Examples

Fetch User Activity

node github-activity.js octocat

Install as a CLI Command (Optional)

npm link

Then run:

github-activity octocat

Example Output

- 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-World

API Used

The application uses the GitHub public events API:

https://api.github.com/users/<username>/events/public

The API returns a list of recent public events performed by the specified user.

Error Handling

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.

Project Page

More project details at:

https://roadmap.sh/projects/github-user-activity

Notes

  • 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.

About

CLI to fetch GitHub user activity

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages