Skip to content

Tripleiks/ultimate-powershell-macos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Ultimate PowerShell Profile for macOS

Status: ๐ŸŸข Ready for Installation | Last Updated: December 2024 | Platform: macOS


๐Ÿ“‹ Project Overview

Property Value
Platform macOS (Intel & Apple Silicon)
Installation Time 30-60 minutes
Disk Space Required ~2GB
PowerShell Version 7.0+
Dependencies Homebrew, Internet Connection

๐ŸŽฏ What This Provides

  • โœ… Modern CLI tools integration (eza, bat, yazi, lazygit, etc.)
  • โœ… Enhanced PowerShell profile with syntax highlighting
  • โœ… Starship prompt with Git integration
  • โœ… M365 & Azure PowerShell modules
  • โœ… Nerd Fonts for proper icon display
  • โœ… Zoxide for smart directory jumping

๐Ÿ”ง Installation Checklist

โœ… Pre-Installation

  • macOS System Check

    • macOS 10.15+ (preferably 12.0+)
    • 5GB+ free disk space
    • Stable internet connection
    • Admin privileges (for Homebrew if needed)
  • Download Scripts

    • Download install-ultimate-powershell.sh
    • Download Test-UltimatePowerShellProfile.ps1 (optional test)
    • Save Ultimate PowerShell Profile code
    • Save custom starship.toml configuration

๐Ÿงช Optional Testing Phase

  • Run Test Script
    pwsh -NoProfile -Command "& './Test-UltimatePowerShellProfile.ps1'"
  • Verify Test Results
    • Platform detection successful
    • Existing tools identified
    • Module status checked
    • No error messages
  • Try Demo Commands
    • Test-FindFile "*.txt"
    • Test-GitStatus
    • Test-SystemInfo
    • Test-ZoxideIntegration

๐Ÿš€ Main Installation

  • Run Installer
    chmod +x install-ultimate-powershell.sh
    ./install-ultimate-powershell.sh
  • Monitor Installation Progress
    • Xcode Command Line Tools
    • Homebrew installation/update
    • PowerShell installation/update
    • Nerd Fonts installation
    • CLI tools installation
    • PowerShell modules installation
    • Configuration setup

โš™๏ธ Post-Installation Configuration

  • Install PowerShell Profile

    • Copy Ultimate PowerShell Profile code
    • Paste into profile file (path shown by installer)
    • Save and verify syntax
  • Configure Starship

    • Copy starship.toml to ~/.config/starship.toml
    • Verify configuration loads without errors
  • Set Terminal Font

    • Terminal.app: Preferences โ†’ Profiles โ†’ Font โ†’ Choose Nerd Font
    • iTerm2: Preferences โ†’ Profiles โ†’ Text โ†’ Font โ†’ Choose Nerd Font
    • VS Code: Settings โ†’ Terminal Font Family โ†’ Set Nerd Font
  • Restart Terminal

    • Close all terminal windows
    • Open new terminal
    • Run pwsh to start PowerShell

โœ… Verification & Testing

  • Profile Loads Successfully

    • No error messages on startup
    • Welcome message displays
    • Starship prompt appears
    • Icons display correctly
  • Test Core Features

    • Enhanced directory listing: ll
    • File search: ff "*.txt"
    • Git integration: gs
    • Directory jumping: z docs
    • System info: sysinfo

๐Ÿ“ฆ Installed Components

๐Ÿ› ๏ธ CLI Tools

Tool Purpose Command Example
starship Modern prompt Automatic
neofetch System info neofetch
eza Better ls ll, la, lt
bat Better cat cat file.txt
ripgrep Better grep grep "pattern"
fd Better find ff "filename"
yazi File manager y
lazygit Git UI lg
duf Better df df
gping Visual ping ping google.com
tealdeer Better tldr tldr command
git-delta Better git diff Automatic
age Modern encryption age-encrypt
zoxide Directory jumping z, zi

๐Ÿ“ฆ PowerShell Modules

Module Purpose Usage
Terminal-Icons File/folder icons Automatic
posh-git Git integration Automatic
PSReadLine Enhanced command line Automatic
Microsoft.Graph M365 Graph API Connect-MgGraph
Az.Accounts Azure authentication Connect-AzAccount
Az.Resources Azure resources Get-AzResource
Az.Storage Azure storage Get-AzStorageAccount
ExchangeOnlineManagement Exchange Online Connect-ExchangeOnline
MicrosoftTeams Teams management Connect-MicrosoftTeams

๐Ÿ”ค Nerd Fonts

Font Purpose Recommended For
FiraCode Nerd Font Coding with ligatures Development work
JetBrains Mono Nerd Font Modern, clean General terminal use
Hack Nerd Font Terminal optimized Terminal/SSH work
MesloLG Nerd Font Oh My Zsh compatible Multi-shell setups

๐ŸŽฎ Command Reference

๐Ÿ“ File & Directory Operations

# Enhanced listing
ll                    # Long format with icons and git status
la                    # All files with icons, sorted by type
lt                    # Tree view with icons
lsa                   # Sort by size
lst                   # Sort by time

# Smart search
ff "pattern"          # Find files by name
grep "text"           # Search text in files
find "name"           # Alias for ff

# File operations
touch file.txt        # Create new file
mkdir folder          # Create directory
mkcd folder           # Create and change to directory

๐Ÿ—‚๏ธ Navigation

# Smart directory jumping (zoxide)
z docs                # Jump to Documents
z proj                # Jump to Projects  
zi                    # Interactive picker

