Metadata-Version: 2.4
Name: reviewer-cli
Version: 0.1.7
Summary: Deterministic pull request review for public GitHub pull requests
Author: Shalvi
Project-URL: Documentation, https://github.com/shalvirajpura2/reviewer
Project-URL: Source, https://github.com/shalvirajpura2/reviewer
Project-URL: Issues, https://github.com/shalvirajpura2/reviewer/issues
Keywords: github,pull-request,review,cli,developer-tools
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: fastapi==0.115.12
Requires-Dist: uvicorn[standard]==0.34.0
Requires-Dist: httpx==0.28.1
Requires-Dist: pydantic==2.11.3
Requires-Dist: PyJWT[crypto]==2.8.0
Requires-Dist: tree-sitter==0.24.0
Requires-Dist: tree-sitter-javascript==0.23.1
Requires-Dist: tree-sitter-python==0.23.6
Requires-Dist: psycopg[binary]==3.2.9

# Reviewer CLI

Reviewer CLI exposes the shared pull request analysis engine as a guided terminal experience.

## Install

After the package is published, install it with `pipx` for the cleanest global command setup:

```bash
pipx install reviewer-cli
```

You can also install it with `pip`:

```bash
pip install reviewer-cli
```

For local development in this repository:

```bash
pip install -e backend
```

## Configure

Reviewer CLI ships with the default GitHub device login client id, so most users can run `reviewer login` immediately after install. `GITHUB_CLIENT_ID` remains available only as an override for local or self-hosted setups.

Advanced users can still provide a token directly:

```bash
# Windows PowerShell
$env:GITHUB_TOKEN="your_token_here"
```

```bash
# macOS / Linux
export GITHUB_TOKEN="your_token_here"
```

Optional: override where Reviewer stores the local login session.

```bash
# Windows PowerShell
$env:REVIEWER_CONFIG_DIR="C:\Users\you\AppData\Roaming\reviewer-cli"
```

## Usage

```bash
reviewer login
reviewer whoami
reviewer analyze https://github.com/owner/repo/pull/123
reviewer publish-summary https://github.com/owner/repo/pull/123
reviewer logout
```

## What The CLI Does For Users

- Guides GitHub login step by step with the device link and one-time code.
- Reuses the saved GitHub session automatically so people do not have to log in again on every command.
- Renders reports in readable sections so the next action is obvious.
- Suggests what to do after login, publish, and logout.

Protected commands automatically start the login flow when no valid session is available.

If `REVIEWER_BACKEND_API_BASE` is set, `reviewer publish-summary` uses the hosted Reviewer backend instead of the local GitHub session. Configure `GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` on that backend to publish PR comments from a GitHub App bot identity. `REVIEWER_PUBLISH_GITHUB_TOKEN` remains available as a fallback.
