diff --git a/commands/developer-utils/ghostty/README.md b/commands/developer-utils/ghostty/README.md new file mode 100755 index 000000000..2980e7cc8 --- /dev/null +++ b/commands/developer-utils/ghostty/README.md @@ -0,0 +1,198 @@ +# 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 + +![Dropdown Menu](images/dropdown-menu.png) + + +## 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) + +![Terminals Comparison](images/terminals-comparison.png) diff --git a/commands/developer-utils/ghostty/images/dropdown-menu.png b/commands/developer-utils/ghostty/images/dropdown-menu.png new file mode 100644 index 000000000..64886b402 Binary files /dev/null and b/commands/developer-utils/ghostty/images/dropdown-menu.png differ diff --git a/commands/developer-utils/ghostty/images/terminals-comparison.png b/commands/developer-utils/ghostty/images/terminals-comparison.png new file mode 100644 index 000000000..7f26b8c8e Binary files /dev/null and b/commands/developer-utils/ghostty/images/terminals-comparison.png differ diff --git a/commands/developer-utils/ghostty/launch-ai-terminal.sh b/commands/developer-utils/ghostty/launch-ai-terminal.sh new file mode 100755 index 000000000..3e97e9d43 --- /dev/null +++ b/commands/developer-utils/ghostty/launch-ai-terminal.sh @@ -0,0 +1,121 @@ +#!/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) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(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) + "$GHOSTTY" \ + --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) + "$GHOSTTY" \ + --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) + "$GHOSTTY" \ + --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) + "$GHOSTTY" \ + --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) + "$GHOSTTY" \ + --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 diff --git a/commands/developer-utils/ghostty/launch-claude-code.sh b/commands/developer-utils/ghostty/launch-claude-code.sh new file mode 100755 index 000000000..2c325576e --- /dev/null +++ b/commands/developer-utils/ghostty/launch-claude-code.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title Claude Code Terminal +# @raycast.mode silent +# @raycast.packageName AI Development +# @raycast.icon 🤖 +# @raycast.iconColor "#5865F2" +# @raycast.description Launch Ghostty terminal for Claude Code +# @raycast.author David (drg) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(find_ghostty)" || exit 1 + +# ============================================================ +# Launch Ghostty with Claude Code theme +# ============================================================ +"$GHOSTTY" \ + --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 & +exit 0 diff --git a/commands/developer-utils/ghostty/launch-codex.sh b/commands/developer-utils/ghostty/launch-codex.sh new file mode 100755 index 000000000..730eb2781 --- /dev/null +++ b/commands/developer-utils/ghostty/launch-codex.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title Codex Terminal +# @raycast.mode silent +# @raycast.packageName AI Development +# @raycast.icon ⚡ +# @raycast.iconColor "#10A37F" +# @raycast.description Launch Ghostty terminal for Codex +# @raycast.author David (drg) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(find_ghostty)" || exit 1 + +# ============================================================ +# Launch Ghostty with Codex theme +# ============================================================ +"$GHOSTTY" \ + --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 & +exit 0 diff --git a/commands/developer-utils/ghostty/launch-gemini.sh b/commands/developer-utils/ghostty/launch-gemini.sh new file mode 100755 index 000000000..0a8211496 --- /dev/null +++ b/commands/developer-utils/ghostty/launch-gemini.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title Gemini Terminal +# @raycast.mode silent +# @raycast.packageName AI Development +# @raycast.icon 🌟 +# @raycast.iconColor "#4285F4" +# @raycast.description Launch Ghostty terminal for Gemini +# @raycast.author David (drg) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(find_ghostty)" || exit 1 + +# ============================================================ +# Launch Ghostty with Gemini theme +# ============================================================ +"$GHOSTTY" \ + --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 & +exit 0 diff --git a/commands/developer-utils/ghostty/launch-kimi.sh b/commands/developer-utils/ghostty/launch-kimi.sh new file mode 100755 index 000000000..8b89669f5 --- /dev/null +++ b/commands/developer-utils/ghostty/launch-kimi.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title Kimi Terminal +# @raycast.mode silent +# @raycast.packageName AI Development +# @raycast.icon 🌙 +# @raycast.iconColor "#A78BFA" +# @raycast.description Launch Ghostty terminal for Kimi CLI +# @raycast.author David (drg) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(find_ghostty)" || exit 1 + +# ============================================================ +# Launch Ghostty with Kimi theme (Dark Side of the Moon) +# ============================================================ +"$GHOSTTY" \ + --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 & +exit 0 diff --git a/commands/developer-utils/ghostty/launch-terminal-standard.sh b/commands/developer-utils/ghostty/launch-terminal-standard.sh new file mode 100755 index 000000000..9fe25908b --- /dev/null +++ b/commands/developer-utils/ghostty/launch-terminal-standard.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title Standard Terminal +# @raycast.mode silent +# @raycast.packageName AI Development +# @raycast.icon 🖥️ +# @raycast.iconColor "#BD93F9" +# @raycast.description Launch Ghostty terminal with standard theme +# @raycast.author David (drg) + +# ============================================================ +# Load shared helpers + find Ghostty binary +# ============================================================ +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=lib/ghostty.sh +source "$SCRIPT_DIR/lib/ghostty.sh" +GHOSTTY="$(find_ghostty)" || exit 1 + +# ============================================================ +# Launch Ghostty with Standard theme +# ============================================================ +"$GHOSTTY" \ + --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 & +exit 0 diff --git a/commands/developer-utils/ghostty/lib/ghostty.sh b/commands/developer-utils/ghostty/lib/ghostty.sh new file mode 100755 index 000000000..b4aa3c342 --- /dev/null +++ b/commands/developer-utils/ghostty/lib/ghostty.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Shared helpers for Ghostty Raycast scripts +# Compatible: Bash 3.2+ (macOS default) + +find_ghostty() { + local SEARCH_PATHS=( + "/Applications/Ghostty.app/Contents/MacOS/ghostty" + "/opt/homebrew/bin/ghostty" + "/usr/local/bin/ghostty" + "$HOME/.local/bin/ghostty" + ) + + local p + for p in "${SEARCH_PATHS[@]}"; do + if [ -x "$p" ]; then + echo "$p" + return 0 + fi + done + + p="$(command -v ghostty 2>/dev/null)" + if [ -n "$p" ] && [ -x "$p" ]; then + echo "$p" + return 0 + fi + + echo "❌ Ghostty not found" >&2 + echo "💡 Install: brew install ghostty" >&2 + return 1 +} diff --git a/commands/developer-utils/ghostty/list-recommended-themes.sh b/commands/developer-utils/ghostty/list-recommended-themes.sh new file mode 100755 index 000000000..c0451276b --- /dev/null +++ b/commands/developer-utils/ghostty/list-recommended-themes.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Compatible: Bash 3.2+ (macOS default) + +# @raycast.schemaVersion 1 +# @raycast.title List Recommended Themes +# @raycast.mode fullOutput +# @raycast.packageName AI Development +# @raycast.icon 📋 +# @raycast.iconColor "#06B6D4" +# @raycast.description Recommended Ghostty themes +# @raycast.author David (drg) + +cat << 'THEMES' +🎨 GHOSTTY THEMES - CURRENT CONFIGURATION +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +🤖 Claude Code → Atom One Dark +⚡ Codex → Ayu Mirage +🌟 Gemini → Adventure Time +🌙 Kimi → Dark Side of the Moon (custom) +🖥️ Standard → Atom + +GHOSTTY COMMANDS: + List all : ghostty +list-themes + Test theme : ghostty --theme="Theme Name" + +RAYCAST SCRIPTS: + • Launch AI Terminal (dropdown) + • Claude Code Terminal + • Codex Terminal + • Gemini Terminal + • Kimi Terminal + • Standard Terminal + +CONFIG: + Directory : ~/raycast-scripts/ + Shell : Bash 3.2+ compatible +THEMES