TrylleDocs
CLI

Diff Reviews

Review working trees, commits, ranges, stacks, and Trylle pull requests in the terminal diff viewer.

try diff opens an interactive, side-by-side terminal viewer. It auto-detects Git and jj repositories, and it can fetch a Trylle pull request when given a number or URL.

try diff

Use try pr diff NUMBER when you need the platform pull request diff. Scripts and agents can request its structured form. Use try diff when a person should navigate, search, annotate, or compare the change interactively.

Select the change

Working tree and commits

# Uncommitted working-tree changes
try diff

# One commit
try diff HEAD~1

# Two-dot and three-dot ranges
try diff main..feature
try diff main...feature

# Two plain references
try diff main feature

# A range plus the working tree
try diff main..-

--staged belongs to try explain, not try diff. The default working-tree view accounts for local changes through the active VCS backend.

Pull requests

try diff --pr 73 --origin OWNER/NAME
try diff 73 --origin OWNER/NAME
try diff https://trylle.com/OWNER/NAME/pulls/73
try diff --detect-pr

A bare pull request number needs repository context. --origin OWNER/NAME overrides the repository inferred from the origin remote. Pull request input requires a valid Trylle platform credential.

Filter and focus

try diff main..feature --file src/parser.rs
try diff main..feature --focus src/parser.rs
try diff main..feature --wrap

--file limits the diff to selected paths. --focus keeps the full file set but starts on one path. --wrap soft-wraps long lines instead of requiring horizontal scrolling.

Review a stack commit by commit

try diff main..feature --stacked
try diff HEAD~5..HEAD --stacked

Stacked mode requires an explicit two-dot or three-dot range. It does not accept a single commit, a pull request, or main..-. Use ctrl+l and ctrl+h to move between commits; viewed and annotation state is tracked separately for each commit during the session.

Watch local changes

try diff --watch

Watch mode reloads when files change in the local working tree. Press w to toggle it in the TUI. It is disabled for pull request mode because a remote PR is not a local filesystem watch target.

Press ? at any time for the complete, version-matched keybinding list.

KeyAction
j / k, arrowsNavigate files or scroll the diff
tabToggle the file sidebar
1 / 2Focus the sidebar or diff
ctrl+pOpen the file picker
{ / }Focus the previous or next hunk
m / shift+mMark a hunk viewed and advance, or unmark and go back
spaceToggle the current file as viewed
/, then n / NSearch in the current file and move between matches
ctrl+fFuzzy-search across all files with a preview
eOpen the file in the configured editor
oOpen the file in the browser in PR mode
yCopy the selection or current filename
i / IAdd an annotation, or manage all annotations
rRefresh the current diff or PR
q / escExit

File and hunk viewed markers are local session state. The current Trylle API does not expose server-side viewed files, so toggling them does not update the pull request on Trylle or GitHub.

Annotate a change

Annotations can target three levels:

  • Select text or lines with the mouse, then press i for that range.
  • Focus a hunk with { or }, then press i for the hunk.
  • Press i without a selection or focused hunk for a file-level note.

Use I to jump to, edit, delete, copy, or export annotations. These annotations are local review notes; they are not submitted as native pull request comments.

Send notes back to an agent

Press s, then confirm, to exit the TUI and write all formatted annotations to standard output. The viewer uses the controlling terminal for its UI when stdout is captured, so an agent or shell-escape workflow receives clean review text rather than terminal control sequences.

agent completes work -> run try diff -> annotate -> press s
                    -> annotations become the agent's next input

This workflow is transport through stdin and stdout. It does not require a Trylle plugin and does not publish the notes to a pull request.

Choose a theme

try diff --theme dracula

Available values are default-dark, default-light, catppuccin-mocha, catppuccin-latte, dracula, nord, gruvbox-dark, gruvbox-light, one-dark, solarized-dark, and solarized-light.

The optional ~/.config/trylle-cli/ai.config.json file can also contain "theme" and "wrap" settings. A command-line flag takes precedence.

Machine-readable diff output

Scripts and agents can request JSON output to skip the TUI. The resulting object's diff field contains a unified diff for the working tree, selected range, or pull request. Search, watch, annotations, and interactive viewed state apply only to the TUI.

On this page