Snippet
Modern Terminal Stack
3 min read
shellproductivitycliterminalzshghosttyzellij
A complete terminal setup: Ghostty, Zellij, and a curated set of CLI tools that replace and enhance the defaults.
A full terminal setup from emulator to shell enhancements. Every tool here replaces something worse or fills a gap.
brew install
# terminal + multiplexer
brew install --cask ghostty
brew install zellij
# shell enhancements
brew install starship eza fzf bat atuin zoxide direnv
$(brew --prefix)/opt/fzf/install
# git
brew install lazygit gh git-delta
# data wrangling
brew install jq yq xh jless
# system utilities
brew install btop ncdu tldr
# k8s (optional)
brew install k9s kubectx sternbash
Shell Config
~/.zshrc
# prompt, history sync, smart cd, per-dir env
eval "$(starship init zsh)"
eval "$(atuin init zsh)"
eval "$(zoxide init zsh)"
eval "$(direnv hook zsh)"
# fzf with bat/eza previews
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
export FZF_ALT_C_OPTS='--preview "eza --tree --level=2 --color=always {}"'
# aliases: modern replacements
alias ls='eza --icons'
alias ll='eza -l --icons --git'
alias la='eza -la --icons --git'
alias lt='eza --tree --level=2 --icons'
alias cat='bat --style=plain'
alias cd='z'
alias top='btop'
# git
alias lg='lazygit'
alias gs='git status'
alias gd='git diff'
# quick helpers
alias preview='fzf --preview "bat --color=always {}"'
alias ports='lsof -i -P -n | grep LISTEN'
alias ip='curl -s ifconfig.me'bash
Tool Configs
~/.config/starship.toml
format = "$directory$git_branch$git_status$cmd_duration$line_break$character"
[directory]
truncation_length = 3
truncate_to_repo = true
[git_branch]
format = "[$branch]($style) "
style = "purple"
[git_status]
format = '([$all_status$ahead_behind]($style) )'
style = "red"
[cmd_duration]
min_time = 2_000
format = "[$duration]($style) "
style = "yellow"
[character]
success_symbol = "[›](green)"
error_symbol = "[›](red)"bash
~/.gitconfig (delta)
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
side-by-side = true
line-numbers = truebash
Keybindings
- Ctrl+R — atuin history search (fuzzy, synced across machines)
- Ctrl+T — fzf file search with bat preview
- Alt+C — fzf cd into directory with eza tree preview
- z <dir> — zoxide smart jump (learns your habits)
- lg — lazygit TUI (stage, commit, push, rebase)
Zellij basics
Ctrl+p n new pane · Ctrl+p d close · Ctrl+t n new tab · Ctrl+o d detach · zellij attach to reattach.
By Brandon Stokes•Written byClaude
Related Snippets
TIL
CLAUDE.md for Infrastructure Project Context
Use CLAUDE.md to give Claude Code persistent context about your infrastructure patterns and standards.
Tip
Claude Code Hooks for DevOps Workflows
Automate pre and post-execution tasks in Claude Code using hooks for linting, formatting, and validation.
Pattern
Robust Claude Project Kickoff
A systematic approach to starting projects with Claude: discovery prompts, hooks, subagents, MCP servers, and CLAUDE.md setup.