feat: expose read-only local review CLI
This commit is contained in:
@@ -13,6 +13,21 @@ cargo run -- --config examples/config.rb notes.txt
|
||||
|
||||
Without a file, vamp opens an unnamed buffer. A nonexistent file opens an empty buffer. `cargo run -- --help` lists the command-line options.
|
||||
|
||||
### Read local reviews without opening the editor
|
||||
|
||||
```sh
|
||||
vamp --review list --repo .
|
||||
vamp --review list --repo . --json
|
||||
vamp --review show 1 --repo . --json
|
||||
vamp --review show 1 --repo . --all
|
||||
```
|
||||
|
||||
The review CLI discovers the Git/Jujutsu checkout from `--repo` (default: current directory). It uses the same default configuration, `--config PATH`, `--no-config`, and `review_directory` as the editor, but starts no editor workers or terminal UI. Missing storage lists no reviews without creating a database; incompatible storage is rejected and preserved.
|
||||
|
||||
`show` includes unresolved comments by default; `--all` includes resolved comments too. Human-readable output is the default. JSON includes the canonical repository root, storage review ID/revision, summary/verdict, total/resolved/unresolved counts, and comments with exact zero-based, end-exclusive grapheme anchors and selected source excerpts—not whole source files. `list --json` returns the repository and review metadata/counts without comments. Explicit editor JSON exports still contain complete anchor source text.
|
||||
|
||||
`vamp review` still opens a file named `review`; `vamp -- --review` opens a file named `--review`.
|
||||
|
||||
## Getting started
|
||||
|
||||
Vamp starts in Normal mode. Press `i`, type text, then Esc to return to Normal. Type `:save` (alias `:w`) and Enter to save, or `:save path` to name an unnamed buffer. Type `:quit` (alias `:q`) and Enter to quit; it refuses unsaved changes in any open buffer. `:force_quit` (alias `:q!`) explicitly discards changes and quits.
|
||||
|
||||
Reference in New Issue
Block a user