Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

GitHub User Activity CLI

A simple command line interface (CLI) tool built with Python to fetch and display the recent activity of a GitHub user. This project helped me practice working with APIs, handling JSON data, and building a CLI application.

Overview

This CLI fetches the public events of a specified GitHub user using the GitHub API and formats them for display in the terminal. It handles common events such as push events, issues, pull requests, stars, and more.

Features include:

  • Accepting a GitHub username as a command-line argument.
  • Fetching the user's recent activity from the GitHub API.
  • Displaying formatted event messages, e.g.,
    - Pushed 3 commits to kamranahmedse/developer-roadmap
  • Graceful error handling for invalid usernames, network issues, and API errors.

Installation

  1. Clone the Repository:

    git clone https://github.com/CodeSaadUmair/GitHubUserActivityCLI.git
  2. Change Directory:

    cd GitHubUserActivityCLI
  3. Set Up a Virtual Environment (Optional but Recommended):

    python3 -m venv venv
    
    venv\Scripts\activate
  4. Install Dependencies: This project uses the requests library. Install it via pip:

    pip install requests

Usage\Example

Run the CLI by passing a GitHub username as an argument:

    python github_activity.py <username>

For example:

    python github_activity.py octocat

Inspiration

This project was inspired by the roadmap.sh's GitHub User Activity project.

About

A simple Python CLI tool that fetches and displays a GitHub user's recent public activity. It leverages the GitHub API to retrieve events such as pushes, issues, pull requests, and stars, and presents them in a user-friendly, formatted output in the terminal. This project is an excellent exercise in API integration, JSON data handling, and CLI.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages