Command line
Overview
The two binaries that take commands, and what each one covers.
Two binaries take commands:
| Binary | Installed by | Commands |
|---|---|---|
riff |
just install (macOS: Riff.app plus a riff shim in ~/.cargo/bin; Linux: the binary in ~/.cargo/bin) |
the app (riff, riff <path>, riff <PR URL>; riff --web serves the browser UI in the foreground); pr, review, prepare, article run headless in the terminal |
riff-diff |
just install-cli (also part of just install) |
diffs; pr, review |
riff pr … and riff-diff pr … are the same command, and so are the two review forms. riff-web takes prepare and article too. Anything else typed after riff is handed to the app, not to a terminal command.
| Command | Page |
|---|---|
riff-diff [<rev>…] [<path>] |
Diffs |
riff pr inbox|list|status|checks|threads|open and the write verbs |
Pull requests |
riff review … |
Local reviews |
riff prepare <PR> |
Prepare a review |
riff article <spec> |
Walkthrough article |
Text or JSON
Every command prints text for people by default. --json prints one document for scripts; for riff pr it carries a "schema": "riff.pr.<verb>/1" field whose number goes up only on a breaking change. riff prepare --json prints one event per line instead.
Saved copies
riff pr and riff review share their saved GitHub data with the app. Read commands use the saved copy unless you pass --refresh, and --offline never asks GitHub at all. That keeps them fast enough for a shell prompt or a menu bar.
Exit codes
Each command documents its own (riff-diff, riff article and riff prepare differ), but riff pr and riff review share a core:
| Code | Meaning |
|---|---|
| 0 | OK |
| 1 | Failed |
| 2 | Usage error |
| 3 | Not found |
| 5 | GitHub unavailable or not signed in, and nothing saved |
| 10 | --exit-code was passed and something needs you |