This repository contains a comprehensive, modular ZSH configuration designed for a powerful and efficient development workflow. It originated from Sebastian Tramp's ZSH configuration and has been heavily customized by Hemant Verma.
The setup is highly automated, using a Makefile for installation, system configuration, and management of application settings.
- Modular Design: Configuration is split into logical files (
aliases.zsh,functions.zsh,git.zsh, etc.) for easy management. - Powerful Scripting System: A collection of custom Ruby and Bash scripts, accessible via ZSH functions or
maketargets, to automate common tasks. - Automated Setup: A
Makefileprovides a simple interface for initial installation, setup for macOS and Linux, and ongoing maintenance. - AI-Powered Workflow: Seamless integration for AI tools like Claude and Gemini, with helper functions and automated setup.
- Platform-Aware: Automatically detects and loads specific configurations for macOS (
darwin.zsh) and Linux (linux.zsh). - Extensive Git Integration: Includes a rich set of aliases (
lg,cp,ri, etc.), push behavior defaults, and editor configurations. - Syntax Highlighting: Integrates
zsh-syntax-highlightingas a Git submodule for real-time command feedback. - Application Settings Management: Backup and restore configurations for tools like VS Code, Xcode, iTerm2, and more.
- Rich Terminal Experience: Enhanced with emojis and a consistent color scheme for better readability, all managed by a centralized logging system.
git: To clone the repository.zsh: As the target shell.make: To run the automated setup commands.- macOS:
Xcode Command Line Toolsare required. The setup will attempt to install them.
Clone this repository to your home directory, preferably to ~/zshrc.
git clone https://github.com/your-username/your-repo-name.git ~/zshrc
cd ~/zshrcThe Makefile handles the entire setup process.
This command creates the necessary symlinks for ZSH and Bash, installs external dependencies (submodules), and sets up required directories.
make installFor macOS users, the make mac target provides a comprehensive setup that includes:
- Installing Homebrew and essential packages.
- Installing development tools and language runtimes (Python, Ruby).
- Configuring macOS system settings for development.
- Restoring application settings from the
Settings/directory.
make macAfter installation, restart your terminal to load the new configuration.
The configuration is loaded in a specific order to ensure dependencies are met and settings can be overridden correctly.
logging.zsh: Centralized logging functions (loaded first for universal access).environment.zsh: Environment variables and PATH management.options.zsh: ZSH shell options and settings.prompt.zsh: Command prompt configuration.functions.zsh: Custom shell functions and key bindings.aliases.zsh: Command aliases and suffix handlers.- Platform-specific files:
darwin.zsh(macOS) orlinux.zsh. - Application-specific files:
git.zsh,rails.zsh,claude.zsh, etc. completion.zsh: Tab completion setup.private.zsh: For user-specific private configurations (this file is not tracked by Git).
A key feature of this repository is its powerful three-tier scripting system, primarily built with Ruby.
- To see all available scripts and their descriptions, run
make list-scripts.
-
ZSH Utility Functions: Interactive scripts for daily use, available directly in the shell.
calibre-update: Updates the Calibre e-book manager.stack-monitors: Configures a stacked external monitor setup on macOS.merge-pdf: Merges multiple PDF files into a single document.uninstall-app: A comprehensive application uninstaller for macOS.
-
Setup/Backup Scripts (Makefile Only): Scripts for system configuration, backups, and one-time setup tasks. These are only accessible via
maketargets to prevent accidental execution.make macos-optimize: Optimizes macOS system settings for developers.make xcode-backup: Backs up Xcode themes, key bindings, and settings.make vscode-backup: Backs up VS Code settings and extensions list.make iterm-setup: Restores iTerm2 settings from the repository.
-
Repository Maintenance Scripts (Makefile Only): Internal scripts for maintaining the repository itself.
make find-orphans: Finds and reports Makefile targets that don't correspond to a script.
This setup includes first-class support for AI command-line tools.
API keys are optional but required for full functionality. They can be stored in a private.env file in the repository root. Helper functions are provided to manage them:
# For Claude
setup-claude-key "sk-ant-api03-your-key-here"
# For Gemini
setup-gemini-key "AIzaSyYour-gemini-key-here"claude/cc: Wrapper for the Claude Code CLI.gemini-cli/gg: Wrapper for the Gemini CLI.
The Makefile is the central hub for managing this configuration.
make help: Displays a list of all available targets and their descriptions.make install: Installs the shell configuration.make mac: Runs the full macOS setup.make update: Pulls the latest changes from the repository and updates submodules.make app-settings: Restores settings for all supported applications (iTerm, VS Code, etc.).make list-scripts: Shows all custom scripts available.
- Originally based on the ZSH configuration of Sebastian Tramp.
- Customized and extended by Hemant Verma ([email protected]).