@vish288/zsh-config
v1.8.2
Published
Professional ZSH configuration for macOS with 1Password integration
Maintainers
Readme
🚀 Professional ZSH Configuration
A comprehensive, modular, and performance-optimized ZSH configuration for macOS development environments with integrated 1Password secrets management.
✨ Features
🎯 Core Improvements
- Zero dependency issues - No more
> asdfrequired to initialize shell - No alias conflicts - Safe aliases that don't override system commands
- Fast startup - Optimized lazy loading for performance
- Modular design - Easy to customize and extend
🛠️ Development Tools
- mise version management - Automatic Node.js, Python, Java version switching
- Git integration - Enhanced git aliases and functions
- Docker & Kubernetes - Productive container management shortcuts
- Cloud tools - GCP, AWS integration ready
🛡️ Security & Organization
- Full 1Password CLI integration - Complete secrets management system
- Snake_case naming convention - Consistent organization standards
- Secrets manager utility - CLI tool for managing 1Password secrets
- Clean home directory - All configs organized in
~/.config/zsh/ - Proper permissions - Security-focused file permissions
- Comprehensive backup system - Automatic backups and restore capabilities
🚀 Quick Install
Homebrew (Recommended)
brew tap vish288/zsh-config
brew install zsh-config
cd $(brew --prefix)/share/zsh-config && ./install.zshOne-liner (Homebrew)
brew install vish288/zsh-config/zsh-config && cd $(brew --prefix)/share/zsh-config && ./install.zshnpm
npm install -g @vish288/zsh-config
cd $(npm root -g)/@vish288/zsh-config && ./install.zshManual Install
git clone https://github.com/vish288/zsh-config.git ~/.config/zsh
cd ~/.config/zsh
./install.zshcurl Install
curl -fsSL https://raw.githubusercontent.com/vish288/zsh-config/main/install.zsh | zsh📁 Directory Structure
~/.config/zsh/
├── install.zsh # Installation script
├── uninstall.zsh # Uninstall script
├── update.zsh # Update script
├── release.zsh # Release management
├── test_config.zsh # Configuration test
├── quick_test.zsh # Fast validation test
├── manage_secrets.zsh # 1Password secrets manager
├── zshrc # Main configuration
├── zprofile # Login shell config
├── README.md # This documentation
├── LICENSE # MIT License
├── docs/ # Documentation
│ └── CHANGELOG.md # Version history and changelog
├── plugins/ # Plugin configurations
│ ├── oh-my-zsh.zsh # Oh My Zsh setup
│ ├── powerlevel10k.zsh # P10k theme config
│ └── modern-tools.zsh # zoxide, fzf integration
├── aliases/ # Alias definitions
│ ├── core.zsh # Essential aliases
│ ├── git.zsh # Git shortcuts (90+)
│ ├── docker.zsh # Docker commands
│ └── tools.zsh # Development tools
├── functions/ # Custom functions
│ ├── core.zsh # Utility functions
│ ├── git.zsh # Git helpers (15)
│ ├── updates.zsh # Unified update system
│ ├── kubernetes.zsh # GKE/K8s utilities
│ ├── kubernetes.config.template.zsh # K8s config template
│ ├── welcome.zsh # Repo-aware welcome
│ └── system.zsh # System utilities
├── secrets/ # Secure configurations (gitignored)
│ └── secrets.zsh # 1Password tokens
└── themes/ # Theme customizations
└── p10k.zsh # Powerlevel10k config🎨 What You Get
Aliases
# Git (safe, no conflicts)
gs # git status
ga # git add
gc # git commit
gp # git push
glog # pretty git log
# Docker
d # docker
dc # docker-compose
dps # docker ps with nice formatting
dlogs # docker logs -f
# System
ll # ls -alF
la # ls -A
ports # show listening portsFunctions
# Development
killport 8080 # Kill process on port
gac "commit msg" # Git add, commit in one command
proj myproject # Jump to project directory
nx-new workspace # Create new Nx workspace
# System utilities
extract file.tar.gz # Smart extraction
backup myfile # Timestamped backup
sysinfo # System information
weather Toronto # Weather infoPerformance Features
- ⚡ Lazy loading - mise, gcloud, heavy tools load on demand
- 🧠 Smart completions - Fast and context-aware
- 📊 50k history - With deduplication and search
- 🔄 Auto cleanup - Temporary files cleaned automatically
🔧 Customization
Personal Settings (~/.zshrc.local)
Your personal settings are preserved in ~/.zshrc.local, which is automatically sourced.
# Add personal customizations (survives updates)
echo 'export MY_VAR="value"' >> ~/.zshrc.local
echo 'alias myalias="my command"' >> ~/.zshrc.localAdding Aliases
Edit or create files in ~/.config/zsh/aliases/:
# Create custom aliases
echo 'alias myalias="my command"' >> ~/.config/zsh/aliases/custom.zshAdding Functions
Edit or create files in ~/.config/zsh/functions/:
# Add to ~/.config/zsh/functions/custom.zsh
myfunction() {
echo "Custom function"
}Kubernetes / GKE Database Tunneling
The configuration includes an interactive cloud-db command for connecting to Cloud SQL databases via GKE port forwarding.
Setup:
# Copy the template to create your local config (gitignored)
cp ~/.config/zsh/functions/kubernetes.config.template.zsh \
~/.config/zsh/functions/kubernetes.config.zsh
# Edit with your GCP project details
code ~/.config/zsh/functions/kubernetes.config.zshConfiguration format:
# Environment configurations: env -> project|region|cluster
typeset -gA CLOUD_ENVS
CLOUD_ENVS=(
[lower]="my-gcp-project-lower|us-central1|my-cluster-lower"
[upper]="my-gcp-project-upper|us-central1|my-cluster-upper"
)
# Workspace configurations: workspace -> namespace|remote_port
typeset -gA CLOUD_WORKSPACES
CLOUD_WORKSPACES=(
[dev]="my-app-dev|5432"
[staging]="my-app-staging|5432"
[prod]="my-app-prod|5432"
)
# Pod pattern for database proxy
CLOUD_DB_POD_PATTERN="sql-proxy"Usage:
cloud-db # Interactive mode (uses fzf)
cloud-db -w dev # Pre-select workspace
cloud-db -e lower -w dev -p 6432 # Direct mode
gke-auth lower # Quick cluster authenticationAvailable Kubernetes aliases:
kctx / kuse / kns # Context and namespace management
kpods / ksvc / kdep # View resources
klogs / kexec / kdesc # Operations
kwatch / kevents # MonitoringConfiguring Secrets (1Password Integration)
Set up secure secrets management:
# 1. Install 1Password CLI (if not already installed)
brew install --cask 1password-cli
# 2. Sign in to 1Password
op signin
# 3. Create secrets in your vault
op item create --vault="Contracts" --title="my_api_token" --category="API Credential" credential="your-secret-here"
# 4. Configure in secrets.zsh
code ~/.config/zsh/secrets/secrets.zsh
# 5. Test the setup
~/.config/zsh/manage_secrets.zsh testSnake_case naming convention: All secrets should use snake_case names (e.g., my_api_token, github_access_token)
🔄 Management Commands
Update Configuration
~/.config/zsh/update.zshTest Configuration
~/.config/zsh/test_config.zshQuick Test
~/.config/zsh/quick_test.zshManage Secrets
# List all secrets
~/.config/zsh/manage_secrets.zsh list
# Test secrets loading
~/.config/zsh/manage_secrets.zsh test
# Add new secret
~/.config/zsh/manage_secrets.zsh add "secret_name" "secret_value"Uninstall
~/.config/zsh/uninstall.zsh🛠️ Prerequisites
The installer will automatically install these if missing:
- Homebrew - Package manager for macOS
- Oh My Zsh - ZSH framework
- Powerlevel10k - Modern theme
- ZSH plugins - autosuggestions, syntax highlighting, etc.
- mise - Version manager (replaces asdf)
- 1Password CLI - Secure secrets management
🐛 Troubleshooting
Shell doesn't load properly
# Test configuration
~/.config/zsh/test_config.zsh
# Check symlinks
ls -la ~/.zshrc ~/.zprofile ~/.p10k.zshmise not working
# Check mise installation
which mise
mise --version
# Reinstall if needed
brew uninstall mise
brew install mise
# Activate in current shell
eval "$(mise activate zsh)"Reset to defaults
# Uninstall and restore defaults
~/.config/zsh/uninstall.zsh🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Oh My Zsh - ZSH framework
- Powerlevel10k - Theme
- mise - Version manager
- 1Password CLI - Secrets management
🎉 Enjoy your supercharged terminal!
If you find this configuration helpful, please ⭐ star the repository!
