Skip to content

Latest commit

 

History

History
123 lines (82 loc) · 2.48 KB

File metadata and controls

123 lines (82 loc) · 2.48 KB

GitHub Activity CLI

A simple command line interface (CLI) application to fetch and display the recent activity of a GitHub user. This project helps practice working with APIs, handling JSON data, and building CLI applications. There are still missing features, feel free to contribute! Also, if you have any suggestions, please reach me: [email protected]


Features

  • Fetches recent activity of a specified GitHub user.
  • Displays user activity directly in the terminal.
  • Graceful error handling for invalid usernames or API failures.
  • Built with TypeScript for type safety and scalability.
  • No external libraries or frameworks used for fetching data.

Requirements

To run the project, ensure you have the following installed:


Installation

  1. Clone the repository:

    git clone https://github.com/batugkocak/GitHub-User-Activity-by-roadmap.sh.git
    cd github-activity-cli
  2. Install dependencies:

    yarn install
  3. Build the project:

    yarn build

Usage

  1. Run the CLI application:

    yarn start <username>

    Replace <username> with the GitHub username you want to fetch activity for.

    Example:

    yarn start kamranahmedse
  2. For development:

    yarn dev <username>
  3. Display help information:

    yarn start --help

Output Example

- Pushed 3 commits to batugkocak/github-cli
- Opened a new issue in /github-activity
- Starred batugkocak/github-activity

Development Notes

  • The application uses the GitHub API to fetch user activity.
  • API Endpoint: https://api.github.com/users/<username>/events
  • TypeScript ensures type safety and better developer experience.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/new-feature
  3. Commit your changes:
    git commit -m "Add new feature"
  4. Push to the branch:
    git push origin feature/new-feature
  5. Create a pull request.

License

This project is licensed under the MIT License.


Acknowledgments

This project was inspired by roadmap.sh/Github User Activity and serves as a learning exercise for building CLI tools and consuming APIs.