Skip to content

πŸš€ Production-ready Ghostty terminal, Zsh, and VS Code dotfiles for modern development workflows. Optimized for 2025 with AI integration.

License

Notifications You must be signed in to change notification settings

jlfguthrie/ghostty-terminal-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Ghostty Dotfiles - Modern Terminal Configuration

Ghostty Dotfiles by John Guthrie

GitHub Stars GitHub Forks License MIT Build Status

Ghostty Terminal Zsh Shell VS Code AI Integration macOS

Crafted by John Guthrie - AI Builder & Entrepreneur from South Africa πŸ‡ΏπŸ‡¦ Powered by Xstra AI ✨ | Enabled by Astrata Cloud 🌀️ | Building IntelliCommerce πŸŒ€

The definitive Ghostty terminal dotfiles collection for modern developers in 2025. This isn't just another dotfiles repositoryβ€”it's a production-ready development environment optimized for AI-assisted coding, performance, and developer productivity.

⭐ Why Ghostty Dotfiles?

This isn't just another dotfiles collection. It's a production-ready development environment that leverages the latest 2025 terminal technologies:

  • πŸ”₯ Ghostty Terminal Integration - Harnesses native GPU acceleration and shell integration
  • πŸ€– AI-Powered Workflow - Integrated with Ollama for local AI and GitHub Copilot for cloud AI.
  • ⚑ Performance First - Lazy loading, instant prompts, and optimized startup times
  • 🎨 Beautiful & Functional - Modern CLI tools with rich syntax highlighting and icons
  • πŸ› οΈ Developer-Focused - Built by developers, for developers

πŸš€ Features

πŸ€– AI-Powered Command Generation (New!)

  • Natural Language to Command: Use the ai, aik, and aie commands to translate plain English into executable shell commands.
  • ai [prompt]: Executes the suggested command immediately.
  • aik [prompt]: Asks for confirmation before running the command.
  • aie [prompt]: Allows you to edit the suggested command before execution.
  • Local LLM Integration: Powered by your own local Ollama instance for privacy and offline capability.
  • Command Correction: (Coming Soon) Get suggestions for correcting failed commands.

πŸš€ Performance Optimizations (Enhanced 2025)

Our AI helper now uses advanced performance optimizations for near-instant command generation:

  • Fast Model Default: Uses phi3:mini by default - Microsoft's lightning-fast model optimized for command generation
  • Model Keep-Alive: Models stay loaded in memory for 1 hour, eliminating cold-start delays
  • JSON Mode Output: Structured responses for 100% reliable command parsing
  • Model Flexibility: Switch models via environment variables (OLLAMA_MODEL=llama3:8b)
  • Smart Error Handling: Automatic model availability checks and helpful setup hints

Performance Comparison:

  • First run: ~3-5 seconds (model loading)
  • Subsequent runs: ~1-2 seconds (model cached)
  • Previous version: ~45 seconds per request 🐌 β†’ New version: ~1-2 seconds ⚑
# Quick setup for AI features
./scripts/setup-ai.sh

# Usage examples (now lightning fast!)
ai list all python files modified today
aik find large files over 100MB
aie show git status with colors

# Use different models for specific needs
export OLLAMA_MODEL='llama3:8b'
ollama pull llama3:8b
ai analyze this git repository structure

πŸ”₯ Ghostty Terminal Integration (June 2025)

  • πŸ€– Native Shell Integration with automatic injection for zsh, bash, fish
  • ⚑ Advanced Prompt Navigation with cmd+up/down for jumping between prompts
  • 🎯 Smart Cursor Behavior - bar at prompt, block in applications
  • πŸ“‹ Semantic Selection with triple-click+cmd for command output selection
  • πŸ–±οΈ Alt+click positioning for precise cursor placement
  • 🎨 Built-in Theme Support with automatic light/dark mode switching
  • ⚑ GPU Acceleration with Metal on macOS for superior performance
  • πŸ”— Enhanced Keybindings with performable actions and global shortcuts
  • πŸ’» VS Code Integration with optimized keybindings and settings

🐚 Enhanced Zsh Configuration (2025 Edition)

  • ⚑ Powerlevel10k theme with instant prompt for ultra-fast startup
  • πŸ”Œ Modern plugins carefully selected to complement Ghostty features
  • πŸ’Ό Development-focused aliases and functions for 2025 workflows
  • 🌳 Git workflow enhancements with semantic selection support
  • πŸ› οΈ Modern command replacements (eza, bat, fd, ripgrep, fzf, bottom, etc.)
  • πŸ“¦ Language version managers with lazy loading for performance
  • πŸ” FZF integration for enhanced fuzzy finding and navigation
  • πŸš€ Performance optimized to work with Ghostty's native capabilities

πŸ’» VS Code Integration (Enhanced)

  • βš™οΈ Complete settings configuration optimized for Ghostty
  • 🎨 Font and theme consistency between terminal and editor
  • πŸ”Œ Recommended extensions for modern development
  • πŸ€– GitHub Copilot optimization settings
  • πŸ“± Terminal profile specifically configured for Ghostty
  • πŸ”€ Intelligent settings merging preserves existing configurations

πŸ› οΈ Modern Development Tools (2025)

  • πŸ“¦ Package managers: npm, yarn, bun
  • πŸ”„ Runtime managers: nvm (lazy-loaded), pyenv, rustup
  • 🌐 Language support: Node.js, Python, Go, Rust, Deno
  • 🐳 Container tools: Docker, Kubernetes with enhanced aliases
  • πŸ”§ Modern CLI tools: gh (GitHub CLI), httpie, tldr, zoxide
  • πŸ”„ Enhanced git workflow with delta, GitLens integration

πŸ“Έ Screenshots

🌟 Ghostty Terminal with AI Command Generation

Ghostty Terminal with AI

🎨 VS Code Integration

VS Code Integration

πŸ“Š Modern Command Tools

Modern Tools

πŸ“ Repository Structure

ghostty-terminal-dotfiles/
β”œβ”€β”€ πŸ“„ README.md                    # This comprehensive documentation
β”œβ”€β”€ πŸ“„ CHANGELOG.md                 # Version history and migration notes
β”œβ”€β”€ πŸ”§ install.sh                   # Enhanced installation script
β”œβ”€β”€ πŸ€– ai/
β”‚   └── ghostty_ai.py             # Python script for Ollama integration
β”œβ”€β”€ πŸ‘» ghostty/
β”‚   └── config                    # Ghostty terminal configuration
β”œβ”€β”€ πŸ“œ scripts/
β”‚   β”œβ”€β”€ backup.sh                 # Backup script for existing configs
β”‚   β”œβ”€β”€ check-versions.sh         # Script to check tool versions
β”‚   β”œβ”€β”€ sync.sh                   # Script to sync local changes
β”‚   β”œβ”€β”€ update-tools.sh           # Script to update tools
β”‚   └── validate-all.sh           # Validation script for all configs
β”œβ”€β”€ πŸ’» vscode/
β”‚   └── settings.json             # VS Code settings
└── 🐚 zsh/
    β”œβ”€β”€ .zshrc                    # Main Zsh configuration file
    └── aliases.sh                # Zsh aliases

πŸ›  Installation

Prerequisites

Before installing, ensure you have:

  1. macOS (primary supported platform)

  2. Ghostty Terminal - Download from ghostty.org

  3. VS Code - Download from code.visualstudio.com

  4. Homebrew (recommended) - Install with:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

πŸš€ Quick Start

One-Line Installation

git clone https://github.com/jlfguthrie/ghostty-terminal-dotfiles.git && cd ghostty-dotfiles && ./install.sh

System Requirements

Before installing, ensure you have:

  1. 🍎 macOS (primary supported platform)

  2. πŸ‘» Ghostty Terminal - Download from ghostty.org

  3. πŸ’» VS Code - Download from code.visualstudio.com

  4. 🍺 Homebrew (recommended) - Install with:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Manual Installation

  1. πŸ“₯ Clone the repository:

    git clone https://github.com/jlfguthrie/ghostty-terminal-dotfiles.git
    cd ghostty-dotfiles
  2. πŸš€ Run the installation script:

    ./install.sh
  3. πŸ”„ Restart Ghostty or reload configuration:

    source ~/.zshrc
  4. 🎨 Configure Powerlevel10k (first time):

    p10k configure

What Gets Installed

The installation script will:

  • βœ… Install Oh My Zsh with Powerlevel10k theme
  • βœ… Install 25+ modern development tools via Homebrew
  • βœ… Configure Ghostty for optimal development experience
  • βœ… Set up VS Code integration with recommended extensions
  • βœ… Create timestamped backups of existing configurations
  • βœ… Install enhanced Zsh configuration with 200+ aliases

Post-Installation Steps

  1. Set Ghostty as Default Terminal:

    • Go to System Settings β†’ General β†’ Default web browser
    • Set terminal to Ghostty
  2. Install VS Code Command Line Tools:

    • Open VS Code
    • Press Cmd+Shift+P
    • Type "Install 'code' command in PATH"
  3. Configure Git (if not already done):

    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
  4. Test Ghostty Features:

    • Use cmd+up/down to navigate between prompts
    • Try cmd+click to select command output
    • Test alt+click to position cursor

