When using Git Bash, MINGW64, or other bash terminals, you get:
$ phat
bash: phat: command not foundPhat uses .bat (batch) files which only work in Windows Command Prompt and PowerShell. Bash terminals on Windows don't recognize .bat files as executable commands.
Simply switch to PowerShell or Command Prompt to run Phat:
- PowerShell: Press
Win + Xand select "Windows PowerShell" or "Terminal" - CMD: Press
Win + R, typecmd, and press Enter
Then run your phat commands normally.
Add this to your ~/.bashrc or ~/.bash_profile:
# Phat alias for Git Bash
phat() {
powershell.exe -ExecutionPolicy Bypass -File "C:/Program Files (x86)/Phat/phat.ps1" "$@"
}Note: Adjust the path if Phat is installed elsewhere. Use forward slashes (/) instead of backslashes.
After adding the alias:
- Restart your bash terminal, or
- Run:
source ~/.bashrc
Now you can use phat commands in Git Bash.
You can run Phat directly from bash using PowerShell:
powershell.exe -ExecutionPolicy Bypass -File "C:/Program Files (x86)/Phat/phat.ps1" listCreate a bash function wrapper. Add to ~/.bashrc:
export PHAT_HOME="/c/Program Files (x86)/Phat"
alias phat='powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$PHAT_HOME/phat.ps1"'- Phat is designed for Windows environments (PowerShell/CMD)
- It manages XAMPP which is a Windows application
- For the best experience, use PowerShell or CMD when working with Phat
After configuring, test with:
phat --version