your-moon/tern

A fast, low-memory SSH terminal built with Rust and GPUI

Rust

1

183 commits

updated Oct 12, 2026

See the code

README

tern icon: a white bird in flight on near-black

tern

A native SSH client for macOS, written in Rust on GPUI.
Saved hosts, SFTP, splits and snippets, with passwords from your own password manager.
Website: https://tern.carrot-soft.tech

⌘K finds web-01, tern connects, runs docker ps, then ⌘\ fills the sudo password

Why tern

tern does what Termius and Tabby do for a list of servers: saved hosts, ⌘K to any of them, SFTP, splits, snippets and port forwards. It runs as one native process, and one connected tab takes 76 MB where Tabby takes 580 MB (Memory).

Passwords come from your SSH key, from a password-manager command such as gopass show -o work/ssh/web-01, or from tern's age-encrypted vault. At a sudo prompt, ⌘\ types the password. It never types one on its own.

Hosts, snippets and settings sync to a private Git repository you own. They are encrypted on your Mac first, so the repository only holds .age files.

tern: hosts grouped in a frosted sidebar over Hokusai's Great Wave

A closer look

sudo docker ps with the sudo password filled by ⌘\
⌘\ fills sudo: the password comes from your password manager, typed only when you ask and only at a password prompt.
The snippets picker filtering docker commands
Snippets (⇧⌘S): saved commands. ↵ marks the ones that run when picked; the rest are typed for you to finish.
Two panes side by side with find in scrollback
Splits and find: ⌘D and ⌘⇧D split a tab; ⌘F searches the scrollback.
The SFTP side panel listing a remote home folder
Files (⇧⌘O): browse the remote side over SFTP; download, or drop files to upload.
Settings, Appearance, with the wallpaper gallery
Wallpapers and fonts: seven public-domain artworks built in, or any image; light, dark or follow macOS; any monospace font.
tern in light appearance over Van Gogh's Wheat Field
Light and dark: the window takes its colours from the wallpaper, and every text colour stays at least 4.5:1.

Features

Connections

  • Saved connections with groups and tags, search (⇧⌘F), and a ⌘K picker ordered by what you used last.
  • Import from ~/.ssh/config as a one-time copy; tern keeps its own list.
  • ProxyJump chains, local, remote and dynamic (SOCKS) port forwards, agent forwarding, and keep-alive per host.
  • Automatic reconnect after a network drop, with backoff. It never reconnects after you type exit.
  • Two-factor (keyboard-interactive) logins, and a hard stop on changed host keys, with the exact ssh-keygen -R line to fix one you trust.

Terminal

  • Tabs you can rename, reorder and reopen on launch; split panes; broadcast input to chosen tabs.
  • Find in scrollback, ⌘-click links (including OSC 8), cursor shape and blink, scrollback length, copy on select, and visual bell.
  • SFTP browser, session logging to a file, and a status line showing host, state, latency and session time.

Passwords and keys

  • Password command per connection, such as gopass show -o work/ssh/web-01. tern runs it when the server asks and never stores the result. A command that arrives through sync must be approved once on each Mac.
  • Vault: an age-encrypted file for passwords and SSH keys (generate ed25519, import, copy the public key). It unlocks with a PIN or through the macOS Keychain, and locks after you've been idle.
  • ⌘\ Fill password at sudo and other password prompts. It never types on its own.

Sync

  • To a private Git repository through your own git and SSH key (or a GitHub gist). Everything is encrypted with your vault passphrase before it leaves the Mac.
  • It runs on its own when something changes and every few minutes. When both sides changed, it merges per file and per host, and only asks about a real conflict.

Look

  • Panels are frosted glass over your wallpaper and take their tint from it; the picture shows sharp when no session is open. The layout follows zeron.
  • Light, dark or system appearance. A "sharper text" mode for 1× monitors. Reduce motion follows macOS.

Memory

tern against the other two SSH clients, on the same Mac, the same day (2026-10-06), the same way. Each app was launched fresh and measured every 15 s for two minutes with macOS footprint (the number Activity Monitor shows), summed over all of its processes. The table gives the settled value at two minutes. "Connected" means one tab logged in to the same server.

AppIdleConnectedProcesses
tern86 MB (108 MB with a wallpaper)76 MB (125 MB with a wallpaper)1
Tabby471 MB580 MB5 (Electron)
Termius583 MBnot measured7 (Electron)

Connected, tern uses 76 MB against Tabby's 580 MB, or 125 MB with a wallpaper. The lead is over Electron apps: OxideTerm, another GPUI SSH client, reports 81 MB idle for itself (not measured here). The method, raw samples and the plain terminals (Terminal, iTerm2, Ghostty) are in docs/perf.md.

Keyboard

