← KettlewiseAll help

GitHub module

Reads your commits, issues and pull requests into the local cache. Never writes to GitHub: the token is read-only at GitHub's end, and the connector only makes GET requests (scripts/check_boundaries.sh fails CI on anything else).

Token setup (once, ~5 minutes)

Kettlewise only accepts a fine-grained token (github_pat_…). Classic tokens and the gh CLI's OAuth token can't be limited to read-only, so kettlewise github auth refuses them.

  1. github.com → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token.
  2. Name: kettlewise-readonly. Expiration: up to a year; auth prints the date.
  3. Resource owner: your account.
  4. Repository access: All repositories (includes future ones, still read-only) or Only select repositories (tighter; new repos must be added by hand).
  5. Repository permissions, set exactly these to Read-only, leave all else No access:

    • Contents (commits)
    • Issues
    • Pull requests
    • Metadata (required; set automatically)
  6. Account permissions: none.
  7. Generate, copy, then run:

    kettlewise github auth

    Paste at the hidden prompt. It's checked with GitHub, then stored in the macOS Keychain (service kettlewise, entry github-token). It never touches .env or the repo.

Then kettlewise sync github. The first sync reaches back KETTLEWISE_GITHUB_HISTORY_DAYS (default 365); later ones fetch only what changed since the last successful sync.

What's synced

KindWhatNotes
commitYour commits on each repo's default branchFiltered to your login
issueIssues, any stateBody truncated to 4,000 chars
prPull requests, any stateSame

Tools

github.search, github.recent_commits(start, end, repo?), github.last_commit_per_repo, github.open_items(repo?), github.merged_prs(start?, end?, repo?).

Removing access

kettlewise github forget removes the token from the Keychain. Revoke it on GitHub too if you're done with it. Synced activity stays in the cache until you delete kettlewise.db.