A lightweight API built with HonoJS on Cloudflare Workers that fetches your GitHub repositories and returns them as Markdown β split into π Popular Projects and π New Projects.
- Fetches repositories from the GitHub REST API by username
- Filters out forked repos (shows only original work)
- Top 3 most starred repos β Popular Projects
- Top 3 newest repos β New Projects
- Returns formatted Markdown with clickable links
- Zod query validation via
@hono/zod-validator - Proper error handling (400 / 500 / 502)
npm installCreate a .env file for local development:
GITHUB_TOKEN=ghp_your_token_here
GITHUB_USERNAME=your_github_usernameOr set them as Cloudflare secrets for production:
wrangler secret put GITHUB_TOKEN
wrangler secret put GITHUB_USERNAMEnpm run devhttp://localhost:8787/projects
http://localhost:8787/projects?limit=5&perpage=50
npm run deployReturns a Markdown-formatted list of your top repositories. Username is read from the GITHUB_USERNAME environment variable.
Query Parameters:
| Param | Required | Description |
|---|---|---|
limit |
β | Number of repos per category (1β500, default: 3) |
perpage |
β | Repos to fetch from GitHub API (1β1000, default: 30) |
Example Response:
## π Popular Project
- [repo-name](https://github.com/user/repo-name) - A cool project
## π New Project
- [new-repo](https://github.com/user/new-repo) - Just created thisEnvironment Variables:
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
β | GitHub API token |
GITHUB_USERNAME |
β | GitHub username |
Error Responses:
| Status | Description |
|---|---|
| 400 | Invalid query parameters |
| 500 | Missing env var (token or username) |
| 502 | GitHub API request failed |
You can auto-update your GitHub profile README with your projects using the included GitHub Action.
wrangler secret put GITHUB_TOKEN
wrangler secret put GITHUB_USERNAME
npm run deployIn your profile repo (username/username), add these markers where you want the projects to appear:
<!-- PROJECTS:START -->
<!-- PROJECTS:END -->Copy .github/workflows/update-readme.yml to your profile repo.
Go to your profile repo β Settings β Secrets and variables β Actions β New repository secret:
- Name:
PROJECTS_API_URL - Value:
https://github-stats.<your-subdomain>.workers.dev/projects
Run the action manually from the Actions tab, or wait for the next scheduled run (every 12 hours).