Multi-ZSH is a powerful, lightweight, and flexible framework that enables you to maintain a single, unified ZSH configuration across Linux, macOS, and Windows. Designed for developers, system administrators, and power users, Multi-ZSH ensures a consistent shell experience across all operating systems.
- β Seamless Cross-Platform Support: Works flawlessly on Linux, macOS, and Windows.
- β Portable & Unified ZSH Configuration: Manage all your shell settings from one place.
- β Customizable & Modular: Use preloaded configurations and extend functionality with custom modules.
- β Compatible with All ZSH Frameworks: Supports Oh-My-Zsh, Prezto, Antigen, and Zim.
- β Lightweight & Fast: Minimal dependencies, designed for performance.
- β Effortless Synchronization: Easily sync your settings via Git, Dropbox, or cloud services.
- β Automated Setup: Quickly set up using the provided symlink script.
multi-zsh/
βββ README.md # Documentation
βββ run-to-symlink.sh # Setup script to symlink .zshrc
βββ .zshrc # Main ZSH configuration file
βββ preload_configs/ # OS-specific preloaded configurations
β βββ common/ # Shared configurations
β βββ linux/ # Linux-specific configs
β β βββ path.sh # Linux-specific path configurations
β βββ macos/ # macOS-specific modules
β β βββ path.sh # macOS-specific path configurations
β βββ windows/ # Windows-specific configs
β β βββ path.sh # Windows-specific path configurations
βββ modules/ # Custom modules (aliases, functions, etc.)
β βββ common/ # Cross-platform modules
β βββ linux/ # Linux-specific modules
β βββ macos/ # macOS-specific modules
β βββ windows/ # Windows-specific modules
git clone https://github.com/yourusername/mrz07-multi-zsh.git
Move your existing .zshrc
file to the frameworkβs root folder
./run-to-symlink.sh
This script will create a symlink to the recently moved configuration in the frameworkβs root folder.
- Add OS-specific preloaded configs in
preload_configs/
- Add OS-specific Environment/Path configs in
preload_configs/*os*/path.sh"
- Extend functionality with custom modules in
modules/
Multi-ZSH automatically detects your operating system and loads the appropriate configurations.
- Common settings (
preload_configs/common/
) are loaded first. - OS-specific settings (
preload_configs/linux/
,macos/
,windows/
) are applied afterward.
- Store custom functions, aliases, and scripts in
modules/
. - Modules are categorized into common and OS-specific folders.
- Ignore specific modules or configurations by prefixing folder names with
#
(e.g.,#ignored_module/
).
- The setup script (
run-to-symlink.sh
) automatically links.zshrc
to the framework. - This allows easy switching between configurations without modifying system files.
- Works seamlessly on Linux, macOS, and Windows (WSL, Git Bash, Cygwin, MSYS2).
- Automatically loads common and OS-specific aliases, functions, and environment variables.
- Organize your scripts with a modular structure.
- Supports any additional ZSH plugins or external tools.
- Lightweight with minimal overhead.
- Fast execution with optimized loading logic.
- Easily sync configurations across devices using Git, Dropbox, or cloud services.
- Compatible with Oh-My-Zsh, Prezto, Antigen, Zim, and more.
- Add, remove, or modify configurations as needed.
- Ignore specific scripts or modules by naming them with
#
.
Place your custom ZSH scripts inside the corresponding modules/ folder:
modules/
βββ common/
β βββ aliases.sh # Shared aliases
β βββ functions.sh # Shared functions
β βββ style/
β β βββ starship.toml # Custom Starship prompt config
βββ linux/
β βββ linux_aliases.sh # Linux-specific aliases
βββ macos/
β βββ macos_shortcuts.sh # macOS-specific functions
βββ windows/
β βββ win_helpers.sh # Windows-specific helpers
To prevent specific scripts from being loaded, prefix the filename or folder with #
:
modules/
βββ common/
β βββ aliases.sh
β βββ #deprecated_aliases.sh # This file will be ignored
β βββ #old_scripts/ # This folder will be ignored
We welcome contributions! Feel free to submit issues, feature requests, or pull requests.
Multi-ZSH is open-source and available under the MIT License.
π₯ Start using Multi-ZSH today and streamline your ZSH configuration across all platforms! π