🎯 Key Features to Explore

Ghostty-Specific Features

  • Prompt Navigation: cmd+up/down to jump between command prompts
  • Semantic Selection: cmd+triple-click to select command output
  • Cursor Positioning: alt+click to move cursor to click location
  • Configuration Reload: cmd+shift+, to reload Ghostty config
  • Theme Switching: Automatic light/dark mode following system

Enhanced Git Workflow

# Quick commits
gquick "Your commit message"

# Create and push new branch
gnew feature-branch-name

# Interactive branch switching (with fzf)
fgco

# Enhanced git status
gs  # Short, colorized status with branch info

Modern Command Replacements

# Enhanced file listing
ls    # eza with icons and git status
ll    # detailed listing with timestamps
tree  # directory tree with icons

# Better text processing
cat file.txt    # bat with syntax highlighting
grep pattern    # ripgrep with smart case
find . -name    # fd with better performance

# System monitoring
top    # bottom with better interface
ps     # procs with enhanced output
du     # dust with visual directory sizes

Development Productivity

# Quick project initialization
initproj myproject node    # Creates Node.js project
initproj myapp python      # Creates Python project with venv
initproj myservice go      # Creates Go module

# VS Code integration
c.         # Open current directory in VS Code
cproj name # Open project from ~/dev/name
fcode      # Fuzzy find and open file in VS Code

# Docker shortcuts
dps        # Pretty docker ps output
fdocker    # Interactive container management with fzf

# Kubernetes shortcuts
k          # kubectl alias
kgp        # Get pods with wide output
kshell     # Interactive pod shell access

πŸ”§ Customization

Local Overrides

Create these files for local customizations that won't be committed:

  • ~/.zshrc.local - Local zsh configurations
  • ~/.aliases.local - Local aliases and functions
  • ~/.zshrc.work - Work-specific configurations

VS Code Settings

The installer preserves your existing VS Code settings while adding Ghostty optimizations. You can manually edit:

code "$HOME/Library/Application Support/Code/User/settings.json"

Ghostty Configuration

Edit Ghostty config directly:

ghostty-config  # Opens config in VS Code

After making changes, reload with cmd+shift+, in Ghostty.

πŸš€ Advanced Usage

FZF Enhanced Navigation

fcd        # Fuzzy find and change directory with preview
fgco       # Fuzzy find and checkout git branch
fkill      # Interactive process killer
fdocker    # Interactive Docker container management

Quick Utilities

serve 8080          # Start HTTP server on port 8080
json '{"key":"val"}'# Format and validate JSON
extract file.zip    # Extract any archive format
weather london      # Get weather information
sysinfo            # Display system information
timer 300          # Set a 5-minute timer with notification

πŸ†˜ Troubleshooting

Common Issues

Shell integration not working:

echo $GHOSTTY_RESOURCES_DIR  # Should show Ghostty resources path

Slow shell startup:

  • Check that NVM is lazy-loaded (it should be with this config)
  • Run time zsh -i -c exit to measure startup time

VS Code terminal not using Ghostty:

  • Check VS Code settings: "terminal.external.osxExec": "Ghostty.app"
  • Restart VS Code after installation

Missing modern tools:

brew install eza bat fd ripgrep fzf  # Install missing tools manually

Getting Help

  1. Check the Ghostty documentation
  2. Review our troubleshooting guide
  3. Open an issue in this repository
  4. Join the Ghostty Discord

πŸ”„ Staying Updated

Update the Configuration

cd path/to/ghostty-terminal-dotfiles
git pull origin main
./install.sh  # Re-run installer to apply updates

Sync Your Changes

./scripts/sync.sh  # Sync local changes back to repository

Backup Before Updates

./scripts/backup.sh  # Create manual backup before major changes
  1. Install Ghostty Terminal (June 2025 version)

    # Download from official website (recommended)
    # Visit: https://ghostty.org/download
    
    # Or build from source for latest features
    # Visit: https://ghostty.org/docs/install/build
  2. Install Homebrew (for modern development tools)

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Install required fonts

    brew tap homebrew/cask-fonts
    brew install --cask font-jetbrains-mono-nerd-font

Quick Setup

  1. Clone this repository

    git clone https://github.com/jlfguthrie/ghostty-terminal-dotfiles.git ~/dev/scripts/ghostty-dotfiles
    cd ~/dev/scripts/ghostty-terminal-dotfiles
  2. Run the enhanced installation script

    chmod +x install.sh
    ./install.sh

    The installer will:

    • Install Oh My Zsh and Powerlevel10k
    • Install modern development tools (eza, bat, fd, ripgrep, etc.)
    • Configure Ghostty with optimized settings
    • Set up VS Code integration
    • Create comprehensive backups
  3. Restart Ghostty and enjoy the enhanced experience

    # Or source the configuration
    source ~/.zshrc
  4. Configure Powerlevel10k (first-time setup)

    p10k configure

Manual Setup Instructions

  1. Backup your existing configurations

    cp ~/.zshrc ~/.zshrc.backup
    cp ~/.config/ghostty/config ~/.config/ghostty/config.backup
  2. Create symbolic links

    # Zsh configuration
    ln -sf ~/dev/scripts/ghostty-terminal-dotfiles/zsh/.zshrc ~/.zshrc
    
    # Ghostty configuration
    mkdir -p ~/.config/ghostty
    ln -sf ~/dev/scripts/ghostty-terminal-dotfiles/ghostty/config ~/.config/ghostty/config

βš™οΈ Configuration Details

Ghostty Features Leveraged

  • Automatic Shell Integration: Detects and injects integration for zsh automatically
  • Prompt Navigation: cmd+up/down to jump between command prompts
  • Semantic Selection: triple-click+cmd to select command output
  • Smart Cursor: Bar cursor at prompt, block cursor in applications
  • Alt+Click Positioning: Click to position cursor during text editing
  • Native Theme Support: Automatic light/dark mode theme switching
  • GPU Acceleration: Metal renderer on macOS for superior performance
  • Working Directory Inheritance: New terminals open in the last focused location

Zsh Enhancements (Complementing Ghostty)

  • Powerlevel10k: Ultra-fast prompt with instant prompt feature
  • Smart History: Optimized history management with deduplication
  • Development Aliases: Git, Docker, Kubernetes, and modern CLI tool shortcuts
  • VS Code Integration: Quick project navigation and file operations
  • Modern Tools: Integration with eza, bat, fd, ripgrep, fzf, and more
  • Performance Focus: Configurations optimized to work with Ghostty's speed

VS Code Integration Features

  • Terminal Settings: Ghostty configured as default external terminal
  • Font Harmony: Matching font configuration between editor and terminal
  • Environment Variables: Proper TERM and COLORTERM settings
  • Keybinding Consistency: Familiar shortcuts across both environments

Key Aliases and Functions

# Modern command replacements
ll              # Enhanced directory listing with exa
cat             # Syntax highlighted with bat
find            # Fast search with fd
grep            # Better search with ripgrep

# Git shortcuts
gs              # git status
ga              # git add
gc              # git commit
gp              # git push
gl              # git pull

# Development
code .          # Open current directory in VS Code
serve           # Quick HTTP server
weather         # Get weather information

πŸ”„ Syncing Configurations

To keep your configurations in sync across multiple machines:

  1. Push changes to repository

    cd ~/dev/scripts/ghostty-terminal-dotfiles
    ./scripts/sync.sh
  2. Pull updates on other machines

    cd ~/dev/scripts/ghostty-terminal-dotfiles
    git pull origin main
    source ~/.zshrc

🎨 Advanced Customization

Modifying Zsh Configuration

Edit zsh/.zshrc and add your custom configurations:

# Add custom aliases
alias myalias="command"

# Add custom functions
myfunction() {
    # Your function code
}

# Add custom exports
export MY_VARIABLE="value"

Modifying Ghostty Configuration

Edit ghostty/config to customize terminal behavior:

# Change font
font-family = "Your Preferred Font"

# Modify theme
theme = "Your Preferred Theme"

# Adjust transparency
background-opacity = 0.9

πŸ“‹ Troubleshooting

Known Issues

  1. Powerlevel10k not loading

    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
  2. Plugins not working

    # Reinstall plugins
    rm -rf ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  3. Ghostty config not loading

    # Check config location
    ls -la ~/.config/ghostty/config
    
    # Restart Ghostty completely
    killall ghostty && open -a Ghostty

🀝 Contributing

Feel free to submit issues and enhancement requests!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Note: This configuration is optimized for macOS with Ghostty terminal and VS Code. Adjustments may be needed for other platforms or terminals.

About

πŸš€ Production-ready Ghostty terminal, Zsh, and VS Code dotfiles for modern development workflows. Optimized for 2025 with AI integration.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published