A clean PowerShell 7 profile for Windows Terminal with better colors, keybinds, Git shortcuts, file helpers, Terminal-Icons, oh-my-posh, and zoxide.
Run PowerShell as Administrator inside Windows Terminal:
irm "https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1" | iexThe installer:
- Backs up an existing profile with a timestamped
oldprofile-*.ps1file. - Installs this repository's
Microsoft.PowerShell_profile.ps1. - Installs Oh My Posh, zoxide, Terminal-Icons, and the CaskaydiaCove Nerd Font.
- Downloads the
cobalt2.omp.jsontheme into your PowerShell profile directory.
The profile itself does not install packages, download themes, or upgrade PowerShell during shell startup. Missing optional tools are skipped with a warning.
After installing, restart Windows Terminal and set your PowerShell font to CaskaydiaCove NF.
- PSReadLine colors, list-view suggestions, and shell-friendly keybinds.
- Optional
Terminal-Icons,oh-my-posh, andzoxidestartup. - Git shortcuts:
gs,ga,gcom,gp,gpull,gcl,lazyg. - File helpers:
touch,mkcd,trash,ff,head,sed,which. - Process/system helpers:
pgrep,pkill,k9,uptime,winutil,winutildev. - Navigation/listing helpers:
g,docs,la,ll.
Run Show-Help in PowerShell to see the full command list.
By default, the profile uses:
$Home\cobalt2.omp.jsonSet POSH_THEME to use a different oh-my-posh theme path.
Do not edit Microsoft.PowerShell_profile.ps1 directly; it is updated from this repository.
Put personal customizations in your all-hosts profile:
Edit-ProfileYou can also place CTTcustom.ps1 beside Microsoft.PowerShell_profile.ps1. It is loaded before this profile reads override variables and functions.
Variables:
$EDITOR_Override
$debug_Override
$repo_root_Override
$show_help_Override
$timeFilePath_Override
$updateInterval_OverrideFunctions:
Debug-Message_Override
Update-Profile_Override
Update-PowerShell_Override
Clear-Cache_Override
Get-Theme_Override
WinUtilDev_Override
Set-PredictionSource_OverrideAvoid calling the original function from its override, otherwise the override will recurse.
If this profile helps you, star the repo, share it, or sponsor development: https://github.com/sponsors/ChrisTitusTech