1.0.0 • Published 6 months ago
github-user-activity v1.0.0
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.git
Navigate to the project directory:
cd github-user-activity
Install dependencies:
npm install
Usage
Run the CLI with a GitHub username as an argument:
node src/commands.js <username>
Example:
node src/commands.js kamranahmedse
The 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-roadmap
Error Handling
If no username is provided:
Please provide a GitHub username as an argument
If an invalid username is provided:
Not a valid GitHub username Please provide a valid GitHub username
If 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.
1.0.0
6 months ago