GitHub API Integration Demo (CLI)
A small, documentation-first CLI that calls the GitHub REST API and prints a handful of repositories for a given user. It’s built as a reference integration: fast setup, clear configuration, and predictable error handling.
-
API + Data
Calls the GitHub REST API to fetch a short list of repositories for a user (a quick, reviewable payload). Inputs are environment variables: GITHUB_USERNAME and an optional GITHUB_TOKEN for higher rate limits.
-
UI States
Handles the states a reviewer will test: missing env vars, invalid usernames (404), bad tokens (401), and rate limiting (403). Errors are mapped to actionable messages instead of raw stack traces.
-
Architecture
Single-purpose TypeScript CLI: load config → call GitHub → map/format response → print. Kept small so the entire flow is readable in one sitting.
-
Testing
Kept intentionally lightweight; next steps would add unit tests around config parsing and HTTP error mapping, plus a CI job to run lint/typecheck/tests on push.