vk stands for View Komments because vc was already taken back in the
1970s, and no one argues with a greybeard. This command line tool fetches
unresolved GitHub code review comments for a pull request and displays them
with colourful terminal markdown using
Termimad.
This tool is intended for use by AI coding agents such as Aider, OpenAI Codex or Claude Code (without implying association with any of these companies).
vk pr <pull-request-url-or-number> [FILE ...]Specify file paths to show only comments for those files. Outdated threads are
hidden by default; pass --show-outdated (or -o) to include them.
Print the current version and exit with:
vk --versionvk now uses OrthoConfig v0.8.0 for
configuration. A global --repo option or the VK_REPO environment variable
sets the default repository when passing only a pull request number.
The CLI provides three subcommands:
pr— show unresolved pull request comments. It begins with acode reviewbanner (========== code review ==========), summarises files and comment counts, shows areview commentsbanner (========== review comments ==========) before individual threads, then prints anend of code reviewbanner (========== end of code review ==========). Pass file paths after the pull request to restrict output to those paths. Use--show-outdatedto include outdated threads.issue— read a GitHub issue (to do)resolve— resolve a pull request review thread. Accepts a comment reference (#discussion_r<ID>or full URL). Use-m, --message <MESSAGE>to post a reply before resolving (only when built with theunstable-rest-resolvefeature).
When the feature is disabled, the message flag is ignored and only the GraphQL resolution is performed.
vk loads default values for subcommands from configuration files and
environment variables. When these defaults omit the required reference field,
the tool continues with the value provided on the CLI instead of exiting with
an error.
If you pass just a pull request number, vk tries to work out which repository
you meant. It consults three sources in order:
- the configured repository (
--repoorVK_REPO), set toowner/repowith or without a.gitsuffix; - the GitHub URL recorded in
.git/FETCH_HEAD, written bygit fetch. In fork workflows this still points at the upstream repository where pull requests live, so it takes precedence overorigin; - the URL of the
originremote, used as a last-resort fallback. This is what letsvk prwork in a freshgit worktree addtarget wheregit fetchhas not yet been run inside the worktree.
If none of these resolve to a GitHub owner/repo, vk refuses to run with
only a number.
vk uses the GitHub GraphQL API. Set GITHUB_TOKEN, VK_GITHUB_TOKEN, pass
--github-token, or add github_token to ~/.config/vk/config.toml (or the
path provided via VK_CONFIG_PATH) to authenticate. If no token is set, you'll
get a warning and anonymous requests may be rate limited. When VK_CONFIG_PATH
points at a file that cannot be parsed, vk exits early with a
configuration error: … message rather than silently falling back to
auto-discovered configuration.
The token only needs read access. Select the public_repo scope (or repo for
private repositories). See docs/github-token.md for a
detailed guide to creating one.
vk pr https://github.com/leynos/mxd/pull/31
vk pr https://github.com/leynos/mxd/pull/31 src/main.rsvk renders comments with emoji for clarity. If these appear as random
characters, your terminal locale may not be UTF-8. Set LC_ALL or LANG
accordingly. vk prints a warning when it detects a non UTF-8 locale.
Install the pre-built Linux release artifact with cargo-binstall:
cargo binstall vkRelease archives are published for:
x86_64-unknown-linux-gnuaarch64-unknown-linux-gnu
Other targets can still build from source using Cargo:
cargo install --path .This project is licensed under the ISC Licence. See LICENSE for details.