GitHub User Activity CLI is a lightweight command-line tool that enables users to fetch and display GitHub user activities. It supports tracking over 12 event types, provides real-time data, and offers options to export activity data to text files for convenience. Simplify monitoring user contributions and stay updated seamlessly.
The GitHub User Activity CLI is a lightweight command-line tool developed in Python that allows users to effortlessly fetch and display public activity from GitHub users. This tool is ideal for tracking recent activities such as pushes, issues, pull requests, and more, providing a comprehensive overview of user interactions on GitHub.
Features
- Simple & Fast: Retrieve user activity with just a single command.
- Comprehensive Activity Tracking: Supports a variety of GitHub activities including pushes, issues, pull requests, stars, and more.
- File Export: Easily save activity data to a text file for future reference.
- Error Handling: Robust input validation with informative error messages.
- Real-time Data: Fetches the latest data directly from the GitHub API.
- Multiple Event Types: Supports over 12 different GitHub event types for extensive tracking.
Usage Overview
The GitHub User Activity CLI can be used directly from the command line to fetch a user's activity data:
github-activity <username>
For example:
github-activity octocat
github-activity torvalds
github-activity gvanrossum
Sample Outputs
Upon execution, the tool retrieves a user’s recent public activity and saves it in a text file named <username>_activity.txt
. The console will show a success message indicating the completion of the process:
Activity saved to file successfully.
Typical Output in File
The saved activity file will contain detailed entries such as:
Pushed 2 commits to octocat/Hello-World.
Starred microsoft/vscode.
Opened an issue in octocat/Spoon-Knife.
Forked rails/rails.
Supported Activity Types
The CLI monitors and reports on various GitHub activities, including but not limited to:
- PushEvent: Code commits pushed
- IssuesEvent: Creation and updates of issues
- PullRequestEvent: Activities related to pull requests
- ForkEvent: Repository forks
- WatchEvent: Starring repositories
- CreateEvent: Creation of branches or tags
- DeleteEvent: Deletion of branches or tags
- IssueCommentEvent: Comments on issues
- PullRequestReviewEvent: Reviews on pull requests
- ReleaseEvent: Management of releases
- GollumEvent: Edits made to wikis
- MemberEvent: Changes in collaborators
Technical Highlights
- Language: Python 3.8+
- API: Integrates with the GitHub REST API v3
- Dependencies: Utilizes the requests library for API interactions
- Storage: Outputs to a text file without requiring persistent storage
- Efficiency: Adheres to GitHub API rate limits while maintaining minimal processing overhead.
For developers interested in extending the tool, new event types can easily be added to enhance its functionality, fostering community contributions for broader support.
This project serves as an efficient solution for monitoring GitHub user activities, making it a valuable tool for developers, teams, and community managers.
No comments yet.
Sign in to be the first to comment.