Pure
Minimal and beautiful Zsh prompt.
Official WebsiteFeatures
Installation
brew install purenpm install -g pure-promptWhy use Pure?
Minimal Design
Clean and distraction-free. Shows only essential information without clutter.
Fast Performance
Async Git operations keep the prompt responsive even in large repositories.
Git Integration
Smart Git branch display with status checking that doesn't slow down your shell.
Perfect Design
Created by Sindre Sorhus with attention to every detail. Just works beautifully.
Installation
Pure can be installed via npm or Homebrew. Choose the method that works best for you.
# Installation via npm (recommended)
npm install --global pure-prompt
# Installation via Homebrew (macOS)
brew install pure
# Or clone manually
mkdir -p ~/.config/zsh
git clone https://github.com/sindresorhus/pure.git ~/.config/zsh/pureAfter installation, add this to your ~/.zshrc:
# Add to ~/.zshrc
fpath+=$HOME/.config/zsh/pure
autoload -U promptinit; promptinit
prompt pure
# Or if installed via npm or Homebrew:
autoload -U promptinit; promptinit
prompt pureBasic Usage
Pure works out of the box with minimal configuration. After installation, reload your shell:
Activate Pure
# Reload Zsh to apply changes
exec zsh
# Or source the config file
source ~/.zshrc
# You should now see the Pure prompt
# ❯ (cursor appears here)What You'll See
Pure shows:
# In a regular directory:
# current-folder ❯
# In a Git repository:
# current-folder master ❯
# After a command takes >5 seconds:
# current-folder master (2s) ❯
# If previous command failed:
# current-folder master 1 ❯
# With uncommitted changes:
# current-folder master* ❯Configuration
Pure is highly configurable via Zsh environment variables. Customize it to your preferences:
Configuration Options
# Add these BEFORE loading Pure in ~/.zshrc
# Customize the git status symbol
export PURE_GIT_STATUS_DIRTY='*'
export PURE_GIT_STATUS_CLEAN=''
# Customize the prompt character
export PURE_PROMPT_SYMBOL='❯'
export PURE_PROMPT_VICMD_SYMBOL='❮' # For vi-mode
# Set the execution time threshold (milliseconds)
export PURE_CMD_MAX_EXEC_TIME=5
# Disable Git information
export PURE_GIT_PULL=0
# Show Git fetch/push indicator
export PURE_GIT_PULL=1 # Default
# Customize command max execution time
export PURE_CMD_THRESHOLD=5000
# Now load Pure
autoload -U promptinit; promptinit
prompt pureComplete Example Configuration
# ~/.zshrc - Pure configuration example
# Enable Zsh options
setopt PROMPT_SUBST
# Load Pure prompt with customization
export PURE_PROMPT_SYMBOL='❯'
export PURE_PROMPT_VICMD_SYMBOL='❮'
export PURE_GIT_PULL=1
export PURE_GIT_UNTRACKED_DIRTY=0 # Don't mark as dirty if untracked files
export PURE_CMD_MAX_EXEC_TIME=3 # Show execution time if > 3s
export PURE_GIT_DELAY_FETCH_PERCENT=0 # Always fetch
# For better Git performance
export PURE_GIT_UNTRACKED_DIRTY=1
# Load prompt
autoload -U promptinit
promptinit
prompt pure
# Additional settings
alias ll='ls -lah'
alias gs='git status'
alias ga='git add'
alias gc='git commit -m'
alias gp='git push'Environment Variables
# All Pure configuration options:
PURE_PROMPT_SYMBOL # Character for successful command (default: ❯)
PURE_PROMPT_VICMD_SYMBOL # Character for vi-mode command (default: ❮)
PURE_GIT_DOWN_ARROW # Character for commits behind (default: ⇣)
PURE_GIT_UP_ARROW # Character for commits ahead (default: ⇡)
PURE_GIT_BRANCH_SYMBOL # Character for branch (default: ⎇)
PURE_GIT_STATUS_DIRTY # Character for dirty status (default: *)
PURE_GIT_STATUS_CLEAN # Character for clean status (default: empty)
PURE_GIT_PULL # Show fetch/push info (default: 1)
PURE_GIT_UNTRACKED_DIRTY # Mark dirty on untracked files (default: 1)
PURE_CMD_MAX_EXEC_TIME # Threshold for execution time display in seconds (default: 5)
PURE_GIT_DELAY_FETCH_PERCENT # Delay between git fetches (default: 0)Tips & Tricks
Vi-Mode Integration
Pure works great with Zsh vi-mode. The prompt symbol changes in command mode:
# Enable vi-mode in ~/.zshrc
bindkey -v
# Pure automatically shows different symbol in vi-mode
# Customize the symbol:
export PURE_PROMPT_VICMD_SYMBOL='❮'
export PURE_PROMPT_SYMBOL='❯'
# Add this for better vi-mode experience
function zle-keymap-select {
zle reset-prompt
}
zle -N zle-keymap-selectColors and Styling
Pure uses basic colors that work with any color scheme. For custom colors:
# Pure uses these color variables from Zsh
# You can override them before loading Pure
# Example: Set custom colors
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats '%b'
zstyle ':vcs_info:git*' actionformats '%b (%a)'
# Pure respects your terminal color scheme
# Set terminal theme to get the best colors
# Recommended: Nord, Dracula, Gruvbox, SolarizedGit Performance Tuning
Optimize Git operations for better performance:
# Disable Git pull indicator in large repos
export PURE_GIT_PULL=0
# Disable untracked file marking
export PURE_GIT_UNTRACKED_DIRTY=0
# For slow Git operations, increase threshold
export PURE_CMD_MAX_EXEC_TIME=10
# Exclude directories from Git tracking
# Add to ~/.gitignore_global or git config
git config --global core.excludesFile ~/.gitignore_global
# Configure git to be faster
git config --global core.filemode false
git config --global status.preloadindex trueCombine with Other Tools
Pure works seamlessly with other Zsh tools:
# With zsh-autosuggestions
zinit light zsh-users/zsh-autosuggestions
# With syntax highlighting
zinit light zsh-users/zsh-syntax-highlighting
# With fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# With dircolors
eval "$(dircolors -b)"
# All these work perfectly with PureTroubleshooting
Common issues and solutions:
# Prompt not showing
# Make sure autoload is before prompt
autoload -U promptinit
promptinit
prompt pure
# Git branch not showing
# Check if git is working: git -C . branch
# Colors look wrong
# Set terminal to use 256 colors or true color
export TERM=xterm-256color
# Special characters not displaying
# Install and use a Nerd Font or Unicode font
# Performance issues
# Disable Git pulling in large repos
export PURE_GIT_PULL=0Minimal .zshrc Example
Start minimal and add features as needed:
# ~/.zshrc - Minimal Pure setup
# Load Pure prompt
autoload -U promptinit
promptinit
prompt pure
# Essential settings
setopt PROMPT_SUBST
bindkey -e # Emacs mode (or -v for vi mode)
# Optional customizations
export PURE_CMD_MAX_EXEC_TIME=3
# Add your aliases here
alias ll='ls -lah'
alias gs='git status'