Metadata-Version: 2.4
Name: roboviewer
Version: 0.1.0
Summary: A local, agent-driven automated reviewer for merge requests
License-Expression: MIT
Keywords: code-review,llm,agents,git,merge-request
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx==0.28.1
Requires-Dist: jinja2==3.1.6
Requires-Dist: markdown-it-py==4.2.0
Requires-Dist: openai==2.54.0
Requires-Dist: pydantic==2.13.4
Provides-Extra: dev
Requires-Dist: complexipy==7.0.0; extra == "dev"
Requires-Dist: mypy==2.3.0; extra == "dev"
Requires-Dist: pytest==9.1.1; extra == "dev"
Requires-Dist: ruff==0.16.2; extra == "dev"
Dynamic: license-file

# Roboviewer

Automated code review for merge requests, running entirely on your machine.

Point it at two branches and it comes back with a ranked list of problems worth
fixing — not a wall of style nitpicks.

```bash
roboviewer develop
```

```
▸ feature/discount → develop: 12 files, 8 checklist items
• Correctness and logic errors: 3 findings (ok) · 41200 tokens · 62s
• Error handling: 1 findings (ok) · 38900 tokens · 55s
...
▸ Confirmed 4 of 11

  F001  [Blocker] src/cart.py:42 — race when the cart is updated concurrently
  F002  [Major] src/api.py:118 — the change breaks older clients

Confirmed 4 of 11 · 167100 tokens · 67% from cache
Report: .roboviewer/runs/20260730-172900/report.md
```

*Findings come back in English. `--language ru` asks the model for another one
without touching the prompts — see [Output language](docs/language.md).*

## The problem

**Review arrives late, and tired.** A merge request waits hours or days, and by
the time someone opens it they are on their fourth review of the afternoon. The
blocker ships under three comments about whitespace.

**Hosted reviewers want your code.** CodeRabbit, Copilot and the rest do good
work, but every one of them means uploading the repository to somebody else's
infrastructure. Inside a corporate network that is where the conversation ends.

**They also want your forge.** They plug into GitHub or GitLab and review what is
already a merge request. Looking over your own branch *before* you open it, or
reviewing a mirror that lives nowhere but your laptop, is not something they do.

**Pasting a diff into a chat window invents problems.** Given a few lines of
context, a model will confidently report a missing nil check that sits twenty
lines above the hunk. Nothing is ranked, nothing is verified, and a real blocker
arrives in the same flat list as a naming preference.

## What you get

**Your code stays where it is.** Roboviewer talks to any OpenAI-compatible
endpoint — including a corporate gateway — so reviews never leave the network you
already trust. Nothing is uploaded anywhere else, and there is no service to sign
up for.

**Any git repository, no integration.** It reads two branches through plain git.
No app to install on your organisation, no webhooks, no permissions to request.

**Review before you open the MR.** Run it on your own branch, fix what it finds,
and let the humans spend their attention on design instead of on the bug you
would have caught yourself.

**A ranked list you can act on.** Findings carry a severity, a file and a line,
and a final judge pass throws out the ones that do not survive a second look.

## Requirements

- Python 3.11+
- git
- An OpenAI-compatible endpoint **with tool calling** — the agents drive the
  review through tools, so a completions-only gateway will not work.
  `roboviewer --check-provider` tells you which side of that line yours is on.

## Install

```bash
git clone git@github.com:axazeano/Roboviewer.git && cd Roboviewer
python3 -m venv .venv && .venv/bin/pip install -e .
ln -sf "$PWD/.venv/bin/roboviewer" ~/.local/bin/roboviewer
```

## Configure

```bash
mkdir -p ~/.config/roboviewer
cp config.example.toml ~/.config/roboviewer/config.toml
export ROBOVIEWER_API_KEY=...
roboviewer --check-provider
```

Set `provider.base_url` and `reviewer.model`. Everything else has working
defaults and is documented inline in [config.example.toml](config.example.toml).
`--check-provider` makes a handful of targeted requests and names what is wrong
— wrong auth scheme, a `base_url` missing `/v1`, a gateway that cannot do tool
calling — instead of leaving you to infer it from eight agents failing at once.

The sections, the rule that `--config` replaces rather than layers, and what to
do about rate limits: [Configuration](docs/configuration.md).

## Use

```bash
roboviewer <target> [source]
```

The target branch is required. The source defaults to your current branch, and
naming it explicitly lets you review someone else's branch without checking it
out.

```bash
roboviewer develop                    # current branch into develop
roboviewer develop feature/login      # someone else's branch
roboviewer -C ~/projects/app develop  # a repository living elsewhere
```

Reports land in `.roboviewer/runs/<timestamp>/`, and `--diff-only` shows what
would be reviewed without spending tokens. Every flag:
[Command line](docs/cli.md).

## Documentation

| Page | What is in it |
| --- | --- |
| [Configuration](docs/configuration.md) | The config file, checking the gateway, rate limits |
| [Command line](docs/cli.md) | Every flag and the environment variables behind them |
| [How it works](docs/how-it-works.md) | Whole files, the reference pre-pass, one agent per concern, the judge |
| [Reports and output](docs/reports.md) | What a run writes, the four formats, overriding a template |
| [Continuous integration](docs/ci.md) | Exit codes, and a job for GitLab and for GitHub |
| [Customise the checklist](docs/checklists.md) | Adding a concern without touching code |
| [Output language](docs/language.md) | Findings in a language other than English |
| [Tuning](docs/tuning.md) | Prompts, how many agents, thinking, the turn limit |

[docs/](docs/) also carries the tooling baseline and how the measurement corpus
is built.

## What it doesn't do

- It does not post comments on your merge request, and does not talk to GitHub
  or GitLab at all. Output is files on disk; in CI it is the pipeline that
  publishes them, from formats the forge already understands.
- It does not modify your code. The agents get read-only tools —
  `read_file`, `grep`, `list_files`, `git_show` — and nothing else.
- It does not replace a human reviewer. It catches the class of problem that
  survives a tired read; it has no idea whether the feature was worth building.

## License

MIT — see [LICENSE](LICENSE).
