Probably the most portable terminal in the world
A full-featured terminal emulator in a single Java file, powered by GhosttyFX — Ghostty's terminal engine exposed as a JavaFX control. No build system, no IDE, no project setup — just JBang and one file.
This was an idea created, edited and published in a few hours a Sunday morning - no promises; but do share if it works or not for you :)
Run instantly (JBang downloads Java 25 automatically if needed):
jbang jhostty@maxandersenInstall as a command for everyday use:
jbang app install jhostty@maxandersen
jhosttyOr clone and run from source:
git clone https://github.com/maxandersen/jhostty.git
cd jhostty
jbang jhostty.javaOpen as many windows, tabs, and split panes as you need. Horizontal and vertical splits can be nested freely.
Tab bar appears automatically when you have more than one tab, hides when you're back to one.
Switch themes on the fly from the View menu — the entire UI adapts, including context menus and split dividers.
Each split pane has its own independent zoom level. Zoom with keyboard shortcuts, scroll wheel, or trackpad pinch (macOS). The title bar shows the current zoom percentage.
Every font on your system is available in the View → Font menu. Popular terminal fonts (JetBrains Mono, Fira Code, Hack, SF Mono, Consolas) are listed first for quick access.
- Drag-and-drop — drop files, text, or URLs onto any terminal pane
- Link detection — clickable URLs in terminal output
- Right-click context menu — styled to match the current theme
- Shell integration — search (⌘F/Ctrl+F) and prompt navigation via Ghostty shell integration
- Native macOS menu bar — app name, menus, and shortcuts feel native
- Cross-platform shortcuts — ⌘ on macOS, Ctrl on Windows/Linux
| Action | macOS | Windows / Linux |
|---|---|---|
| New Window | ⌘N | Ctrl+N |
| New Tab | ⌘T | Ctrl+T |
| Split Horizontal | ⌘D | Ctrl+D |
| Split Vertical | ⌘⇧D | Ctrl+Shift+D |
| Close Terminal | ⌘W | Ctrl+W |
| Zoom In | ⌘+ | Ctrl++ |
| Zoom Out | ⌘− | Ctrl+− |
| Reset Zoom | ⌘0 | Ctrl+0 |
| Search | ⌘F | Ctrl+F |
| Scroll Zoom | ⌘+scroll | Ctrl+scroll |
- JBang — that's it. JBang handles everything else:
- Downloads Java 25 automatically if not present
- Resolves GhosttyFX, pty4j, and all dependencies
- Compiles and caches the single
.javafile
jhostty is a single jhostty.java file — ~940 lines, no build system, no project structure. JBang reads the dependency declarations at the top of the file, resolves everything from Maven Central, and runs it.
jhostty.java
├── Terminal rendering ← GhosttyFX (Ghostty's engine in JavaFX)
├── PTY backend ← pty4j (cross-platform pseudo-terminal)
├── UI ← JavaFX (comes with GhosttyFX)
└── Build/run ← JBang (zero setup)
Key design choices:
- No
Applicationsubclass ceremony — usesApplication.launch()with a minimalstart()method - All state is static — single-file simplicity, no DI framework
- Per-terminal zoom via node properties — no global state conflicts
- Event filters intercept shortcuts before the terminal view consumes them
- Dynamic CSS — theme changes regenerate a temp CSS file and hot-reload it
jhostty automatically saves your preferences (theme, font, zoom, window position) to:
~/.config/jhostty/jhostty-state.properties
This file is auto-managed — changes you make in the app are saved on exit. To customize settings permanently, create your own override file:
~/.config/jhostty/jhostty.properties
User config takes priority over saved state. Omit a key or leave it blank to auto-detect / use the default.
| Key | Description | Default |
|---|---|---|
theme |
Theme name (e.g. Dracula, Nord, Catppuccin Mocha) |
Ghostty Default |
font |
Font family (e.g. JetBrains Mono) |
Auto-detected |
font-size |
Base font size in points — what "Reset Zoom" returns to | 15.0 |
zoom |
Current zoom level in points — remembered across restarts | Same as font-size |
shell |
Shell command (e.g. /bin/zsh) |
Auto-detected |
window-x |
Window X position in pixels | OS default |
window-y |
Window Y position in pixels | OS default |
# ~/.config/jhostty/jhostty.properties
theme=Dracula
font=JetBrains Mono
font-size=16.0Use View → Reload Config to apply changes without restarting.
For the best experience with nerd font glyphs (powerline symbols, git icons):
# macOS
brew install font-jetbrains-mono-nerd-font
# Linux
sudo apt install fonts-jetbrains-mono # or your distro's equivalent
# Windows
# Download from https://www.nerdfonts.com/font-downloadsRun with --debug to log input events and modifiers to stderr:
jbang jhostty@maxandersen --debug| Component | What | Why |
|---|---|---|
| GhosttyFX | Terminal control | Ghostty's rendering engine as a JavaFX node |
| pty4j | PTY backend | Cross-platform pseudo-terminal from JetBrains |
| JBang | Build & run | Zero-setup Java scripting — no Maven, no Gradle |
| JavaFX | UI toolkit | Comes transitively via GhosttyFX |
MIT





