github-user-activity
v1.0.0
Published
A command-line interface (CLI) tool that fetches and displays a GitHub user's activity.
Downloads
3
Maintainers
Readme
GitHub User Activity CLI
This command-line application fetches and displays the recent activity of a specified GitHub user using the GitHub API.
Features
- Accepts a GitHub username as a command-line argument.
- Fetches the recent activity of the specified GitHub user.
- Displays the fetched activity in the terminal.
- Handles errors gracefully, such as invalid usernames or API failures.
Installation
Clone the repository:
git clone https://github.com/yourusername/github-user-activity.gitNavigate to the project directory:
cd github-user-activityInstall dependencies:
npm install
Usage
Run the CLI with a GitHub username as an argument:
node src/commands.js <username>Example:
node src/commands.js kamranahmedseThe CLI will fetch and display the recent activity of the specified GitHub user in the terminal.
Example Output
Pushed 3 commits to kamranahmedse/developer-roadmap
Opened a new issue in kamranahmedse/developer-roadmap
Starred kamranahmedse/developer-roadmapError Handling
If no username is provided:
Please provide a GitHub username as an argumentIf an invalid username is provided:
Not a valid GitHub username Please provide a valid GitHub usernameIf there is an API failure:
Failed to fetch user events: <error message>
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
License
This project is licensed under the MIT License.
