Ghostling

303 points61 commentsa day ago
oDot

I use libghostty for Trolley[0], which packages TUIs as desktop apps, like Electron does for web apps.

It really is quite an amazing piece of software. I just wrapped it in a useful GUI and a bundle/package CLI and it just works. Even on Windows. Kudos to the Ghostty developers.

[0] https://github.com/weedonandscott/trolley

show comments
CraigJPerry

I used ghostty for the shell in my agent-manager tool (think something like https://air.dev/ but in SwiftUI. One architectural detail i'm still going back and forth on is: who should own the PTY?

If embedded Ghostty owns it, now i have to have some kind of workaround to instrument what's happening inside the terminal - signals, stdout/stderr events, return code etc.

If my parent agent-manager app owns it, now i don't have the nice clean small interface to ghostty (i'm a fan of John Ousterhout style narrow but deep interfaces, pulling complexity down rather than pushing up to parent).

Not sure if any other ghostty embedders might have advice. It's on my todo list to task a an agent to "gh repo clone" a few ghostty using shells and report on their arch.

show comments
hombre_fatal

I built my own macOS terminal app over the last two weeks using swift/appkit + ghostty's zig library.

I basically just wanted vertical tabs and notifications for when AI agents (claude code, codex) are finished.

I already use it as my main terminal over iTerm.

It's a fun project since I use my terminal all day, so I always have ideas for how something could be improved or polished. AI can do the chore work of figuring out how to impl some bugfix or UX polish, and I manage the last 10%.

This would have been too much work to maintain for fun before LLMs.

show comments
vintagedave

The C file is small enough to read (over a few minutes.)

I got to about line 5 and realized: I’ve never seen quite that technique for embedding a font via an autogenerated header before. I’m more used to Windows resources; this seems to generate a byte array in CMake code. I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

show comments
octetta

This is amazing and might be exactly what I’m looking for my own weirdo retro tooling that sometimes needs to run over ssh but also expect a “GUI” experience… any metrics on the overhead this might add to, for instance to a hello world type program?

lzhgusapp

I switched to Ghostty a few months ago and it's become one of the apps I never close. The rendering speed is noticeably better than iTerm2, especially with large log outputs. Excited to see libghostty enabling projects like this — the idea of packaging TUIs as native desktop apps is really compelling for indie developers.

thiht

I really hope libghostty succeeds at setting a new baseline for what terminal emulation should be. Seems to be on a right track.

lindskogen

I have an idea of a terminal emulator where you could maximize panes but using a nested structure, does anyone know of one?

Standard "Zoom" features in tmux or iTerm2 only maximize the single active pane to the full window, hiding everything else. If I have a layout like this:

  _____________________
  |         |    B    |
  |    A    |---------|
  |         |    C    |
  |_________|_________|
And I expand B, I want A to hide, while B and C remain visible together. Then I can create a new nested workspace in there and later zoom out when I’m done.

Maybe this could be done arbitrarily deep?

show comments
echelon

I love seeing an `AGENTS.md` in open source projects.

It's now my #1 heuristic to know if the team is on the right track.

(I need to start adding them to all my projects.)

delduca

I have plans to add it to my game (SDL).

znpy

I’m seriously interested in this. I wonder if i can use this along some decent gui library and an llm to vibe-code a SecureCRT replacement.

SecureCRT is awesome but it’s crazy expensive :(

imiric

This looks interesting.

I don't need my terminal emulator to support tabs, windows, or session management. My WM manages tabs and windows, and I use tmux for sessions, which also gives me a scrollback buffer, selection, clipboard, search, etc. This combination allows me to use any simple terminal emulator, such as urxvt, st, and now foot, without issues.

Ghostty didn't appeal to me, but I might give this a try. It's good that OSC support is planned. A plugin-like system, similar to st's but less cumbersome, would be nice to have.

show comments