mantish/ help / docs
Join the waitlist

Terminal

The full review in your terminal — pull requests, diffs, threads and settings, from the keyboard.

Last updated

mantish is Mantish for people who live in a terminal: your review queue, the diff with muted and spotlighted changes, comments, votes and settings — all from the keyboard, with its own keys or Vim's. It runs on macOS, Linux and Windows. See Install and sign in to get it.

The terminal client
The terminal client

Start it

sh
mantish                       # your review queue
mantish --repo widgets        # open a repository straight away
mantish --theme paper         # pick a colour theme
mantish --editor nvim         # the editor E opens files in
mantish --keymap vim          # Vim's keys (see below)

If the engine isn't running, the first screen says so — press e to set it up and start it.

The keys you need

Press ? (or F1) at any time for the full list. These are the default keys — the Mantish keymap.

KeyWhat it does
?Help — every key on the current screen
:The command bar — type to search every command
pSwitch repository (a adds one)
↵Open the selected pull request, file or thread
j / kNext / previous change in the diff
[ / ]Previous / next file
mReveal or hide muted changes
spaceMark the file as viewed
cComment on the line under the cursor
vVote on the pull request — in a file, select (below)
D / IThe diagram / identical changes
esc / qBack / quit

In a file, p docks the file list beside the diff. It widens to its longest name while you browse it and narrows again when you go back to the diff — or, with Hide the docked files panel while reading in the diff settings (S), steps aside until you ask for it with f or tab.

Selecting and copying

In a file, v selects characters from the caret, V whole lines and ctrl+v (or ctrl+q, where the terminal pastes on ctrl+v) a block of columns — in either keymap. Move the caret and the selection follows it; then:

  • y copies the selected code, from the side the caret is on (BEFORE or AFTER).
  • gy copies it for an LLM: the file and its lines on a line of their own, then the code fenced in its language — in the unified view, the stretch of the diff with its - and + lines. It always takes whole lines.
  • o goes to the selection's other end, esc drops it and gv selects the last one again.

Text objects select in one go: iw a word, i( what a pair of brackets holds (a( the brackets too), i" a string, ip a paragraph, it a tag's inside, af / ac a function / a class, ia an argument; pressed again, they take the next one out. The mouse selects too: drag over the code, drag over the line numbers for whole lines, double-click a word. Shift-drag (Option-drag in iTerm2 and Terminal.app) still uses your terminal's own selection.

In the comments view (T), v / V select a card's text: y copies it as it is shown, gy copies the conversations it touches for an LLM, in the Markdown they were written in.

Vim keys

Switch with :keymap vim (or start with --keymap vim) and the file reads like Vim's normal mode — it is read, never edited, so there is no insert mode:

  • j / k move a row, ]c / [c step through changes (again at a file's edge: on into the next or previous file), ]f / [f through files, ]t / [t through comment threads.
  • Vim's motions work as in Vim, with counts: w b e W B E, 0 ^ $ g_, f t F T ; ,, %, { }, gg G 12G, H M L, zt zz zb, ^d ^u. / and ? search the side the caret is on, n / N and * / # repeat it; zo zc za zR zM fold.
  • ^o / tab walk back and forth through where you have been, across files; ma marks a place (mA in any file of the review) and 'a returns to it; gd goes to a declaration and ^t back.
  • y is Vim's operator: yw, y$, y}, yiw, yi(, yaf, 3yy, y'a. A register named first ("+yy) is taken as you would type it in Vim: every register is the clipboard here.
  • The code as the engine reads it: K says what the symbol under the caret is, gO lists the file's declarations, ]] / [[ step through them and ]m / [m through its methods; grr finds usages, gri implementations and ^w } peeks at a declaration without leaving the file. ]d / [d step through what asks for attention — spotlighted changes, AI comments, your AI Review's drafts.
  • gf opens the file named under the caret, gx the link, and ^^ the file you were in before.
  • space opens a menu at the bottom of the screen with the review's actions: space f the files, space F the call flow, space T every comment, space m muted changes, space space viewed.
  • The file list is a list like any other: j / k move, and / filters it by path — enter keeps the filter, esc drops it.
  • esc never leaves a view — q does — and help is F1 in the file, where ? searches backward. The footer always shows the keys that work where you are.

The command bar takes Vim's commands in either keymap: :q, :qa, :42 (line 42), :noh, :h — and, in a file, :marks, :jumps, :changes, :bn / :bp / :b# (the next, previous and last file) and :sp / :vs (unified / split).

Your own keymap

A keymap of your own is a file in ~/.config/mantish/terminal/keymaps/ that starts from a built-in one and changes only what you name:

jsonc
// ~/.config/mantish/terminal/keymaps/mine.json — then :keymap mine
{
  "extends": "vim",
  "bindings": {
    "diff": {
      "nextChange": ["]c", "J"], // these keys replace the keymap's for this action
      "prevChange": ["[c", "K"],
      "showMuted": null // no key at all
    }
  }
}

mantish keymap show vim --format json prints a whole keymap in this form — every screen and action — to start from. mantish keymap check says what is wrong with a file; a file that does not load never locks you out: the app starts on the keymap it extends and tells you why. After editing, :keymap reload reads the files again.

Commands worth knowing

CommandWhat it does
:settingsChange tags, rename rules, watched and ignored files, storage
:updateUpdate the terminal client, the engine or both
:login / :logoutSign in (opens your browser) or out
:themePick a colour theme
:keymapSwitch keymap — Mantish, Vim or one of yours
:docsOpen this documentation

When an update is available, the status bar says so, with a pointer to :update.

You can update from any shell too, without opening the review queue:

sh
mantish update                # everything newer: the engine manager, the engine, then this client
mantish update terminal       # only the terminal client (or engine, or manager)
mantish update --check        # list what is newer, install nothing

Add --format json for a report a script can read. An engine manager installed by a package manager is left alone — the command says where to update it.

Good to know

  • Your mute, spotlight and other review settings are shared with the desktop app. Things that only make sense in a terminal — theme, layout, editor — are kept in the terminal's own preferences file, ~/.config/mantish/tui.json.
  • The same binary also gives you mantish diff, a semantic diff you can run in any shell.
  • In the classic Windows console window — cmd.exe or PowerShell outside Windows Terminal — the font has no icons or emoji, so the terminal draws with a basic set instead: √ for a check, » for the cursor, key names such as enter for key symbols, and □ for an emoji. Windows Terminal shows them all. To choose for yourself, start it with --glyphs unicode or --glyphs basic, or set "glyphs" in tui.json.
Was this page helpful?