1.0.0 • Published 6 months ago

github-user-activity v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

  1. Clone the repository:

    git clone https://github.com/yourusername/github-user-activity.git
  2. Navigate to the project directory:

    cd github-user-activity
  3. Install dependencies:

    npm install

Usage

  1. Run the CLI with a GitHub username as an argument:

    node src/commands.js <username>

    Example:

    node src/commands.js kamranahmedse
  2. 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.