GitHub Activity CLI is a simple command-line interface tool that allows you to fetch and display recent GitHub activities and repositories for a specified user.
- Connect to a GitHub account
- Display recent GitHub activities
- Filter activities by type
- Show user repositories
- Disconnect from the GitHub account
-
Clone this repository:
git clone https://github.com/your-username/github-activity-cli.git cd github-activity-cli
-
Install the required dependencies:
pip install -r requirements.txt
Run the CLI by executing the main.py
file:
python main.py
-
Connect to a GitHub account
connect <username>
Example:
connect octocat
-
Show recent activities
activity [activity_type]
Example:
activity
(shows all activities) Example:activity PushEvent
(shows only push events) -
Show user repositories
repos
-
Disconnect from the GitHub account
disconnect
-
Exit the CLI Use Ctrl+C or close the terminal
github-activity-cli: connect octocat
github-activity-cli: activity
[Table displaying recent activities]
github-activity-cli: activity PushEvent
[Table displaying recent push events]
github-activity-cli: repos
[Table displaying repositories]
github-activity-cli: disconnect
github-activity-cli:
main.py
: Entry point of the applicationparser.py
: Handles command-line argument parsinggithub_api.py
: Manages GitHub API interactionsgithub_cli.py
: Contains the CLI display logicapi_cache.py
: Implements caching for API requests
- The CLI uses a simple caching mechanism to reduce API calls. Cached data expires after 3 minutes.
- Make sure you have a stable internet connection to fetch data from GitHub.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.