Skip to content

matthewod11-stack/ghostty-ai-themes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghostty-ai-themes

Per-surface theme switching for AI CLI tools in Ghostty.

Launch claude and your terminal goes light. Launch codex and it goes dark. Exit, and everything resets. Other windows and tabs are untouched.

ghostty-ai-themes demo

How It Works

Ghostty supports OSC escape sequences that change terminal colors per-surface (window, tab, or split). This tool:

  1. Reads your config to find which AI tool maps to which theme
  2. Parses Ghostty's own theme files to extract the color palette
  3. Generates zsh wrapper functions that apply the theme on launch and reset on exit

The theme switch is instant, per-pane only, and cleanup is guaranteed even if you Ctrl+C — thanks to zsh's always block (the shell equivalent of try/finally).

Features

  • Zero friction — just type claude or codex as usual, themes apply automatically
  • Any Ghostty theme — uses Ghostty's 400+ built-in themes directly, no duplication
  • Per-surface only — other windows, tabs, and splits keep their colors
  • Guaranteed resetalways block restores your default theme even on interrupt
  • YAML config — simple tool-to-theme mapping, add any CLI tool you want
  • No dependencies — pure zsh + awk, nothing to install beyond the script

Installation

Homebrew

brew tap matthewod11-stack/homebrew-tools
brew install ghostty-ai-themes

Then add to your ~/.zshrc:

source "$(brew --prefix)/share/ghostty-ai-themes.zsh"

Manual

git clone https://github.com/matthewod11-stack/ghostty-ai-themes.git ~/.config/ghostty-ai-themes

Add to your ~/.zshrc:

source ~/.config/ghostty-ai-themes/ghostty-ai-themes.zsh

Configuration

Create your config file:

mkdir -p ~/.config/ghostty-ai-themes
cp config.example.yml ~/.config/ghostty-ai-themes/config.yml

Edit ~/.config/ghostty-ai-themes/config.yml:

tools:
  claude:
    theme: "Selenized Light"
  codex:
    theme: "Black Metal (Burzum)"
  gemini:
    theme: "Dracula"
  aider:
    theme: "Gruvbox Dark"

Theme names must match Ghostty theme files exactly (case-sensitive, spaces allowed).

Finding Available Themes

# macOS
ls /Applications/Ghostty.app/Contents/Resources/ghostty/themes/

# Linux
ls /usr/share/ghostty/themes/

Ghostty ships with 400+ themes. Any of them work here.

Requirements

License

MIT

About

Per-surface theme switching for AI CLI tools in Ghostty

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors