Skip to content

feat(github): add GitHub adapter with 5 public API commands#583

Open
kagura-agent wants to merge 1 commit intojackwener:mainfrom
kagura-agent:feat/github-adapter
Open

feat(github): add GitHub adapter with 5 public API commands#583
kagura-agent wants to merge 1 commit intojackwener:mainfrom
kagura-agent:feat/github-adapter

Conversation

@kagura-agent
Copy link
Copy Markdown

What

Adds a native GitHub adapter with 5 commands using GitHub's public REST API. No authentication required, no browser needed.

Commands

Command Description Example
github trending Trending repos (recent stars) opencli github trending --language python --limit 5
github search Search repositories opencli github search --query "agent memory" --limit 10
github repo Repository details opencli github repo --owner jackwener --name opencli
github user User profile opencli github user --username jackwener
github issues List repository issues opencli github issues --owner jackwener --name opencli --state open

Why

GitHub is the most used developer platform and a natural fit for an AI-agent CLI tool. Surprisingly it wasn't covered yet. All commands are pure YAML declarative adapters — zero TypeScript, minimal maintenance.

Implementation

  • 5 YAML files in src/clis/github/
  • Uses GitHub REST API v3 (api.github.com)
  • strategy: public, browser: false
  • Trending uses GitHub search API (sorted by stars, filtered by creation date) since the unofficial trending APIs are unreliable

Testing

All 5 commands manually verified:

$ opencli github search --query openclaw --limit 3
┌──────┬───────────────────────────────────┬────────┬───────┬────────────┬───────────────────────┐
│ Rank │ Name                              │ Stars  │ Forks │ Language   │ Description           │
├──────┼───────────────────────────────────┼────────┼───────┼────────────┼───────────────────────┤
│ 1    │ openclaw/openclaw                 │ 340056 │ 67032 │ TypeScript │ Your own personal AI… │
└──────┴───────────────────────────────────┴────────┴───────┴────────────┴───────────────────────┘

$ opencli github trending --limit 3
┌──────┬───────────────────────┬───────┬───────┬────────────┬─────────────────────────┐
│ Rank │ Name                  │ Stars │ Forks │ Language   │ Description             │
├──────┼───────────────────────┼───────┼───────┼────────────┼─────────────────────────┤
│ 1    │ slavingia/skills      │ 5199  │ 368   │ -          │ Claude Code skills…     │
│ 2    │ larksuite/cli         │ 2622  │ 116   │ Go         │ A command-line tool…    │
│ 3    │ magnum6actual/flipoff │ 2308  │ 280   │ JavaScript │ Free split-flap…        │
└──────┴───────────────────────┴───────┴───────┴────────────┴─────────────────────────┘

New commands:
- github trending — trending repos (by recent stars)
- github search — search repositories
- github repo — repository details
- github user — user profile
- github issues — list repository issues

All commands use GitHub's public REST API (no auth required,
no browser needed). Pure YAML declarative adapters.

Tested: all 5 commands return structured data correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant