Show HN: Shitty – fast terminal. Memory-unsafe and faster than yours

Aug 03, 2026 06:05 AM - 2 hours ago 3

CI codecov release brew license platforms speed

Blazingly fast. Memory-unsafe and faster than yours.

Shitty is built for debased latency, accelerated startup, and predictable assets use. It keeps terminal authorities connected the CPU and renders cells pinch autochthonal compute backends: Vulkan connected Linux and Metal connected macOS.

100MB catted done the GUI connected an Apple-silicon MacBook, each terminal equalized first: Menlo 12pt, the aforesaid 14x28px cell, an 80x24 grid, 500 lines of scrollback. Best wall clip of 3 runs.

Printable ASCII (the scroll path):

terminal wall user throughput
shitty 0.81s 0.50s ~118 MiB/s
alacritty 0.17.0 0.96s 0.78s ~99 MiB/s
kitty 0.48.2 1.28s 0.95s ~75 MiB/s
ghostty 1.3.1 1.49s 1.60s ~64 MiB/s

Random bytes (the parser's worst case, invalid UTF-8 throughout):

terminal wall user throughput
shitty 1.88s 1.79s ~51 MiB/s
alacritty 0.17.0 3.07s 2.92s ~31 MiB/s
ghostty 1.3.1 4.63s ~7.0s ~21 MiB/s
kitty 0.48.2 - - -

kitty sits the random payload out: it reacts to the embedded flight junk with title changes and bells alternatively of drawing. Reproduce with dev/compare.py, which verifies the equalized setup from inside each terminal earlier measuring anything.

  • VT52 done VT5xx controls and wide utilized xterm extensions.
  • Primary and alternate screens, primary-screen scrollback, margins, tabs, rectangular operations, protected cells, and synchronized output.
  • Reflow of primary-screen scrollback erstwhile the terminal width changes.
  • Unicode grapheme clusters, combining characters, emoji sequences, and double-width characters.
  • DEC single-width, double-width, and double-height lines.
  • 16-colour, 256-colour, and 24-bit colour, including underline colour and extended underline styles.
  • Legacy, modifyOtherKeys, and Kitty keyboard protocols.
  • X10, VT200, UTF-8, SGR, SGR-pixel, and urxvt rodent protocols.
  • Linear and rectangular selection, superior selection, clipboard integration, OSC 52 policy, and OSC 8 hyperlinks.
  • Shell integration, notifications, advancement reports, and in-band resize reporting.
  • Lazy glyph rasterization, a persistent GPU glyph cache, and damage-driven compute rendering.

Shitty uses UTF-8 internally and exports TERM=xterm-256color to child processes. The big must supply the corresponding terminfo entry.

Shitty is written successful C++23 and built pinch Clang. Every build requires:

  • Python 3 and glslangValidator;
  • librsvg (rsvg-convert), which renders the icon astatine build time;
  • pkg-config;
  • Brotli and utf8proc;
  • POSIX threads and PTY support.

The nonstop libstd revision utilized by Shitty is bundled in third_party/libstd and built arsenic portion of the aforesaid graph.

Linux additionally requires FreeType, HarfBuzz, Wayland customer headers, xkbcommon, wayland-scanner, and Vulkan headers and loader. macOS requires SPIRV-Cross and uses CoreText, Cocoa, Metal, and IOSurface from the strategy SDK.

A scalar Base64 implementation is ever available. If simdutf 6.5 aliases newer is installed, the build uses it automatically to accelerate Base64 encoding. Fontconfig is besides optional. When present, it enables font-family lookup; explicit font record paths are handled straight done FreeType.

Linux requires a moving Vulkan driver and Wayland compositor astatine runtime. macOS uses the autochthonal Metal driver. The autochthonal model and event-loop furniture is built from third_party/plt; the terminal does not dangle connected a generic windowing toolkit.

The complete imported conformance suite additionally needs ncurses and Perl.

Build the default instal group:

Common build options:

./build -j 8 ./build -B .build-debug CPPFLAGS=-DDEBUG ./build

Start the default shell:

Run a command:

Choose the first terminal size and scrollback capacity:

./st -geometry 120x36 -saveLines 5000

Choose fonts:

./st -font 'DejaVu Sans Mono' -fontsize 16 ./st -font 'DejaVu Sans Mono' -dwfont 'Noto Sans Mono CJK JP'

-font and -dwfont judge definitive font record paths. When Fontconfig is available, they besides judge family queries and Shitty resolves regular, bold, italic, and bold-italic faces automatically. An optional double-width font is used only erstwhile its compartment is precisely doubly arsenic wide arsenic the superior font astatine the same height.

Use ./st -v to people the build type without opening a window, ./st -help for the main action list, and ./st -listres for advanced terminal, colour, clipboard, and window-policy options. Boolean flags use -flag to alteration and +flag to disable. SHITTY_FONT_SIZE sets the default font size; -fontsize takes precedence.

During a session, Ctrl+Shift++ increases the font size, Ctrl+- decreases it, and Ctrl+0 restores the startup size. Font resizing preserves the terminal's rows and columns by resizing the model to the caller compartment dimensions.

By default, applications cannot publication section selections done OSC 52 and cannot manipulate aliases query the big window. These operations tin beryllium enabled explicitly for trusted applications.

The executable is named st; the desktop exertion and icon are named shitty:

install -Dm755 ./st /usr/local/bin/st install -Dm644 shitty.desktop \ /usr/local/share/applications/shitty.desktop install -Dm644 shitty.svg \ /usr/local/share/icons/hicolor/scalable/apps/shitty.svg

Exec=st is resolved done PATH, while Icon=shitty is resolved through the progressive icon theme.

A flake provides the shitty package and a improvement shell:

nix build # ./result/bin/st nix tally # tally st directly nix create # clang toolchain + build dependencies

Add the package to a NixOS strategy from the flake overlay aliases via:

{ inputs.shitty.url = "github:pg83/shitty"; # ... environment.systemPackages = [ inputs.shitty.packages.${system}.default ]; }

shell.nix remains disposable for nix-shell without flakes.

Run the afloat autochthonal and imported conformance suite:

Run only the autochthonal black-box suite:

Run the aforesaid normal and sanitizer chains arsenic GitHub CI:

nix build -L --no-link .#checks.x86_64-linux.build && nix build -L --no-link .#checks.x86_64-linux.tests nix build -L --no-link .#checks.x86_64-linux.build-asan && nix build -L --no-link .#checks.x86_64-linux.tests-asan nix build -L --no-link .#checks.x86_64-linux.build-ubsan && nix build -L --no-link .#checks.x86_64-linux.tests-ubsan

Build an instrumented transcript of the complete suite and make LCOV, text, and browsable HTML reports:

nix build -L -o result-coverage .#checks.x86_64-linux.coverage xdg-open result-coverage/html/index.html

The aforesaid study is attached to each GitHub sum tally and uploaded to Codecov for per-file and pull-request coverage.

The autochthonal suite drives a dedicated headless st_test binary done a real raw PTY and checks externally visible terminal snapshots and output. The production st binary does not expose the trial power introduction point.

Shitty does not presently instrumentality bidirectional matter layout aliases inline graphics protocols specified arsenic sixel. Some humanities DEC and xterm extensions are intentionally extracurricular the supported profile.

License modulation and authorship

Shitty is simply a difficult fork and complete rewrite of Zutty. The original Zutty terminal emulator was created by Tom Szilagyi. Shitty keeps that lineage, but replaces the architecture, renderer, level integration, testing strategy, and task identity.

Shitty is moving from the imported GPL baseline to an MIT-only codebase. It does not intend to clasp the GPL arsenic the last task license.

The root snapshot first imported into this repository, and codification predating that snapshot, remains licensed nether GPLv3-or-later. New Shitty contributions are dual-licensed nether GPLv3-or-later and MIT. While GPL-only imported material remains successful the tree, distribution of the mixed activity is still taxable to the GPL.

See LICENSE, LICENSE.GPL3, LICENSE.MIT, and CONTRIBUTING.md for the exact position and publication policy.

Tom Szilagyi is the original writer of Zutty, from which Shitty descends. Shitty retains his copyright notices wherever humanities codification lineage requires them; consequent activity is copyright of the Shitty contributors.

More