Metadata-Version: 2.4
Name: twgh
Version: 0.1.1
Summary: Read-only GitHub reviewer CLI: triage, re-review diffs, comment threads
Author-email: sysid <sysid@gmx.de>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.15.1
Requires-Dist: rich>=13.0.0

# twgh

Read-only GitHub reviewer CLI: triage what needs you, re-review only what changed
since you last looked (force-push robust), and see which of your comments were
addressed — across github.com and GitHub Enterprise.

## Prerequisites

- The GitHub CLI [`gh`](https://cli.github.com), authenticated for each host you
  review on: `gh auth login --hostname <host>`. twgh borrows gh for auth, host
  routing, and transport; it never handles your token.

## Install

```sh
make install      # uv tool install -e . + bash completion
```

## Commands

| Command | What |
|---|---|
| `twgh status` | Cross-repo rollup of PRs needing your review; ★ marks PRs that moved since your last run. |
| `twgh diff <ref>` | Diff of the files you commented on, since your last review (`--all` for the whole PR). Force-push robust. |
| `twgh comments <ref>` | All comments, chronological (`--by <user>`, `--mine`, `--all`). |
| `twgh threads [<ref>]` | Open conversations with a resolved / changed / untouched verdict. No `<ref>` = global inbox across repos. |
| `twgh open <ref>` | Open the PR in a browser (for the write-actions twgh stays out of). |

`<ref>` is a PR URL, `host/owner/repo#N` (the form `status` prints — paste it
straight back), `owner/repo#N`, `owner/repo/N`, or a bare number inside a repo.

## Host selection

`-H/--gh-host` overrides `$GH_HOST`, which defaults to `github.com`. Works as a
global option (`twgh -H bmw.ghe.com status`) or per command.

## The re-review verdict

`twgh threads` classifies each open conversation by what GitHub knows:

- `✓ resolved` — the thread is marked resolved
- `~ changed` — your anchored code moved since you commented (look with `twgh diff`)
- `· untouched` — your point still stands as written

## Development

```sh
make test              # pytest + coverage (floor 85%)
make static-analysis   # ruff lint-fix, format, ty
```
