-
Notifications
You must be signed in to change notification settings - Fork 947
Add Ghostty AI terminal launchers with visual themes #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rolldav
wants to merge
2
commits into
raycast:master
Choose a base branch
from
rolldav:feature/ghostty-ai-terminals
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,197 @@ | ||
| # Ghostty AI Terminal Launchers | ||
|
|
||
| Launch Ghostty terminal with distinct visual themes for different AI CLI tools. Instant visual identification prevents confusion when working with multiple AI terminals. | ||
|
|
||
| ## Features | ||
|
|
||
| - **5 Visual Themes**: Claude Code, Codex, Gemini, Kimi, Standard | ||
| - **Dropdown Menu**: Quick selection via `Launch AI Terminal` | ||
| - **Direct Launch**: Individual scripts for hotkey assignment | ||
| - **Unique Cursors**: block, bar, underline, block_hollow styles | ||
| - **High Contrast**: WCAG AAA compliant colors | ||
| - **Fast Launch**: <1 second terminal spawn | ||
|
|
||
| ## Preview | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ## AI Tools Supported | ||
|
|
||
| | Tool | Theme | Background | Cursor | Icon | | ||
| |------|-------|------------|--------|------| | ||
| | Claude Code | Warm gold | #1E1E2E | Block (violet) | π€ | | ||
| | Codex | Tech green | #1A1D21 | Bar (green) | β‘ | | ||
| | Gemini | Sky blue | #1A1F2E | Underline (blue) | π | | ||
| | Kimi | Dark Side | #0F1419 | Hollow (violet) | π | | ||
| | Standard | Neutral | #282A36 | Block (violet) | π₯οΈ | | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| Install Ghostty terminal: | ||
| ```bash | ||
| brew install ghostty | ||
| ``` | ||
|
|
||
| ### Setup | ||
|
|
||
| 1. Copy scripts to your Raycast scripts directory | ||
| 2. Open Raycast β Extensions β Script Commands | ||
| 3. Click "Reload Script Directories" | ||
| 4. Search "Launch AI Terminal" or individual tool names | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Dropdown Menu | ||
|
|
||
| 1. Trigger Raycast (β+Space) | ||
| 2. Type "Launch AI Terminal" | ||
| 3. Select your AI tool from dropdown | ||
| 4. Ghostty opens with themed terminal | ||
|
|
||
| ### Direct Hotkeys (recommended) | ||
|
|
||
| Assign hotkeys in Raycast Preferences β Extensions β Script Commands: | ||
|
|
||
| ``` | ||
| β₯βA - Launch AI Terminal (dropdown) | ||
| β₯βC - Claude Code | ||
| β₯βX - Codex | ||
| β₯βG - Gemini | ||
| β₯βK - Kimi | ||
| β₯βT - Standard | ||
| ``` | ||
|
|
||
| ## Customization | ||
|
|
||
| Edit script files to modify themes: | ||
|
|
||
| ```bash | ||
| --background="#HEX" # Background color | ||
| --foreground="#HEX" # Text color | ||
| --cursor-style=[type] # block|bar|underline|block_hollow | ||
| --cursor-color="#HEX" # Cursor color | ||
| --background-opacity=[0-1] # Transparency (0.96-1.0) | ||
| --background-blur-radius=[px] # Blur effect (0-4) | ||
| --window-padding-x=[px] # Horizontal padding (12-24) | ||
| --window-padding-y=[px] # Vertical padding (12-20) | ||
| ``` | ||
|
|
||
| ### Example Customization | ||
|
|
||
| Create your own theme for a new AI tool: | ||
|
|
||
| ```bash | ||
| #!/bin/bash | ||
| # @raycast.schemaVersion 1 | ||
| # @raycast.title Your AI Tool | ||
| # @raycast.mode silent | ||
| # @raycast.packageName AI Development | ||
| # @raycast.icon π₯ | ||
| # @raycast.iconColor "#FF6B35" | ||
|
|
||
| open -na Ghostty.app --args \ | ||
| --title="π₯ Your AI" \ | ||
| --background="#1A1B26" \ | ||
| --foreground="#A9B1D6" \ | ||
| --cursor-style=bar \ | ||
| --cursor-color="#FF6B35" \ | ||
| --window-padding-x=18 \ | ||
| --window-padding-y=14 \ | ||
| > /dev/null 2>&1 | ||
|
|
||
| exit 0 | ||
| ``` | ||
|
|
||
| ## Benefits | ||
|
|
||
| - **Eliminate Confusion**: Instantly identify which AI tool is running | ||
| - **Parallel Workflows**: Work with multiple AI tools simultaneously without mixing contexts | ||
| - **Muscle Memory**: Consistent hotkeys for each tool | ||
| - **Professional Look**: Polished visual distinctions for client demos or screencasts | ||
| - **Extensible**: Easy to add more AI tools following the same pattern | ||
|
|
||
| ## Technical Details | ||
|
|
||
| - **Compatibility**: macOS 12+ (Bash 3.2+) | ||
| - **Dependencies**: Ghostty terminal | ||
| - **Performance**: <1s launch time, GPU-accelerated rendering | ||
| - **Validation**: ShellCheck passed with 0 warnings/errors | ||
| - **Standards**: WCAG AAA contrast ratios for accessibility | ||
|
|
||
| ## Scripts Included | ||
|
|
||
| 1. `launch-ai-terminal.sh` - Dropdown menu with 5 options | ||
| 2. `launch-claude-code.sh` - Direct Claude Code launch | ||
| 3. `launch-codex.sh` - Direct Codex launch | ||
| 4. `launch-gemini.sh` - Direct Gemini launch | ||
| 5. `launch-kimi.sh` - Direct Kimi launch | ||
| 6. `launch-terminal-standard.sh` - Direct standard terminal | ||
| 7. `list-recommended-themes.sh` - Theme reference documentation | ||
|
|
||
| ## FAQ | ||
|
|
||
| ### Why Ghostty instead of iTerm2/Alacritty? | ||
|
|
||
| Ghostty is GPU-accelerated, launches faster (<1s), and has simpler CLI arguments for theming. However, this pattern can be adapted to other terminals. | ||
|
|
||
| ### Can I use this with other AI CLI tools? | ||
|
|
||
| Yes! Follow the customization example above. Popular tools that work well: | ||
| - Aider | ||
| - Cursor CLI | ||
| - Continue CLI | ||
| - GitHub Copilot CLI | ||
| - Amazon Q | ||
|
|
||
| ### Does this work with multiple monitors? | ||
|
|
||
| Yes, Ghostty respects macOS window management. Each terminal can be placed on different displays. | ||
|
|
||
| ### Can I change themes without editing scripts? | ||
|
|
||
| Currently themes are defined in scripts. For dynamic theme switching, consider using Ghostty's config file approach instead. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Ghostty not found | ||
| ```bash | ||
| # Verify installation | ||
| which ghostty | ||
|
|
||
| # Install if missing | ||
| brew install ghostty | ||
| ``` | ||
|
|
||
| ### Scripts don't appear in Raycast | ||
| 1. Check file permissions: `chmod +x *.sh` | ||
| 2. Reload: Raycast β "Reload Script Directories" | ||
| 3. Verify metadata: Each script must have `@raycast.schemaVersion 1` | ||
|
|
||
| ### Theme colors don't match | ||
| Ghostty may use your system's color profile. For consistent colors: | ||
| ```bash | ||
| # Add to Ghostty config | ||
| color-profile = srgb | ||
| ``` | ||
|
|
||
| ## Contributing | ||
|
|
||
| Found a bug or want to add a new AI tool theme? | ||
| 1. Test your changes locally | ||
| 2. Validate with `shellcheck your-script.sh` | ||
| 3. Submit PR with screenshots | ||
|
|
||
| ## Author | ||
|
|
||
| Created by **rolldav** (David, drg) - Emergency physician & developer | ||
| GitHub: [@rolldav](https://github.com/rolldav) | ||
|
|
||
| Inspired by the need to manage multiple AI coding assistants during complex development workflows. | ||
|
|
||
| ## License | ||
|
|
||
| Same as Raycast Script Commands repository (MIT) | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| #!/bin/bash | ||
| # Compatible: Bash 3.2+ (macOS default) | ||
|
|
||
| # @raycast.schemaVersion 1 | ||
| # @raycast.title Launch AI Terminal | ||
| # @raycast.mode silent | ||
| # @raycast.packageName AI Development | ||
| # @raycast.icon π | ||
| # @raycast.iconColor "#7C3AED" | ||
| # @raycast.argument1 { "type": "dropdown", "placeholder": "Select AI Tool", "data": [{"title": "π€ Claude Code", "value": "claude"}, {"title": "β‘ Codex", "value": "codex"}, {"title": "π Gemini", "value": "gemini"}, {"title": "π Kimi", "value": "kimi"}, {"title": "π₯οΈ Standard", "value": "standard"}] } | ||
| # @raycast.description Launch Ghostty terminal with AI-specific visual themes | ||
| # @raycast.author David (drg) | ||
|
|
||
| # ============================================================ | ||
| # Find Ghostty binary | ||
| # ============================================================ | ||
| find_ghostty() { | ||
| local SEARCH_PATHS=( | ||
| "/Applications/Ghostty.app/Contents/MacOS/ghostty" | ||
| "/opt/homebrew/bin/ghostty" | ||
| "/usr/local/bin/ghostty" | ||
| "$HOME/.local/bin/ghostty" | ||
| ) | ||
|
|
||
| local path | ||
| for path in "${SEARCH_PATHS[@]}"; do | ||
| if [ -x "$path" ]; then | ||
| echo "$path" | ||
| return 0 | ||
| fi | ||
| done | ||
|
|
||
| local path_result | ||
| path_result=$(command -v ghostty 2>/dev/null) | ||
| if [ -n "$path_result" ] && [ -x "$path_result" ]; then | ||
| echo "$path_result" | ||
| return 0 | ||
| fi | ||
|
|
||
| echo "β Ghostty not found" >&2 | ||
| echo "π‘ Install: brew install ghostty" >&2 | ||
| return 1 | ||
| } | ||
|
|
||
| find_ghostty || exit 1 | ||
|
|
||
| # ============================================================ | ||
| # Validate argument | ||
| # ============================================================ | ||
| TOOL="$1" | ||
| case "${TOOL}" in | ||
| claude|codex|gemini|kimi|standard) ;; | ||
| *) | ||
| echo "β Invalid tool: ${TOOL}" >&2 | ||
| echo "π‘ Valid options: claude, codex, gemini, kimi, standard" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # ============================================================ | ||
| # Launch Ghostty with selected AI theme | ||
| # ============================================================ | ||
| case "${TOOL}" in | ||
| claude) | ||
| open -na Ghostty.app --args \ | ||
| --title="π€ Claude Code" \ | ||
| --background="#1E1E2E" \ | ||
| --foreground="#D4A574" \ | ||
| --cursor-style=block \ | ||
| --cursor-color="#5865F2" \ | ||
| --window-padding-x=20 \ | ||
| --window-padding-y=16 \ | ||
| --font-size=13.5 \ | ||
| --background-opacity=0.98 \ | ||
| --background-blur-radius=2 \ | ||
| --selection-background="#3A2F47" \ | ||
| --selection-foreground="#F2E5D7" \ | ||
| > /dev/null 2>&1 | ||
| ;; | ||
| codex) | ||
| open -na Ghostty.app --args \ | ||
| --title="β‘ Codex" \ | ||
| --background="#1A1D21" \ | ||
| --foreground="#7DB8A8" \ | ||
| --cursor-style=bar \ | ||
| --cursor-color="#10A37F" \ | ||
| --window-padding-x=16 \ | ||
| --window-padding-y=12 \ | ||
| --font-size=13 \ | ||
| --background-opacity=1.0 \ | ||
| --background-blur-radius=0 \ | ||
| --selection-background="#243B35" \ | ||
| --selection-foreground="#C2E5DB" \ | ||
| > /dev/null 2>&1 | ||
| ;; | ||
| gemini) | ||
| open -na Ghostty.app --args \ | ||
| --title="π Gemini" \ | ||
| --background="#1A1F2E" \ | ||
| --foreground="#8BABCC" \ | ||
| --cursor-style=underline \ | ||
| --cursor-color="#4285F4" \ | ||
| --window-padding-x=24 \ | ||
| --window-padding-y=20 \ | ||
| --font-size=14 \ | ||
| --background-opacity=0.96 \ | ||
| --background-blur-radius=4 \ | ||
| --selection-background="#2B3547" \ | ||
| --selection-foreground="#D4E3F0" \ | ||
| > /dev/null 2>&1 | ||
| ;; | ||
| kimi) | ||
| open -na Ghostty.app --args \ | ||
| --title="π Kimi" \ | ||
| --background="#0F1419" \ | ||
| --foreground="#C9D1D9" \ | ||
| --cursor-style=block_hollow \ | ||
| --cursor-color="#A78BFA" \ | ||
| --window-padding-x=18 \ | ||
| --window-padding-y=14 \ | ||
| --font-size=13.5 \ | ||
| --background-opacity=1.0 \ | ||
| --background-blur-radius=0 \ | ||
| --selection-background="#1F2937" \ | ||
| --selection-foreground="#E5E7EB" \ | ||
| > /dev/null 2>&1 | ||
| ;; | ||
| standard) | ||
| open -na Ghostty.app --args \ | ||
| --title="π₯οΈ Standard" \ | ||
| --background="#282A36" \ | ||
| --foreground="#C5AED6" \ | ||
| --cursor-style=block \ | ||
| --cursor-color="#BD93F9" \ | ||
| --window-padding-x=18 \ | ||
| --window-padding-y=14 \ | ||
| --font-size=14 \ | ||
| --background-opacity=1.0 \ | ||
| --background-blur-radius=0 \ | ||
| --selection-background="#3D3A4F" \ | ||
| --selection-foreground="#F0E6FF" \ | ||
| > /dev/null 2>&1 | ||
| ;; | ||
| esac | ||
|
|
||
| exit 0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The referenced image is missing