7.8 KiB
👻 ghosttyconf
A terminal editor for the Ghostty configuration.
Browse, search and edit every option, with the full documentation next to it.
Ghostty is configured with a plain text file and close to two hundred options. ghosttyconf puts all of them on one screen. It groups the options into categories and shows each one's type, default and current value. Every option gets the editor that fits it. Comments, blank lines and the order of your file stay intact, and after saving, Ghostty reloads the configuration right away.
✨ Highlights
- 📚 All options, documented. All 201 options of Ghostty 1.3, in 19 categories, with the documentation of your Ghostty version.
- 🎛 An editor for every type. Toggles, choice lists, checklists for flags, number steppers, colors with live swatches, a list editor for repeatable options, the 256-color palette.
- 🎨 Theme and font pickers. Filter more than 460 themes with a live color preview, or pick from the font families Ghostty can find.
- ⌨️ Key binding editor. See Ghostty's built-in bindings merged with yours, and change, unbind, restore or add bindings. Record shortcuts straight from the keyboard.
- 🧷 Your file stays yours. Comments, blank lines and the order of untouched lines are kept, and changed entries are rewritten in place.
- ✅ Safe saving.
ghostty +validate-configchecks every save first. The old file is kept as a backup, writes are atomic, and symlinks into dotfile repositories keep working. - 🔄 Instant apply. After saving, the running Ghostty reloads its configuration.
- 🔎 Search, undo, diff. Search names and documentation, undo step by step, and review all unsaved changes before you save.
🚀 Installation
You need Go 1.24 or newer and Ghostty.
git clone https://git.micw.org/mike/ghosttyconf.git
cd ghosttyconf
make install # installs ghosttyconf into $(go env GOPATH)/bin
make build builds ./ghosttyconf in the source directory instead.
💡 Quick start
ghosttyconf
This opens the config file Ghostty itself would load. Pick a category on the
left and an option on the right, then press enter to edit it. Changes are
marked yellow until you save them with ctrl+s. Press ? for help at any time.
ghosttyconf ~/dotfiles/ghostty/config # edit a specific file
ghosttyconf --print-path # which file would be edited?
🎨 Themes with a live preview
Editing theme opens a picker over all themes Ghostty ships plus your own.
Type to filter. The preview shows the highlighted theme's colors before you
commit to it, and a note tells you which of your own color settings override
the theme.
Fonts work the same way: font-family and its bold/italic variants list the
families reported by ghostty +list-fonts.
⌨️ Key bindings
Press b to open the key binding editor. It shows every binding that is
active: Ghostty's built-in defaults merged with the entries in your file.
Each one is marked default, changed, custom or unbound.
- Change any binding, including built-in ones. Give it another key or another action.
- Unbind (
d) a key, restore (r) Ghostty's default, or add (a) a new binding. - Filter (
/) by key, action or description. Searchingcmd+dfindssuper+d. Presscto show only your changes. - See the documentation of every action with its parameters, and every key that is bound to it.
The editor writes the smallest possible set of entries. Moving new_split:right
from super+d to super+\ becomes
keybind = super+d=unbind
keybind = super+\=new_split:right
A binding set back to Ghostty's default disappears from your file again.
🔴 Recording shortcuts
In the binding form, press ctrl+r and then the shortcut. ghosttyconf turns on
the kitty keyboard protocol while it records, so ⌘/super combinations arrive
too. Several combinations in a row record a sequence such as ctrl+a>n. A
warning appears if the key already does something else.
💾 Saving and reloading
ctrl+s saves, and c shows what is about to change:
Every save runs these steps:
- Validate. The new file is checked with
ghostty +validate-config. If Ghostty complains, you see its messages and can go back or save anyway. - Check the disk. If another program changed the file since it was loaded, you are asked before anything is overwritten.
- Back up. The first save of a session keeps the previous version as
config.ghostty.bak. - Write atomically. The file is written through a temporary file, so it is never half-written. Symlinks are followed and permissions kept.
- Reload. The running Ghostty reloads its configuration, just like
⌘⇧,/ctrl+shift+,.
| Platform | How the reload works |
|---|---|
| macOS | Ghostty's AppleScript command perform action "reload_config" (needs macos-applescript = true, the default) |
| Linux | SIGUSR2 to your Ghostty processes, which the GTK app handles as a reload |
Pass --no-reload to only save.
🧭 Keys
| Key | Action |
|---|---|
↑ ↓ / j k |
move |
← → / tab |
switch between categories and options |
enter |
edit the selected option |
space |
toggle a boolean / cycle a choice |
+ - |
increase / decrease a number |
r / del |
reset to the default (removes the line) |
/ |
search option names and documentation |
b |
key binding editor |
shift+↑ shift+↓ |
scroll the documentation |
u / ctrl+z |
undo |
c |
show unsaved changes |
p |
hide options for other platforms |
ctrl+s |
validate, save and reload |
? |
help |
q |
quit |
The mouse works too: click to select, click again to edit, and scroll with the wheel. The user guide lists the keys of every editor.
⚙️ Command line
ghosttyconf [flags] [config-file]
--config <file> config file to edit (default: the one Ghostty loads)
--ghostty <path> ghostty binary (default: $PATH, then /Applications)
--no-reload do not reload Ghostty after saving
--offline do not run ghostty; use the built-in option list
--print-path print the config file that would be edited and exit
🔧 How it works
The list of options, their types, enum values and flags is generated from
Ghostty's source (src/config/Config.zig) and built into the binary. At
startup, ghosttyconf asks the installed Ghostty for its documentation and
defaults (ghostty +show-config --default --docs), so the text always matches
your version. Themes, fonts, actions and validation also come from the
ghostty command line. Without Ghostty (--offline), the built-in data is
used.
📖 Documentation
- User guide: every editor, key bindings in depth, saving, reloading, troubleshooting
- Development: project layout, the schema generator, tests and screenshots