This guide will help you set up PowerShell DevKit on your MacBook, bringing the same powerful PowerShell development experience you have on Windows.
- macOS 10.15 (Catalina) or later
- PowerShell 7.0+ - Install from Homebrew
- Internet connection - For downloading packages
If you don't have PowerShell 7 installed yet:
# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install PowerShell 7
brew install --cask powershell
# Launch PowerShell
pwshOnce PowerShell 7 is installed:
# 1. Clone the repository
git clone https://github.com/Tsabo/PowerShell-DevKit.git
cd PowerShell-DevKit
# 2. Run macOS setup
./Scripts/Setup-macOS.ps1
# 3. Validate installation
./Scripts/Test-macOS.ps1
# 4. Keep everything updated
./Scripts/Update-macOS.ps1- Homebrew - The missing package manager for macOS (auto-installed if needed)
All installed via Homebrew:
- oh-my-posh - Beautiful, informative prompt themes
- CaskaydiaCove Nerd Font - Font with icon support
- fzf - Fuzzy finder for files and command history
- zoxide - Smart directory navigation
- Microsoft Edit - Modern text editor from Microsoft
- glow - Markdown renderer for terminal
- yazi - Terminal file manager with git integration
Installed from PowerShell Gallery:
- PSFzf - PowerShell integration for fzf
- Terminal-Icons - File and folder icons in terminal
- F7History - Enhanced command history
- posh-git - Git integration for PowerShell
- PowerColorLS (optional) - Colorful directory listings
Automatically installed for enhanced functionality:
- ffmpeg - Video thumbnails
- 7zip - Archive previews
- jq - JSON processing
- poppler - PDF support
- fd - Fast file search
- ripgrep - Text search
- imagemagick - Image processing
After installation, configure your terminal to use the CaskaydiaCove Nerd Font:
- Open Preferences (⌘,)
- Go to Profiles → Text
- Change Font to: CaskaydiaCove Nerd Font Mono
- Set size to 12-14pt
- Open Preferences (⌘,)
- Select your profile
- Click Font → Change
- Select CaskaydiaCove Nerd Font Mono
- Set size to 12-14pt
Add to your settings.json:
{
"terminal.integrated.fontFamily": "CaskaydiaCove Nerd Font Mono",
"terminal.integrated.fontSize": 13
}The setup automatically deploys your PowerShell profile to:
~/.config/powershell/Microsoft.PowerShell_profile.ps1
Or on some systems:
~/Documents/PowerShell/Microsoft.PowerShell_profile.ps1
You can check your profile location with:
$PROFILECustom themes are deployed to:
~/.config/powershell/Posh/
To change your theme, edit your profile and modify the oh-my-posh initialization line.
Yazi configuration is cloned to:
~/.config/yazi/
This includes custom themes, plugins, and keybindings.
✅ PowerShell profile and scripts ✅ All PowerShell modules (PSFzf, Terminal-Icons, posh-git, etc.) ✅ oh-my-posh themes and configuration ✅ Yazi file manager with plugins ✅ Command-line tools (fzf, zoxide, glow) ✅ Git integration
- Package Manager: Uses Homebrew instead of winget
- Terminal: Uses iTerm2/Terminal.app instead of Windows Terminal
- Font Installation: Via Homebrew cask instead of oh-my-posh font installer
- Config Paths:
- Windows:
$env:APPDATAand$env:LOCALAPPDATA - macOS:
~/.configand~/Library
- Windows:
❌ Windows Terminal - Use iTerm2 or Terminal.app instead
❌ gsudo - Native sudo works on macOS
❌ Scoop package manager - Not needed on macOS
./Scripts/Update-macOS.ps1# Only Homebrew packages
./Scripts/Update-macOS.ps1 -BrewOnly
# Only PowerShell modules
./Scripts/Update-macOS.ps1 -ModulesOnly
# Only Yazi components
./Scripts/Update-macOS.ps1 -YaziOnly./Scripts/Test-macOS.ps1Since most of the PowerShell configuration is cross-platform, you can:
- Keep scripts in sync via the git repository
- Share PowerShell modules - they work on both platforms
- Sync oh-my-posh themes - compatible across platforms
- Share Yazi configurations - works on both
The profile deployment automatically detects OneDrive on Windows. For macOS with iCloud:
# Link your profile location to iCloud Drive
ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/PowerShell ~/.config/powershellThis keeps your custom profile in sync across devices.
If Homebrew installation fails:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"After installation, add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"If module installation fails:
# Update PowerShellGet
Install-Module PowerShellGet -Force -AllowClobber -Scope CurrentUser
# Check PowerShell Gallery connectivity
Test-NetConnection powershellgallery.com -Port 443After installing the font:
- Restart your terminal application completely
- Verify font installation: Check
~/Library/Fontsfor CaskaydiaCove files - Select the font manually in terminal preferences
# Verify oh-my-posh is in PATH
which oh-my-posh
# If not found, restart PowerShell or add Homebrew to PATH:
eval "$(/opt/homebrew/bin/brew shellenv)"
# Check version
oh-my-posh version# Check if configuration exists
Test-Path ~/.config/yazi
# Re-clone if needed
rm -rf ~/.config/yazi
git clone https://github.com/Tsabo/yazi_config.git ~/.config/yazi
# Update plugins
ya pkg update- View setup failures:
./Scripts/Setup-macOS.ps1 -ShowDetails - Clear failure logs:
./Scripts/Setup-macOS.ps1 -ClearLogs - Validate environment:
./Scripts/Test-macOS.ps1
iTerm2 is a powerful terminal replacement for macOS:
brew install --cask iterm2Why iTerm2?
- Better font rendering
- Split panes and tabs
- Hotkey window (like Quake console)
- Extensive customization
- Better color support
macOS uses different modifier keys:
- ⌘ (Command) instead of Ctrl for most shortcuts
- ⌥ (Option) for Alt-based shortcuts
- ⌃ (Control) for terminal control sequences
- Exclude terminal from Spotlight: System Preferences → Spotlight → Privacy
- Disable PowerShell telemetry:
$env:POWERSHELL_TELEMETRY_OPTOUT = 1
- Use native commands when available: macOS has native
ls,grep, etc.
Once your environment is set up:
- Customize your profile: Edit
CustomProfile.ps1 - Add custom modules: Place them in
CustomModules/ - Create custom scripts: Place them in
CustomScripts/ - Choose an oh-my-posh theme: Browse themes at ohmyposh.dev
- Learn Yazi: Try
yaziin any directory to start the file manager
Now that you have PowerShell DevKit on both Windows and macOS:
- Write scripts that work on both platforms using
$IsWindows,$IsMacOS,$IsLinux - Test your scripts on both platforms
- Share your configuration via git
- Use platform-specific logic when needed:
if ($IsMacOS) {
# macOS-specific code
open $filePath
}
elseif ($IsWindows) {
# Windows-specific code
Start-Process $filePath
}Happy cross-platform PowerShell development! 🎉