ActionKeysActionKeys
Host picker⌘KSplit right / down⌘D / ⌘⇧D
Search hosts⇧⌘FMove between panes⌥⌘ + arrows
New connection⌘NFind in scrollback⌘F
Snippets⇧⌘SFill password⌘\
Browse files⇧⌘OClose pane / tab⌘W
Settings⌘,Next / previous tab⇧⌘] / ⇧⌘[
Toggle sidebar⌘BText size⌘= / ⌘− / ⌘0

Every shortcut can be rebound in Settings → Shortcuts.

Install

Download: get tern-<version>-macos-arm64.dmg from Releases, open it, and drag tern to Applications. Releases are signed with a Developer ID and notarised by Apple, so it opens without a warning.

Windows and Linux (preview): tern-<version>-windows-x86_64.zip and tern-<version>-linux-<arch>.tar.gz are on the same Releases page. They build and pass the tests in CI but have not been run on a real Windows or Linux desktop yet; reports are welcome. Shortcuts there use Ctrl+Shift / Ctrl+Alt in place of ⌘ (table in crates/tern/src/keymap.rs).

Build from source (Rust 1.99+, macOS on Apple silicon):

git clone https://github.com/your-moon/tern && cd tern
scripts/make-local-identity.sh   # once: a stable local signature, so Keychain access survives updates
scripts/bundle-app.sh            # builds target/release/bundle/tern.app
cp -R target/release/bundle/tern.app /Applications/
cargo install --locked --path crates/tern   # the `tern` command (tern <host>, tern vault init)

Security

  • Host keys are checked against ~/.ssh/known_hosts. A changed key refuses the connection.
  • Secrets live in the vault (age, scrypt) or in your password manager. They are never written to logs, and never typed into the terminal unless you press ⌘\.
  • Sync data is encrypted before it leaves your Mac. The repository only ever sees .age files.
  • Report vulnerabilities privately, as described in SECURITY.md.

Losing a Mac doesn't lose your setup: see docs/recovery.md.

Architecture

tern architecture: the GPUI app (Shell, Session, Keeper) over the tern-term, tern-ssh, tern-vault and tern-sync crates, with config, password manager, Keychain, Git repo and SSH servers around it

Editable source: docs/architecture.excalidraw (open it at excalidraw.com).

Design and development

  • Architecture, UI spec, performance, and the craft rules every change passes.
  • cargo test --workspace runs the suite, including SSH tests against an in-process server. cargo run -p tern-ssh --example password_server -- --demo starts the demo server used for these screenshots.

Credits

tern copies and adapts code from well-maintained projects rather than reinventing it, and each copied file names its origin. The full list is in NOTICE.md.

License

GPL-3.0.

gpui
macos
password-manager
rust
sftp
ssh
ssh-client
terminal
termius-alternative

your-moon/tern

A fast, low-memory SSH terminal built with Rust and GPUI

Rust

1

183 commits

updated Oct 12, 2026

See the code

README

tern icon: a white bird in flight on near-black

tern

A native SSH client for macOS, written in Rust on GPUI.
Saved hosts, SFTP, splits and snippets, with passwords from your own password manager.
Website: https://tern.carrot-soft.tech

⌘K finds web-01, tern connects, runs docker ps, then ⌘\ fills the sudo password

Why tern

tern does what Termius and Tabby do for a list of servers: saved hosts, ⌘K to any of them, SFTP, splits, snippets and port forwards. It runs as one native process, and one connected tab takes 76 MB where Tabby takes 580 MB (Memory).

Passwords come from your SSH key, from a password-manager command such as gopass show -o work/ssh/web-01, or from tern's age-encrypted vault. At a sudo prompt, ⌘\ types the password. It never types one on its own.

Hosts, snippets and settings sync to a private Git repository you own. They are encrypted on your Mac first, so the repository only holds .age files.

tern: hosts grouped in a frosted sidebar over Hokusai's Great Wave

A closer look

sudo docker ps with the sudo password filled by ⌘\
⌘\ fills sudo: the password comes from your password manager, typed only when you ask and only at a password prompt.
The snippets picker filtering docker commands
Snippets (⇧⌘S): saved commands. ↵ marks the ones that run when picked; the rest are typed for you to finish.
Two panes side by side with find in scrollback
Splits and find: ⌘D and ⌘⇧D split a tab; ⌘F searches the scrollback.
The SFTP side panel listing a remote home folder
Files (⇧⌘O): browse the remote side over SFTP; download, or drop files to upload.
Settings, Appearance, with the wallpaper gallery
Wallpapers and fonts: seven public-domain artworks built in, or any image; light, dark or follow macOS; any monospace font.
tern in light appearance over Van Gogh's Wheat Field
Light and dark: the window takes its colours from the wallpaper, and every text colour stays at least 4.5:1.

Features

Connections

  • Saved connections with groups and tags, search (⇧⌘F), and a ⌘K picker ordered by what you used last.
  • Import from ~/.ssh/config as a one-time copy; tern keeps its own list.
  • ProxyJump chains, local, remote and dynamic (SOCKS) port forwards, agent forwarding, and keep-alive per host.
  • Automatic reconnect after a network drop, with backoff. It never reconnects after you type exit.
  • Two-factor (keyboard-interactive) logins, and a hard stop on changed host keys, with the exact ssh-keygen -R line to fix one you trust.

Terminal

  • Tabs you can rename, reorder and reopen on launch; split panes; broadcast input to chosen tabs.
  • Find in scrollback, ⌘-click links (including OSC 8), cursor shape and blink, scrollback length, copy on select, and visual bell.
  • SFTP browser, session logging to a file, and a status line showing host, state, latency and session time.

Passwords and keys

  • Password command per connection, such as gopass show -o work/ssh/web-01. tern runs it when the server asks and never stores the result. A command that arrives through sync must be approved once on each Mac.
  • Vault: an age-encrypted file for passwords and SSH keys (generate ed25519, import, copy the public key). It unlocks with a PIN or through the macOS Keychain, and locks after you've been idle.
  • ⌘\ Fill password at sudo and other password prompts. It never types on its own.

Sync

  • To a private Git repository through your own git and SSH key (or a GitHub gist). Everything is encrypted with your vault passphrase before it leaves the Mac.
  • It runs on its own when something changes and every few minutes. When both sides changed, it merges per file and per host, and only asks about a real conflict.

Look

  • Panels are frosted glass over your wallpaper and take their tint from it; the picture shows sharp when no session is open. The layout follows zeron.
  • Light, dark or system appearance. A "sharper text" mode for 1× monitors. Reduce motion follows macOS.

Memory

tern against the other two SSH clients, on the same Mac, the same day (2026-10-06), the same way. Each app was launched fresh and measured every 15 s for two minutes with macOS footprint (the number Activity Monitor shows), summed over all of its processes. The table gives the settled value at two minutes. "Connected" means one tab logged in to the same server.

AppIdleConnectedProcesses
tern86 MB (108 MB with a wallpaper)76 MB (125 MB with a wallpaper)1
Tabby471 MB580 MB5 (Electron)
Termius583 MBnot measured7 (Electron)

Connected, tern uses 76 MB against Tabby's 580 MB, or 125 MB with a wallpaper. The lead is over Electron apps: OxideTerm, another GPUI SSH client, reports 81 MB idle for itself (not measured here). The method, raw samples and the plain terminals (Terminal, iTerm2, Ghostty) are in docs/perf.md.

Keyboard

ActionKeysActionKeys
Host picker⌘KSplit right / down⌘D / ⌘⇧D
Search hosts⇧⌘FMove between panes⌥⌘ + arrows
New connection⌘NFind in scrollback⌘F
Snippets⇧⌘SFill password⌘\
Browse files⇧⌘OClose pane / tab⌘W
Settings⌘,Next / previous tab⇧⌘] / ⇧⌘[
Toggle sidebar⌘BText size⌘= / ⌘− / ⌘0

Every shortcut can be rebound in Settings → Shortcuts.

Install

Download: get tern-<version>-macos-arm64.dmg from Releases, open it, and drag tern to Applications. Releases are signed with a Developer ID and notarised by Apple, so it opens without a warning.

Windows and Linux (preview): tern-<version>-windows-x86_64.zip and tern-<version>-linux-<arch>.tar.gz are on the same Releases page. They build and pass the tests in CI but have not been run on a real Windows or Linux desktop yet; reports are welcome. Shortcuts there use Ctrl+Shift / Ctrl+Alt in place of ⌘ (table in crates/tern/src/keymap.rs).

Build from source (Rust 1.99+, macOS on Apple silicon):

git clone https://github.com/your-moon/tern && cd tern
scripts/make-local-identity.sh   # once: a stable local signature, so Keychain access survives updates
scripts/bundle-app.sh            # builds target/release/bundle/tern.app
cp -R target/release/bundle/tern.app /Applications/
cargo install --locked --path crates/tern   # the `tern` command (tern <host>, tern vault init)

Security

  • Host keys are checked against ~/.ssh/known_hosts. A changed key refuses the connection.
  • Secrets live in the vault (age, scrypt) or in your password manager. They are never written to logs, and never typed into the terminal unless you press ⌘\.
  • Sync data is encrypted before it leaves your Mac. The repository only ever sees .age files.
  • Report vulnerabilities privately, as described in SECURITY.md.

Losing a Mac doesn't lose your setup: see docs/recovery.md.

Architecture

tern architecture: the GPUI app (Shell, Session, Keeper) over the tern-term, tern-ssh, tern-vault and tern-sync crates, with config, password manager, Keychain, Git repo and SSH servers around it

Editable source: docs/architecture.excalidraw (open it at excalidraw.com).

Design and development

  • Architecture, UI spec, performance, and the craft rules every change passes.
  • cargo test --workspace runs the suite, including SSH tests against an in-process server. cargo run -p tern-ssh --example password_server -- --demo starts the demo server used for these screenshots.

Credits

tern copies and adapts code from well-maintained projects rather than reinventing it, and each copied file names its origin. The full list is in NOTICE.md.

License

GPL-3.0.

gpui
macos
password-manager
rust
sftp
ssh
ssh-client
terminal
termius-alternative