Repository avatar
Version Control
v0.1.1
active

github-cli

dev.wirecat/github-cli

Your GitHub issues for agents over MCP, read-only. Set up a profile with the gthb CLI first.

Documentation

gthb: GitHub CLI and MCP server for AI agents

Know what is open in your repositories without opening GitHub. Ask Claude, ChatGPT, Codex or any AI agent, and it answers from a copy of your issues, comments and READMEs on your computer, even offline.

Docs · Install · Usage

npm License: Apache 2.0

  • Ask instead of searching. "Is there an issue about the login timeout?" gets an answer without opening GitHub, in Claude Code, Codex, Claude Desktop or any app that speaks MCP.
  • Your issues, offline. Issues, comments, labels, milestones and READMEs are read from your computer, with no request to GitHub and no cost to your rate limit.
  • Read-only, and no code. A fine-grained read-only token for the repositories you pick. gthb never writes to GitHub and never copies your code or a diff.

What you get

  • The answer, not the search. Ask about an issue in your own words. The agent finds it by its words, and by meaning after sync --embed, with its state, labels, assignee and newest comments. With wcat, it also finds it beside your messages, mail and notes.
  • What is open, by repository. Open issues by repository, label, milestone or assignee, in one command.
  • READMEs beside the issues. Each repository's README, description and topics are in the copy too.
  • The rest of GitHub when you need it. Pull requests, reviews, commits and releases through the api group, which asks GitHub live, read operations only.
  • Your open issues as your tasks. Issues assigned to you become tasks in WireCat, and close when the issue does.
You:    Is anyone working on the login timeout?
Agent:  (runs gthb work issues search login timeout, then issues context octo-org/app#12)
        · octo-org/app#12 "Login fails after an hour", open, assigned to octocat, milestone v2.4
        · The last comment, from yesterday, says a fix is in review.
You:    What else is open in v2.4 with nobody on it?
Agent:  (runs gthb work issues list type:unstarted sprint:v2.4 assignee:none)
        · octo-org/app#15 "Dark theme for the settings page", label: enhancement

Invented issues, illustrative output.

Why gthb

  • A copy of your repositories on your computer. sync copies the issues, comments, labels, milestones and READMEs of the repositories you choose into a local store, and the next sync takes only what changed. Lists and search then answer with no request to GitHub, also offline.
  • A token that cannot write. gthb takes only a fine-grained token with read-only permissions, and refuses a classic token, which can write to every repository you can.
  • The token stays in your system keyring. It never appears in output, errors or run records, and is never taken as an argument.
  • Your issues beside your other context. They sit in the same local store as your messages, mail, notes and meetings from the other WireCat tools, so one search covers all of them.
  • Free and open source. Apache 2.0.

Quick start

npm install -g @wirecat/github-cli
gthb skill install                         # the agent skill, for Claude Code, Codex, Gemini CLI and OpenClaw
gthb work session start --owner octo-org   # paste your fine-grained token
gthb work repos add octo-org/app           # choose a repository
gthb work sync                             # copy its issues, comments and README
gthb work issues list type:unstarted       # its open issues

work is a profile, a name you choose for one GitHub owner. It is the first word of every command that uses an account, and none is ever assumed. octo-org stands for your user or organization.

The token. On GitHub, open Settings → Developer settings → Fine-grained personal access tokens. Choose the owner and the repositories, and give it four Read-only repository permissions: Metadata, Issues, Pull requests and Contents. session start shows these steps, asks for the token without showing it and keeps it in the system keyring.

You need Node.js 22.16 or a later 22.x, or Node.js 24 or later. gthb doctor needs no network and shows what is set up.

More: installation and sign-in, step by step

Use it with your agent

Ask in plain words. The agent picks the commands.

"Use gthb. What bugs are still open in octo-org/app?" "Use gthb. Summarise the discussion on issue 12."

  • Claude Code, Codex, Gemini CLI and other agents with a terminal run gthb themselves. gthb skill install teaches them how.
  • Claude Desktop, Cursor and other MCP apps connect to the GitHub MCP server, gthb work mcp serve.
  • ChatGPT or Claude in the browser reach it through your own tunnel, after a login with a one-time code.
gthb work mcp add claude-code --allow-writes    # or: codex
gthb work mcp config                            # the entry for Claude Desktop, Cursor and others
gthb work config set permissions.api deny       # keep the agent away from the live GitHub API

gthb only reads GitHub, so an agent over MCP can change nothing there. --allow-writes is there because the agent can write to the copy on your computer, such as notes and tags.

More: agents and MCP

What it can do

Issues

gthb work issues search login token             # every word, in any order, quoted words are one phrase
gthb work issues list label:bug assignee:none
gthb work issues show octo-org/app#12           # one issue with its state, assignee and comments
gthb work issues context octo-org/app#12        # the same with its newest comments, and what the copy lacks
gthb work milestones list

Repositories and READMEs

gthb work repos add octo-org/docs
gthb work repos list
gthb work repos show octo-org/app               # description, topics, default branch and README
gthb work documents list                        # the READMEs
gthb work search "release checklist"

Pull requests, commits, releases and the rest of GitHub's API

gthb work api list                              # every read operation, without calling GitHub
gthb skill show api                             # the operations by group, with their commands

sync copies pull requests with their reviews and comments, commits, branches, tags and releases into the store too. gthb has no command that lists them from there, so an agent reads them through the api group.

More: every command

How it works

  • A fine-grained token. You make it on GitHub, read-only, for the repositories you pick. It is kept in the system keyring, or in a private file on a computer without one.
  • A local copy. sync copies the chosen repositories into the WireCat local store, and later syncs read only what changed. It sends at most 60 requests a minute, so your own tools keep a share of GitHub's limit.
  • No writes. No command writes to GitHub, and the api group offers read operations only, without those that return code or secrets.
  • Made for scripts. --json prints one JSON value for every command, and an error comes as JSON with a code to branch on.

Settings and permissions

Each profile has a level for every command and every GitHub API operation: allow, ask, readonly or deny.

gthb work config set permissions.api deny       # no live GitHub API on this profile
gthb work config show                           # each setting and where it came from

More: settings

Security

The token can only read, and only the repositories you pick. gthb keeps it in the system keyring and never prints it. Text from GitHub is marked as untrusted, so an agent reads an issue as data, not as an instruction. Commits in the copy carry their authors' names and e-mail addresses, as GitHub shows them.

More: security · Report a vulnerability: SECURITY.md

When something goes wrong

gthb doctor                           # what is set up, without connecting
gthb work session status --check      # asks GitHub whose token it is

More: troubleshooting · Bugs go to this repository's issues.

Documentation

Everything is in docs/: installation, usage, settings, security, troubleshooting and the command reference.

Development

You need Node.js 22.16 or a later 22.x, or Node.js 24 or later, and pnpm.

pnpm install && pnpm test
pnpm build && node dist/bin/gthb.js doctor

Every request is tested against a strict fake of GitHub built from GitHub's own API description, with invented records, and nothing reaches a real account. The CLI was started from cli-template.

More: design · working rules

Part of WireCat

gthb is one of the WireCat tools: open-source, local-first command-line tools that give AI agents your context from messengers, mail, calendars, trackers and documents. Each one works on its own.

License

Apache 2.0