
Show HN: OmniPTY – Opinionated terminal emulator for macOS and Linux
Formerly Oxide. Installed copies update themselves; see the note below.
以下正文同步自 Hacker News,版权归原站所有,已转换为易读排版。
Formerly Oxide. Installed copies update themselves; see the note below.
The tools you'd normally bolt onto your terminal, built in.
A native terminal for macOS and Linux, written entirely in Rust.
Website · Docs · Changelog · Compare · Discord
If your terminal is really a terminal plus a stack of add-ons — tmux for splits and sessions, a file manager in another pane, a prompt framework, a copy-mode plugin — OmniPTY builds those in. A file tree you drive like vim sits beside your panes and follows your shell's cd. Tabs and splits group into named workspaces you can pin, so they reopen with the same layout and directories. Copy mode puts vim keys on the scrollback, and the status bar knows your git branch and when you're inside ssh. It's all configured in one TOML file that reloads when you save.
Under the hood, it's GPU-rendered on GPUI (Zed's UI framework), with alacritty_terminal (Alacritty's PTY + VT parser) doing the emulation, so vim, htop, and tmux itself still just work. No account, no AI, no telemetry: the only thing OmniPTY asks the network is whether there's a newer release.
Oxide became OmniPTY in 0.9.0 (there's an unrelated company called Oxide, and the name was getting in the way). Nothing to do if you already had it installed:
brew install --cask omnipty-terminal/tap/omnipty
Or download the DMG and drag OmniPTY to Applications. Builds are Developer ID signed and notarized, so there's no right-click-to-open dance, and OmniPTY keeps itself up to date afterwards — it checks on launch and every six hours, or on demand via OmniPTY → Check for Updates… Updates are signed, and OmniPTY only installs one whose signature matches the key it was built with.
Arch and derivatives: a pacman package from the PKGBUILD in this repo
(an AUR package will follow once AUR registration reopens)
git clone https://github.com/omnipty-terminal/omnipty.git cd omnipty/packaging/aur/omnipty-bin && makepkg -si
any distro: the release tarball
tar xzf omnipty-linux-x86_64.tar.gz cd omnipty-*-linux-x86_64 && ./install.sh # into ~/.local, no root
Download the tarball; older versions are on the releases page. install.sh puts omnipty on your PATH and adds the launcher entry and icon; --prefix /usr/local (with sudo) installs system-wide, --uninstall removes it. Installed copies announce a newer release in the top-right corner; git pull and makepkg -si again, or a fresh tarball, does the update.
OmniPTY never writes to your dotfiles. Full instructions are in the install docs.
A minute in OmniPTY — the tree, a markdown preview, the file finder, splits, tabs, the palette and theme picker, workspaces.
The short tour. Every feature has a page in the docs.
The everyday ones. The full keymap lists every action id, and a [keymap] table in your config rebinds any of them.
The ctrl-w chords are the same everywhere. Where macOS uses cmd, Linux uses ctrl-shift (the usual terminal convention — plain ctrl-c stays the shell's) and alt-1..9 for tabs, because Super belongs to the window manager.
~/.config/omnipty/config.toml — a fully commented default is generated on first run. Font, colors, keys, and notifications apply live; [shell] and [prompt] apply to new sessions. Every option, with defaults →
[font] family = "JetBrainsMono Nerd Font Mono" size = 14.0
[colors] preset = "omnipty" # or override any color individually follow_system = true # ...or switch between preset_dark / preset_light with the system preset_light = "catppuccin-latte"
[cursor] style = "bar" # block | bar | underline
[window] new_tab_directory = "pwd" # pwd | home inactive_pane_opacity = 0.8 # dim the panes you aren't in
[[ssh.hosts]] match = "*.prod.example.com" # red border while ssh'd into prod accent = "#f38ba8"
[tree] follow_cwd = true # tree re-roots when the shell cd's open_on_startup = true # false starts with the drawer hidden (cmd-b shows it)
[editor] open_in = "tab" # tab | split — where a file opens when the pane is busy
[markdown] preview_in = "tab" # tab | split — where a markdown preview opens
[images] enabled = true # draw the images programs send (kitty, iTerm2, sixel) memory_limit = 128 # MB of decoded images per pane preview_in = "tab" # tab | split — where a picture opened from the tree is shown
[status_bar] enabled = true position = "bottom" tab = "number" # number | name — the current-tab chip
[tabs] enabled = true # false hides the tab bar show_numbers = true # small position number on each tab close_last = "workspace" # workspace | new_tab — what closing the last tab leaves
[prompt] enabled = false # keep your own prompt (starship, p10k, ...)
[keymap] "cmd-j" = "pane::split_down" # keystroke = "action id"; "" unbinds
Build from source
You'll need Rust (2024 edition). On macOS, also full Xcode with the Metal toolchain — GPUI compiles Metal shaders at build time:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer xcodebuild -downloadComponent MetalToolchain # if the build asks for it
On Linux, the GPUI build dependencies (Arch shown; Debian/Ubuntu equivalents are in .github/workflows/ci.yml):
sudo pacman -S --needed base-devel fontconfig freetype2 libxkbcommon libxkbcommon-x11
libxcb wayland vulkan-icd-loader libnotify
git clone https://github.com/omnipty-terminal/omnipty.git cd omnipty cargo run # development
macOS
./scripts/bundle.sh # release build -> target/OmniPTY.app (ad-hoc signed)
cp -R target/OmniPTY.app /Applications/
sudo cp scripts/omnipty-cli /usr/local/bin/omnipty && sudo chmod +x /usr/local/bin/omnipty # optional omnipty [dir] shim
Linux
./scripts/linux-package.sh # release build -> target/omnipty-<version>-linux-<arch>.tar.gz tar xzf target/omnipty--linux-.tar.gz -C /tmp && /tmp/omnipty--linux-/install.sh
The omnipty command takes a directory, -e <command> [args...] to run a program in the first pane instead of the shell, --app-id <id> for the window's Wayland app-id / X11 class, and --no-startup-commands. The first two are what xdg-terminal-exec passes, and the .desktop entry declares them, so on Linux OmniPTY can be the default terminal: on Omarchy, put omnipty.desktop first in ~/.config/xdg-terminals.list.
The first build compiles GPUI — expect several minutes. A cargo run binary is a debug build: fine for poking at a change, but a full-screen program like nvim will feel sluggish in it (an unoptimised GPUI redraw doesn't fit in a 60 Hz frame; the release build uses a quarter of the CPU). It also never checks for updates, and on macOS it isn't an app bundle, so its notifications can't be clicked. Use scripts/bundle.sh / scripts/linux-package.sh for the real thing. Cutting a release is covered in RELEASING.md.
One binary crate. The PTY reader/parser runs on its own thread (alacritty_terminal's event loop) and mutates a shared Term behind a mutex; the GPUI main thread briefly locks it during paint to copy the visible grid out, then shapes and paints batched text runs directly — no per-cell elements. An image is text as far as the grid is concerned — placeholder cells written where the picture goes, each naming its slice — so scrollback, reflow, and clears need no special cases; the pixels are decoded on the background pool and drawn under the text. Directory scans, git queries, and file watching run on the background pool. The tree follows cd by polling the PTY's foreground process group cwd (tcgetpgrp + proc_pidinfo on macOS, /proc/<pid>/cwd on Linux), so it works with zero shell cooperation. Platform differences are confined to a handful of cfg sites: the process lookups, notifications (UNUserNotificationCenter / notify-send), the updater, the keymap tables, and the window chrome.
No IME / dead-key composition yet (two-stroke accents, CJK input).
Narrowing a pane past the width of a multi-line bash prompt can scroll the prompt's first line into scrollback until the next prompt is drawn (enter brings it back).
Pinned workspaces restore layout and directories with fresh shells; running programs can't survive a full quit (tmux only manages it because its server never exits). Startup commands are the workaround: declare what a pane runs and it's re-run on restore. on_exit needs shell integration with zsh or bash; other shells get the command typed in and nothing more.
Images: no animation yet (a GIF shows its first frame), and an image is part of the text grid rather than a layer over it, so text printed across one replaces that part of it and kitty's z index is ignored. The kitty protocol's file and shared-memory transfers are refused; programs fall back to sending the pixels down the pipe.
Left/right Option can't be distinguished; option_as_meta treats left/right as both.
Linux: there's no in-place self-update (the pill opens the release page); window.titlebar is ignored — the compositor owns decorations, and under a compositor without server-side decorations (GNOME) the window has none.
Community
Questions, ideas, or just want to see what's coming? Join the OmniPTY Discord. Bugs and feature requests go in issues — Help → Report an Issue in the menu bar (the ☰ menu on Linux), or Report an Issue in the command palette, goes to the same place. Wondering how OmniPTY stacks up against iTerm2, Ghostty, kitty, WezTerm, Alacritty, or Warp? There's an honest comparison.
If OmniPTY earns a place in your dock, you can sponsor it on GitHub or buy me a coffee.
OmniPTY builds on GPUI and alacritty_terminal, both Apache-2.0.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。