# Quick shortcuts
~                     # Home directory
docs                  # Documents
desktop               # Desktop
downloads             # Downloads
up                    # Parent directory
up2                   # Two levels up
up3                   # Three levels up

๐ŸŒฟ Git Integration

# Status and info
gs                    # Enhanced git status
gl                    # Git log with graph
gd                    # Git diff with delta
gds                   # Git diff staged

# Basic operations
ga                    # Git add all
gc "message"          # Git commit
gp                    # Git push
gpl                   # Git pull

# Advanced
gcom "message"        # Add all + commit
lazyg "message"       # Add all + commit + push
lg                    # Open lazygit UI

โ˜๏ธ Cloud Integration

# Microsoft 365
Connect-M365 -Graph -Exchange -Teams
Get-M365ServiceHealth

# Azure
Connect-AzureCloud
Get-AzureResourceUsage
Set-AzContext -Subscription "name"

๐Ÿ› ๏ธ Development & Utilities

# Development
dev                   # Start dev environment
mkproject App -Type node -Git -VSCode
edit                  # Open editor
reload                # Reload profile

# System info
sysinfo               # neofetch system info
weather               # Current weather
speedtest             # Network speed test
myip                  # Public IP address

# Package management
sysupdate             # Update all packages
binstall package      # Install with Homebrew

๐ŸŽจ Customization Guide

๐ŸŒˆ Color Schemes

The profile uses Dracula colors by default. To customize:

# In your profile, modify:
$PSReadLineOptions = @{
    Colors = @{
        Command            = "#50fa7b"  # Green
        Parameter          = "#ffb86c"  # Orange
        String             = "#f1fa8c"  # Yellow
        Variable           = "#ff79c6"  # Pink
        # Add your custom colors
    }
}

โญ Starship Prompt

Edit ~/.config/starship.toml:

# Custom prompt symbols
[character]
success_symbol = "[โฏ](bold green)"
error_symbol = "[โฏ](bold red)"

# Directory display
[directory]
truncation_length = 3
truncate_to_repo = true

# Git branch styling
[git_branch]
symbol = " "
format = "[$symbol$branch]($style) "

๐Ÿ”ง Adding Custom Functions

# Add to your profile
function MyFunction {
    param([string]$Parameter)
    Write-Host "Custom function: $Parameter" -ForegroundColor Green
}
Set-Alias -Name mf -Value MyFunction

๐Ÿ” Troubleshooting

Common Issues & Solutions

Issue Symptom Solution
Profile won't load Error on startup Check execution policy: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Icons don't show Squares/missing symbols Set terminal font to a Nerd Font
Commands not found "Command not found" errors Add Homebrew to PATH: eval "$(/opt/homebrew/bin/brew shellenv)"
Slow loading Long startup time Check internet connection, disable heavy modules temporarily
Git integration broken No git status in prompt Verify posh-git module: Import-Module posh-git
Azure/M365 modules fail Connection errors Update modules: Update-Module Az, Microsoft.Graph -Force

๐Ÿ› ๏ธ Diagnostic Commands

# Check profile load time
Measure-Command { . $PROFILE }

# Verify module installation
Get-Module -ListAvailable | Where-Object Name -like "*Graph*"

# Check command availability
Get-Command starship, eza, bat -ErrorAction SilentlyContinue

# Test network connectivity
Test-Connection github.com -Count 1

๐Ÿ”„ Reset & Reinstall

# Backup current configuration
cp ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ~/profile-backup.ps1

# Clean reinstall
rm -rf ~/.config/powershell/
./install-ultimate-powershell.sh

๐Ÿ“Š Performance Metrics

๐Ÿ“ˆ Load Time Benchmarks

Component Expected Load Time
Base Profile < 500ms
With All Modules < 2000ms
First Run < 5000ms

๐Ÿ’พ Resource Usage

Resource Usage
Disk Space ~2GB total
RAM +50MB when active
Startup Impact +1-2 seconds first run

๐Ÿ”„ Maintenance Schedule

๐Ÿ“… Regular Updates

  • Weekly: sysupdate - Update all packages
  • Monthly: Check for PowerShell updates
  • Quarterly: Review and clean up modules
  • As Needed: Update Starship configuration

๐Ÿ—‚๏ธ Backup Strategy

  • Profile Backup: Copy to cloud storage monthly
  • Starship Config: Version control recommended
  • Custom Functions: Document and backup

๐ŸŽฏ Next Steps & Advanced Usage

๐Ÿš€ Power User Features

  • Custom Key Bindings: Set up PSReadLine shortcuts
  • Module Auto-loading: Configure on-demand loading
  • Profile Variants: Create environment-specific profiles
  • CI/CD Integration: Use in automated workflows

๐Ÿ“š Learning Resources


๐Ÿ“ Notes & Observations

โœ… What Works Well

  • Syntax highlighting dramatically improves readability
  • Directory jumping with zoxide saves significant time
  • Git integration provides excellent workflow visibility
  • Modern CLI tools are faster and more user-friendly

โš ๏ธ Considerations

  • Initial setup time is significant but one-time
  • Some tools require learning new commands
  • Font setup is crucial for proper display
  • Internet dependency for some features

๐Ÿ”ฎ Future Improvements

  • Add more cloud provider integrations
  • Implement profile performance monitoring
  • Create automated update mechanisms
  • Add more development environment templates

๐ŸŽ‰ Installation completed successfully!

Enjoy your enhanced PowerShell experience with modern CLI tools, beautiful prompts, and powerful integrations.

About

This is the repo for my ultimate Powwershell Profile for Mac OS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published