GitHub Trending CLI

CLI application that talks to GitHub API and shows the trending repositories

Start building, submit solution and get feedback from the community.
2Submit Solution
5 upvotes10 upvotes

Goal for this project is to help you practice building CLI applications, integrating third party APIs, handling errors, configurations etc.

Create a command-line interface (CLI) tool that interacts with the GitHub API to retrieve and display trending repositories. The tool will allow users to specify a time range (day, week, month, or year) to filter the trending repositories.

The CLI tool will fetch data from the GitHub API and present it in a user-friendly format. The tool should be easy to use and provide clear output.

  • Language: Pick any backend language

  • GitHub API: Utilize the GitHub REST API for fetching repository data.

  • Authentication: No authentication required for public repositories.

  • Time Range Options: Support filtering by day, week, month, and year.

  • Data Fetching: Implement error handling for API requests.

  • Data Parsing: Parse the JSON response from the GitHub API.

  • Sorting: Sort repositories by star count.

  • Output Formatting: Display the trending repositories in a clear and readable format (e.g., repository name, description, number of stars, language).

  • Command-Line Arguments:

    • --duration: Specifies the time i.e. day, week, month, year). Default to week.

    • --limit: Specifies the number of repositories to display. Default to 10.

  • Error Handling: Implement robust error handling for invalid input and API errors.

  • Documentation: Provide clear instructions on how to install and use the tool.

  • Example Usage: trending-repos --duration month --limit 20

Join the Community

roadmap.sh is the 6th most starred project on GitHub and is visited by hundreds of thousands of developers every month.

Rank 6th out of 28M!

344K

GitHub Stars

Star us on GitHub
Help us reach #1

+90kevery month

+2.1M

Registered Users

Register yourself
Commit to your growth

+2kevery month

42K

Discord Members

Join on Discord
Join the community

RoadmapsGuidesFAQsYouTube

roadmap.shby@kamrify

Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh·Terms·Privacy·

ThewNewStack

The top DevOps resource for Kubernetes, cloud-native computing, and large-scale development and deployment.