Skip to content

Repository files navigation

mark

Quality Latest release License: MIT

A fast, keyboard-first Git diff reviewer for the terminal.

Mark reviewing a syntax-highlighted diff

Review local changes, commits, patches, pager input, difftool pairs, and pull requests in one focused interface.

Install

Homebrew on macOS or Linux:

brew install phongndo/tap/mark-cli

Or use the portable installer on macOS or Linux. Both methods support aarch64 and x86_64:

curl -fsSL https://raw.githubusercontent.com/phongndo/mark/main/scripts/install.sh | sh

Update with the same method used to install Mark:

brew upgrade mark-cli  # Homebrew
mark update             # portable installer

Quick start

mark diff                    # local changes
mark compare main            # workspace against main
mark compare main feature    # two revisions
mark show HEAD~1             # one commit
mark review 123              # pull request
mark patch changes.diff      # patch file
git diff | mark pager        # pager input
mark diff --watch            # live reload

Run a review command directly; bare mark currently exits without opening the interface.

Built for review

  • Split and unified layouts with syntax highlighting.
  • File filtering, diff search, expandable context, and full-file view.
  • Inline line, hunk, and file annotations with reviewed-state tracking.
  • Stable snapshots by default; continuous reload only with --watch.
  • Custom themes, keybindings, and editor integration.
  • Viewport-bounded rendering for very large diffs.
  • Private local sessions for review automation, with no daemon or hosted state.

Use with an AI agent

Mark already connects to shell-capable agents through its JSON CLI—no plugin or MCP server required.

  1. Open mark diff in one terminal and leave it running.

  2. Start your agent in another terminal in the same repository.

  3. Paste this prompt:

    Run mark skill show and follow the bundled workflow to review my open Mark session. Read the diff and saved human marks, then publish findings into Mark. Leave the viewport, reviewed state, dispositions, and final verdict to me.

For questions instead of a full review, save a mark with Enter, then ask the agent to answer your saved marks. Ask again after saving a follow-up; the skill is request-driven, not a background listener.

mark skill path materializes the version-matched skill for agents that support loading skill files. If multiple reviews are open, tell the agent which session to use. Keep Mark open: sessions and their comments are in-memory and disappear when it closes. See live agent sessions for commands and lifecycle details.

Controls

Key Action
j / k Move down / up
[ / ] Previous / next hunk
Shift-Tab / Tab Previous / next file
f / / Filter files / search the diff
Enter Add an annotation
s Toggle split / unified layout
r Reload
? Show all controls
q Quit

Motions accept counts such as 3j.

Git integration

Use Mark as a pager:

git config --global core.pager "mark pager"

Use Mark as a difftool:

git config --global diff.tool mark
git config --global difftool.mark.cmd 'mark difftool -- "$LOCAL" "$REMOTE" "$MERGED"'

Agent integration

Mark bundles a version-matched live-review skill. Inspect it with mark skill, or install it for one agent:

mark skill install --agent pi
mark skill install --agent codex
mark skill install --agent claude
mark skill install --agent cursor
mark skill install --agent antigravity
mark skill install --agent copilot
mark skill install --agent opencode

Run the install command again after upgrading Mark to refresh the installed copy.

Documentation

Mark works without configuration. Run mark config to find the config file and mark --help for the complete command list.

Usage · Configuration · Development · Contributing

License

MIT

About

Performant diff reviewer

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages