Painless migration from Linux (bash/zsh) to Windows PowerShell. Keep your CLI habits, learn PowerShell gradually, discover modern toolsβall with a beautiful terminal that works out of the box.
Key features: Linux-style aliases β’ Advanced shell history β’ Teacher mode β’ Custom help system β’ Beautiful stats (MOTD) β’ Smart tool suggestions β’ Icons & colors
β οΈ Alpha Status: This project works for the maintainer (PowerShell 7.5.x, Windows 11) but is not guaranteed to work perfectly on other system configurations. Built on multiple external dependencies whose interfaces may change over time. Not actively maintainedβmay cause failures. Use in production at your own risk.
π Join Development: Like the idea? With tests and Claude Code context, it's ready for collaboration and community input. Test, improve & extend oh-my-pwsh with me!
Missing your beloved bash/zsh workflow? You're not alone.
oh-my-pwsh helps you painlessly migrate from Linux to Windows while:
- β
Preserving your CLI habits - Keep using
ls -la,grep,cat,touch, and other familiar commands - π Learning PowerShell on the way - Optional learning mode shows PowerShell equivalents for every command
- π Discovering awesome PowerShell apps - Modern tools like
bat,eza,ripgrep,fzf, andzoxide - π Appreciating beauty - Stunning prompt with Oh My Posh (PowerShell's answer to oh-my-zsh)
For power users - Every feature is optional, every tool has fallbacks, and you control your environment.
- Oh My Posh - Stunning prompt with git status, execution time, and more
- posh-git - Git branch/status integration in prompt
- Terminal Icons - Colorful file/folder icons
- Oh My Stats - System stats (CPU, RAM, disk) on startup
- PSReadLine - Fish/Zsh-like autocompletion with history
- PSFzf - Fuzzy search for files, history, git (
Ctrl+R,Ctrl+T) - zoxide - Smart directory jumping -
zremembers your most used folders - gsudo - Linux-style
sudofor Windows
- Aliases -
ls -la,grep,cat,touch,mkdir -p,which,curl,wget, and more (docs) - Git shortcuts -
gs(status),ga(add),gc "msg"(commit),gp(push),gl(log) - Quick navigation -
..,...,....,~,mkcd newdir,z folder - Helper functions -
touch,mkcd,sudo, and more - Teacher mode - Optional PowerShell learning assistant (see config.example.ps1)
- Shows PowerShell equivalents:
mkdir β New-Item -ItemType Directory - Enabled by default to help you learn while working
- Fully customizable verbosity levels (Enhancement planned - task 011)
- Shows PowerShell equivalents:
- Smart suggestions (Planned) - Missing command hints (task 007)
Modern alternatives to classic Unix tools:
- bat β Better
catwith syntax highlighting - eza β Modern
lswith icons and colors - ripgrep β Faster
grepfor searching - fd β Faster
findfor locating files - delta β Beautiful
git diffviewer
oh-my-pwsh/
βββ profile.ps1 # Main entry point
βββ config.ps1 # Your config (gitignored)
βββ config.example.ps1 # Config template
βββ modules/
β βββ linux-compat.ps1 # Linux-style aliases (optional)
β βββ enhanced-tools.ps1 # Modern tool integrations (optional)
β βββ help-system.ps1 # Custom help command
β βββ functions.ps1 # Helper functions (touch, mkcd, .., ...)
β βββ git-helpers.ps1 # Git shortcuts (gs, ga, gc, gp, ...)
β βββ psreadline.ps1 # PSReadLine configuration
β βββ environment.ps1 # PATH & environment variables
β βββ cc/ # Claude Code CLI (cc plan)
β β βββ main.ps1 # Entry point, shared helpers
β β βββ plan.ps1 # Scheduled task subcommands
β βββ ssh-sleep-blocker/ # Keep Windows awake during SSH sessions
β βββ main.ps1 # CLI (setup/status/logs/...)
βββ scripts/
β βββ install-dependencies.ps1 # Automatic dependency installer
β βββ cc/ # cc daemon scripts (Task Scheduler)
β β βββ plan-daemon.ps1 # Plan executor daemon
β βββ ssh-sleep-blocker/ # SSH sleep blocker daemon
β βββ daemon.ps1 # Polls port 22, toggles SetThreadExecutionState
β βββ daemon.cmd # Task Scheduler wrapper
βββ themes/ # Oh My Posh themes (optional)
Complete automated setup - installs everything you need:
# 1. Clone the repo (anywhere you want - not just C:\code!)
cd C:\code # or any directory you prefer
git clone git@github.com:zentala/pwsh-profile.git
cd pwsh-profile
# 2. Run one-click installer
pwsh -ExecutionPolicy Bypass -File scripts\Install-OhMyPwsh.ps1
# 3. Restart your terminal (required!)What it does:
- β Clones oh-my-stats next to oh-my-pwsh
- β Installs all dependencies (Oh My Posh, fzf, zoxide, gsudo, PowerShell modules)
- β Configures your PowerShell profile (backs up existing one)
- β Creates config.ps1 from template
β οΈ May prompt for UAC (administrator elevation) for winget installs
Optional parameters:
# Install everything (dependencies + enhanced tools + nerd fonts)
pwsh -File scripts\Install-OhMyPwsh.ps1 -InstallEnhancedTools -InstallNerdFonts
# Install enhanced tools only
pwsh -File scripts\Install-OhMyPwsh.ps1 -InstallEnhancedTools
# Install Nerd Fonts only
pwsh -File scripts\Install-OhMyPwsh.ps1 -InstallNerdFonts
# Skip certain steps
pwsh -File scripts\Install-OhMyPwsh.ps1 -SkipDependencies # Skip dependency install
pwsh -File scripts\Install-OhMyPwsh.ps1 -SkipProfile # Skip profile configurationAbout Nerd Fonts: Nerd Fonts provide beautiful icons and glyphs for your terminal. Recommended fonts:
- CaskaydiaCove Nerd Font (recommended) - Microsoft's Cascadia Code with icons
- FiraCode Nerd Font - Popular with excellent ligatures
- JetBrainsMono Nerd Font - Optimized for IDEs
- Meslo Nerd Font - Safe choice, very readable
After installing, configure your terminal to use the Nerd Font, then enable in config.ps1:
$global:OhMyPwsh_UseNerdFonts = $trueAfter restart, enhanced tools (if not installed above):
# Option 1: Re-run installer with parameter
pwsh -File scripts\Install-OhMyPwsh.ps1 -InstallEnhancedTools
# Option 2: Use built-in function
Install-EnhancedToolsIf you prefer step-by-step control:
-
Clone the repo:
cd C:\code git clone git@github.com:zentala/pwsh-profile.git cd pwsh-profile
-
Run installation script:
pwsh -ExecutionPolicy Bypass -File scripts\install-dependencies.ps1
This will automatically check and install all dependencies!
-
Configure PowerShell profile manually:
# See Manual Install section below for profile configuration -
Install enhanced tools (optional but recommended):
# After restarting PowerShell, run: Install-EnhancedTools
-
Restart PowerShell and type
helpto see what's available!
cd C:\code
git clone git@github.com:zentala/pwsh-profile.gitwinget install Microsoft.PowerShell# Oh My Posh - Beautiful prompt
winget install JanDeDobbeleer.OhMyPosh
# fzf - Fuzzy finder binary (required for PSFzf)
winget install fzf
# zoxide - Smart directory jumping (Rust-based, super fast)
winget install ajeetdsouza.zoxide
# gsudo - Linux-style sudo for Windows
winget install gerardog.gsudo# PSReadLine - Advanced command line editing
Install-Module -Name PSReadLine -Force
# posh-git - Git integration
Install-Module -Name posh-git -Scope CurrentUser
# Terminal-Icons - File icons
Install-Module -Name Terminal-Icons -Scope CurrentUser
# PSFzf - Fuzzy finder for PowerShell
Install-Module -Name PSFzf -Scope CurrentUser
# Oh My Stats - System stats (optional but recommended)
# See: https://github.com/zentala/oh-my-statsReplace your main PowerShell profile:
# Backup old profile
Copy-Item $PROFILE "$PROFILE.backup-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
# Create new profile that loads from repo
@"
# Load profile from repo
`$ProfileRepo = "C:\code\pwsh-profile\profile.ps1"
if (Test-Path `$ProfileRepo) {
. `$ProfileRepo
}
"@ | Out-File $PROFILE -Encoding UTF8Open a new PowerShell window and enjoy your modern terminal!
After installation, type:
help # Show all available commands
help quick # Quick reference
help tools # Check which tools are installed
help learn # See PowerShell equivalents (learning mode)
help config # View configurationPSFzf - Fuzzy finder:
Ctrl+R- Search command history with fuzzy matchingCtrl+T- Search files in current directorygst- Fuzzy git status selector
zoxide - Smart directory jumping:
z folder- Jump to frequently used folder (e.g.,z code)z -- Go back to previous directoryzi- Interactive folder selection with fzf
gs # git status
ga # git add .
gc "msg" # git commit -m "msg"
gp # git push
gl # git log --oneline --graph (last 10)
gco branch # git checkout branch# File operations
ls, ll, la # List files (enhanced with eza if installed)
cat file.txt # View file (enhanced with bat if installed)
touch file # Create file or update timestamp
mkdir -p a/b/c # Create nested directories
# Search
grep pattern # Search in files (enhanced with ripgrep if installed)
find pattern # Find files (enhanced with fd if installed)
which cmd # Find command location
# Navigation
.. # cd ..
... # cd ../..
.... # cd ../../..
~ # cd $HOME
mkcd dir # Create directory and cd into it
z folder # Smart jump to frequently used foldersWhen installed, these tools automatically replace their classic counterparts:
cat file.txt # Uses bat (with syntax highlighting)
ls # Uses eza (with icons and colors)
grep pattern # Uses ripgrep (faster search)
find pattern # Uses fd (faster file finding)
git diff # Uses delta (beautiful diffs)Use power to schedule sleep, hibernate, shutdown, and restart actions, or
temporarily prevent automatic system sleep without changing the active Windows
power plan:
awake # Toggle keep-awake mode
awake status # Show the current state
awake off # Restore normal sleep behavior
power awake on # Block automatic system sleep
power # Interactive menuThe keep-awake request applies to the current PowerShell session and is cleared when the session exits. It does not prevent manually choosing Sleep/Hibernate, turn off the display, or change the Windows power-plan settings.
One namespace: cc plan (schedule overnight Claude tasks).
Schedule overnight Claude tasks β wake the PC, run Claude with a prompt in a specific directory:
cc plan "refactor auth module" --at 1:00 # Read-only analysis
cc plan "fix TODOs" --at 3:00 --auto-edit # Allow file changes
cc plan "continue the work" --resume <session> --at 2:00 # Resume session
cc plan list # View all plansSee CC.md for full documentation.
sudo command # Run command with admin privilegesEdit config.ps1 to customize your experience:
# Linux Compatibility - Enable Linux-style aliases
$global:OhMyPwsh_EnableLinuxCompat = $true
# Enhanced Tools - Use bat, eza, ripgrep, fd, delta
$global:OhMyPwsh_UseEnhancedTools = $true
# Custom Help System
$global:OhMyPwsh_EnableCustomHelp = $true
# Learning Mode - Show PowerShell equivalents
$global:OhMyPwsh_ShowAliasTargets = $true
# Feedback Messages - Get visual confirmation
$global:OhMyPwsh_ShowFeedback = $true
# Welcome Message - Show help tip on startup
$global:OhMyPwsh_ShowWelcome = $true
# Startup Integrations
$global:OhMyPwsh_EnableStats = $true
$global:OhMyPwsh_EnableTerminalIcons = $true
$global:OhMyPwsh_EnablePrompt = $true
$global:OhMyPwsh_EnableZoxide = $true
$global:OhMyPwsh_EnableFnmAutoInit = $trueIf you run PowerShell inside Codex, Claude Code, CI, or another constrained host, some startup integrations may be too noisy or try to write cache files in locked locations. These toggles keep startup deterministic:
$global:OhMyPwsh_DisablePromptInAgentSessions = $true
$global:OhMyPwsh_DisableFnmInAgentSessions = $true
$global:OhMyPwsh_SilentStartupInAgentSessions = $trueRecommended automation profile:
$global:OhMyPwsh_EnableStats = $false
$global:OhMyPwsh_EnableTerminalIcons = $false
$global:OhMyPwsh_EnablePrompt = $true
$global:OhMyPwsh_EnableZoxide = $false
$global:OhMyPwsh_EnableFnmAutoInit = $false
$global:OhMyPwsh_DisablePromptInAgentSessions = $true
$global:OhMyPwsh_DisableFnmInAgentSessions = $true
$global:OhMyPwsh_SilentStartupInAgentSessions = $trueEdit profile.ps1 line ~79:
$omp_config = "$env:POSH_THEMES_PATH\your-theme.omp.json"Browse themes: https://ohmyposh.dev/docs/themes
Place your scripts in scripts/ folder and source them in profile.ps1.
With learning mode enabled ($OhMyPwsh_ShowAliasTargets = $true), you'll see PowerShell equivalents:
PS> mkdir test
β Created directory: test
β New-Item -ItemType Directory -ForceType help learn to see a full mapping of Linux commands to PowerShell cmdlets.
Profile loads in ~1-2 seconds with all features enabled. Timer is included - check $global:PSProfileLoadStart to measure.
# Reload profile
. $PROFILE# Check what's missing
help tools
# Install all at once
Install-EnhancedToolsSet-ExecutionPolicy RemoteSigned -Scope CurrentUserRun:
profile-doctorIt checks:
- whether the session looks like an agent/automation host
- whether WMI is available for
Show-SystemStats - whether
fnm,oh-my-posh, andzoxideare present - whether
Terminal-Iconsandposh-gitare installed - whether key cache directories are writable
This project has comprehensive test coverage with automated CI/CD.
Run Tests:
# Run all tests
./scripts/Invoke-Tests.ps1
# Run with coverage
./scripts/Invoke-Tests.ps1 -Coverage
# Watch mode (auto-rerun on changes)
./scripts/Invoke-Tests.ps1 -Watch
# Install git hooks (optional)
./scripts/Install-GitHooks.ps1Status:
- β 176 passing tests
- β 100% coverage on critical modules
- β CI/CD on GitHub Actions (Windows + Ubuntu)
- β Pre-commit hooks available (optional)
Documentation:
- Testing Strategy - Complete testing approach
- STATUS.md - Project status & quick start
- DECISIONS.md - Key decisions & context
For Users:
- STATUS.md - Project snapshot, what works, known issues
- ARCHITECTURE.md - Module structure
- CC.md - Claude Code block scheduler & planned tasks
- TESTING-STRATEGY.md - How to test
For Developers:
- DECISIONS.md - Why we made certain choices
- ADRs - Architecture Decision Records
- Runbook - Implementation session log
- .future.md - Future enhancement ideas
Quick Links:
- Task 005 - Testing infrastructure plan
- Git Hooks Guide - Optional pre-commit setup
MIT - PaweΕ Ε»entaΕa Β© 2025
Made with β€οΈ for modern Windows terminal experience
Project Status: β Stable & Tested (see STATUS.md for current state)
