zanno

a tiny terminal-first text editor.
nano, but with a mouse and colors.


about

Zanno is a small, open-source editor that lives in your terminal. No Electron, no GUI toolkit, no config file, no plugins. The release binary on macOS is about 445 KB — no runtime beyond the terminal.

Written in Rust, licensed under MIT. Best used in iTerm2, kitty, Alacritty, WezTerm or Windows Terminal. Run it as zanno or with the short alias zn — both are the same binary.

features

  • Click to place the cursor, drag to select, scroll wheel to scroll
  • Ctrl/Cmd+C, Ctrl/Cmd+V, Ctrl/Cmd+X, Ctrl/Cmd+A
  • Native clipboard on macOS / Windows / Linux, plus OSC 52 fallback for SSH
  • Terminal-native paste (bracketed paste) — the terminal's own Cmd/Ctrl+V just works
  • VSCode Dark+/Light+ inspired colors for Rust, Python, JS/TS, Go, C/C++, Java, JSON, Markdown, shell, YAML, TOML, HTML/CSS, SQL, Ruby, Swift and Kotlin
  • Find with live search and find-and-replace in modals, with match navigation by keyboard or wheel (F1 help is scrollable)
  • Character count on the right side of the status bar
  • Line numbers, status bar, undo/redo, auto-indent, prompt-based open/save
  • Shift+arrow selection, PageUp/PageDown, Ctrl+Home/End
  • Automatic color-depth detection, with a 256-color fallback for older macOS Terminal.app
  • Short zn alias — run zn notes.txt instead of zanno notes.txt
  • No config file, no plugins, no dependencies at runtime other than the binary

install

One-liner for macOS / Linux (downloads the prebuilt binary from the latest GitHub release and installs zanno plus the zn alias into ~/.cargo/bin):

curl -fsSL https://dnysaz.github.io/zanno-web/install.sh | sh

If no prebuilt binary matches your platform, it falls back to building from source with cargo install --git https://github.com/dnysaz/zanno.

Useful overrides:

ZANNO_VERSION=v0.1.1 sh install.sh
ZANNO_INSTALL_DIR=/usr/local/bin sh install.sh

One-liner for Windows PowerShell:

irm https://dnysaz.github.io/zanno-web/install.ps1 | iex

From a local checkout:

cd zanno
./install.sh        # or: .\install.ps1 on Windows

# or directly:
cargo install --path . --force

From source / custom target:

cargo build --release
./target/release/zanno --help

Cargo puts the binary in ~/.cargo/bin. If zanno is not found, add that directory to your PATH.

Prebuilt archives for Linux x86_64, macOS arm64 and Windows x86_64 are attached to every version tag by .github/workflows/release.yml. Each archive contains both zanno and zn, and a checksums.txt file is published alongside them. See the releases page.

usage

zanno                     # empty buffer
zanno notes.txt           # open a file
zn notes.txt              # same thing, short alias
zanno --theme light       # VSCode Light+ palette
zanno --no-mouse          # disable mouse capture (some SSH setups)

The zn alias is a symlink created by install.sh (or a copied zn.exe on Windows), so both names run exactly the same binary.

keys

KeyAction
Ctrl/Cmd+SSave (asks for a name for new files)
Ctrl/Cmd+OOpen file
Ctrl/Cmd+NNew buffer
Ctrl/Cmd+ASelect all
Ctrl/Cmd+FFind (live search, modal)
Ctrl/Cmd+HFind and replace (modal)
Ctrl/Cmd+C / Ctrl/Cmd+VCopy / paste
Ctrl/Cmd+XCut
Ctrl/Cmd+ZUndo (Ctrl/Cmd+Shift+Z redo)
Ctrl/Cmd+QQuit (twice if unsaved)
F1Show help modal (keys, MIT license, scrollable)
F2 / F3Replace one / replace all inside the find-replace modal
Click / drag / wheelCursor / selection / scrolling
Shift+arrowsExtend selection
EscClear selection or cancel a prompt

On macOS both Ctrl and Cmd work for the shortcuts.

find and replace

Ctrl/Cmd+F opens the Find modal; Ctrl/Cmd+H opens Find and Replace. If text is selected when you open it, the selection becomes the initial search term.

  • Type to search live. Every match is highlighted; the active one uses a brighter color.
  • Enter or Down jumps to the next match, Up to the previous one.
  • Tab switches between the Find and Replace fields; in Find-only mode it toggles case sensitivity.
  • Ctrl/Cmd+R replaces the active match; Ctrl/Cmd+Shift+R replaces all matches. F2 and F3 do the same if modifier combinations are awkward in your terminal.
  • The mouse wheel also moves between matches. Esc closes the modal.

The character count (including line breaks) is displayed at the bottom right of the status bar.

notes

  • Mouse capture is a terminal feature. It works in iTerm2, kitty, Alacritty, WezTerm and Windows Terminal. Some older terminals don't report drag events; use --no-mouse and Shift+arrows there.
  • Copy uses the native clipboard first, then falls back to OSC 52, so copying from a remote SSH session still works in OSC-52-capable terminals.
  • Pasting with the terminal's own Cmd/Ctrl+V is handled by bracketed paste and does not need clipboard access at all.
  • Line wrapping is disabled while zanno is open, so long lines clip instead of breaking the layout.
  • Older macOS Terminal.app builds accept RGB escapes but approximate them into a dark palette. Zanno detects this and converts colors to 256-color values automatically.
  • Force a color mode with ZANNO_COLOR=truecolor|256|16|none, or disable colors completely with NO_COLOR=1.

license

MIT — use it, change it, ship it — just keep the notice. See the LICENSE.