Skip to content
Projects

ocnc/spectty has 43 GitHub stars and 4 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 15:13 UTC. Last push 2026-11-12.

How these counts are measured

What you can do

  • SSH & Mosh — connect over SSH or Mosh with automatic reconnection and network roaming
  • Metal renderer — GPU-accelerated terminal rendering with CoreText glyph atlas
  • Session persistence — Mosh sessions survive app backgrounding and network switches
  • International input — native IME composition and basic double-width CJK rendering

Measured star growth

in 24h
0
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Blazing-fast iOS SSH client with Metal GPU rendering, powered by libghostty-vt.

Developer Tools

README.md

Original

Spectty icon

Spectty

A fast, native SSH & Mosh terminal for iOS — Metal-rendered, inspired by Ghostty, with a clean-room Mosh implementation.

App Store Build Platform Swift 6 License

Features

  • SSH & Mosh — connect over SSH or Mosh with automatic reconnection and network roaming
  • Metal renderer — GPU-accelerated terminal rendering with CoreText glyph atlas
  • Session persistence — Mosh sessions survive app backgrounding and network switches
  • International input — native IME composition and basic double-width CJK rendering
  • Terminal controls — Meta/Alt shortcuts, remote SGR mouse taps, and persistent helper keys
  • On-demand rendering — idle terminals do not continuously submit frames
  • 8 themes — Default, Catppuccin Mocha, Catppuccin Latte, Tokyo Night, Gruvbox Dark, Dracula, Nord, Monokai
  • Secure — passwords and keys stored in the iOS Keychain; Secure Enclave support for key generation
  • No tracking — no accounts, no analytics, no data collection
  • Swift 6 — strict concurrency with async/await throughout

Architecture

┌──────────────────────────────────────────────────────┐
│  SwiftUI App Shell                                   │
│  ConnectionList → SessionManager → TerminalSession   │
│  MoshSessionStore (Keychain persistence)             │
└──────────────┬───────────────────────────────────────┘
               │
┌──────────────▼───────────────────────────────────────┐
│  SpecttyUI                                           │
│  TerminalMetalView (MTKView) + Metal glyph atlas     │
│  TerminalView (UIViewRepresentable)                  │
│  InputAccessory, GestureHandler                      │
└──────────────┬───────────────────────────────────────┘
               │ reads state from
┌──────────────▼───────────────────────────────────────┐
│  SpecttyTerminal                                     │
│  VTStateMachine (CSI/SGR/OSC parser)                 │
│  TerminalState (grid, cursor, modes, scrollback)     │
│  KeyEncoder (xterm key sequences)                    │
│  CGhosttyVT (C stubs, swappable for libghostty-vt)  │
└──────────────┬───────────────────────────────────────┘
               │ TerminalEmulator protocol
┌──────────────▼───────────────────────────────────────┐
│  SpecttyTransport                                    │
│  SSHTransport (SwiftNIO SSH)                         │
│  MoshTransport (clean-room Swift)                    │
│    MoshBootstrap (SSH exec → mosh-server)            │
│    MoshSSP (State Synchronization Protocol)          │
│    MoshNetwork (UDP via Network.framework)            │
│    MoshCrypto (AES-128-OCB3 via CommonCrypto)        │
│    STUNClient (NAT traversal diagnostics)            │
│  TerminalTransport / ResumableTransport protocols    │
└──────────────┬───────────────────────────────────────┘
               │
┌──────────────▼───────────────────────────────────────┐
│  SpecttyKeychain                                     │
│  iOS Keychain storage, Ed25519/ECDSA generation,     │
│  Secure Enclave, OpenSSH key import                  │
└──────────────────────────────────────────────────────┘

Data flow:

Keyboard → KeyEncoder → Transport → Remote Server
                                         │
 TerminalMetalView ← TerminalState ← VTStateMachine ← Transport

Packages

Package Purpose
SpecttyTerminal VT100/xterm state machine, cell model, scrollback buffer, key encoder
SpecttyTransport SSH (SwiftNIO SSH) and Mosh transports behind TerminalTransport protocol
SpecttyUI Metal renderer with CoreText glyph atlas, SwiftUI wrapper, input accessory bar, gestures
SpecttySpeech Optional Parakeet Ultra download, integrity verification, storage/network policy, and local speech inference
SpecttyKeychain iOS Keychain key storage, Ed25519/ECDSA/Secure Enclave generation, OpenSSH PEM import

Voice Input

Enable voice in Settings → Voice. Downloads use Wi-Fi unless you explicitly allow cellular data for that attempt; Low Data Mode is respected. Keep Spectty open during setup. Retry resumes supported partial transfers and reuses verified files.

In a connected terminal, tap the microphone in the bottom input bar, speak, tap Stop Recording, review, then Insert Text. Insertion does not send Return. Disabling voice retains the model; Remove Download deletes it. Existing downloads are verified locally when upgrading.

SpecttySpeech bundles an immutable Ultra revision and SHA-256 manifest in Resources/Ultra.json. Changing models requires updating that manifest and testing the matching artifacts. Installation verifies every file before Core ML loading and writes the revision marker only after preparation succeeds. It checks available storage for missing files plus a 1 GB preparation reserve; device-specific cache requirements may still vary. Models are excluded from backups.

Run python3 scripts/test-speech.py to test installation and cancellation/resume against a local HTTP fixture without downloading model weights.

The compact terminal bar keeps Esc, Tab, Ctrl, and Shift visible. The keyboard button expands Alt, arrows, and Newline (Ctrl+J). Modifiers apply to the next key.

Mosh Implementation

Clean-room Swift implementation — no GPL code. Key components:

  • MoshBootstrap: SSH exec → mosh-server new → parse MOSH CONNECT <port> <key> → close SSH
  • MoshCrypto: AES-128-OCB3 (RFC 7253) using CommonCrypto's AES-ECB as the block cipher
  • MoshNetwork: UDP transport via Network.framework with connection replacement for roaming
  • MoshSSP: State Synchronization Protocol — sequence-numbered diffs with heartbeat/retransmit
  • Session resumption: Credentials + SSP sequence numbers persisted to Keychain; reconnect skips SSH bootstrap entirely since mosh-server is daemonized
  • STUNClient: Minimal RFC 5389 Binding Request for NAT type diagnostics

libghostty Integration

The architecture is designed so libghostty components can be swapped in incrementally:

  • VT parsing: Replace VTStateMachine with libghostty-vt's terminal state C API — TerminalEmulator protocol insulates everything else
  • Rendering: Replace TerminalMetalRenderer with libghostty's Metal rendering C API — TerminalRenderer protocol insulates everything else

Each swap is independent. No big-bang migration needed.

Build

Requires Xcode 26.2+, iOS 18+ deployment target.

xcodebuild build -scheme Spectty -destination 'generic/platform=iOS'

Contributor acknowledgments

Terminal rendering, keyboard, CJK/IME, mouse tap, port entry, and helper-bar improvements were adapted from jiedo/spectty, authored by nandhh. Imported commits retain author credit; adapted changes record their source commits and co-author trailers. CJK support currently covers common single-scalar characters, not complete Unicode grapheme shaping.