r/JavaFX • u/maxandersen • Jun 21 '26
I made this! jhostty - probably the most portable terminal in the world
Woke up this morning and wondered if ghostty was embeddable in Java - found GhosttyFX and a few hours later …
https://github.com/maxandersen/jhostty
What if a terminal emulator was just... one file?
I built jhostty — probably the most portable terminal in the world - A single Java file (\~940 lines) you run instantly with JBang:
jbang jhostty@maxandersen
No build system. No IDE. No project setup. JBang downloads Java 25, resolves dependencies from Maven Central, and runs it.
Powered by GhosttyFX (Ghostty's terminal engine as a JavaFX control), it includes:
• Multiple windows, tabs, and split panes
• 10 built-in themes (Catppuccin, Dracula, Nord, Tokyo Night...)
• Per-terminal zoom
• Cross-platform shortcuts (⌘ on Mac, Ctrl on Windows/Linux)
• Drag-and-drop, link detection, shell integration
Install it as a command:
jbang app install jhostty@maxandersen && jhostty
I have no idea what I’ll do next with it but for now I have a super customisable terminal emulator that works the same across all major platforms …
2
u/vlaaad Jun 24 '26
Author of ghosttyfx here. Cool use of the lib 👍
1
u/PartOfTheBotnet Jun 21 '26
404?
1
u/Striking_Creme864 Jun 22 '26
GhosttyFX provides the terminal frontend and pty4j is the backend. Could you explain what jhostty itself is responsible for?
2
u/Distinct_Meringue_76 Jun 23 '26
This is amazing
1
u/Yew5D4j8e1j4 Jun 22 '26
Oh neat