-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
This guide helps you fix common problems with Forgum. If something isn't working, check here first!
What it means: PowerShell can't find Forgum.
How to fix it:
-
Check if Forgum is installed:
Get-Module -ListAvailable | Where-Object {$_.Name -like "*Forgum*"}
-
If nothing shows up, install Forgum:
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/harish2222/Forgum/main/install.ps1'))
-
If Forgum is installed but still not found, try importing it manually:
Import-Module Forgum -Force
What it means: Forgum is loaded but the command name is wrong.
How to fix it:
-
Make sure you're using the right command:
forgum
-
Check what commands Forgum provides:
Get-Command -Module Forgum
-
If you see
forgumFortuneinstead offorgum, you might have an old version. Reinstall Forgum.
What it means: Forgum can't find the cow file you specified.
How to fix it:
-
List available cows:
Get-CFCow -
Use the exact name from the list (without
.cow):forgum -Text "Hello" -CowFile 'tux'
-
If you created a custom cow, make sure it's in the
Data/Cows/folder.
What it means: Forgum can't find the fortune database.
How to fix it:
-
Check if the fortune file exists:
Test-Path (Get-ConfigPath)
-
Look in the Data/Fortunes folder:
Get-ChildItem (Join-Path (Split-Path (Get-Command Forgum).Source) "Data/Fortunes")
-
If missing, reinstall Forgum or copy the fortunes file manually.
What it means: The command runs but nothing appears.
How to fix it:
-
Try with verbose output:
forgum -Verbose -
Check if your terminal supports the output:
forgum -Text "Test" | Out-Host
-
Make sure your terminal window isn't too small.
What it means: The lolcat colors aren't showing.
How to fix it:
-
Check if rainbow is enabled:
(Get-CFConfig).lolcat.enabled -
Enable it:
$config = Get-CFConfig $config.lolcat.enabled = $true Set-CFConfig -Config $config
-
Make sure your terminal supports colors. Some old terminals don't.
What it means: Forgum couldn't parse the cow file.
How to fix it:
-
Check if the cow file is valid:
Get-CFCow -Name 'default'
-
If you're using a custom cow, check the format. See Custom Cows.
What it means: Forgum takes too long to run.
How to fix it:
-
Disable animations:
$config = Get-CFConfig $config.animation.mode = 'static' Set-CFConfig -Config $config
-
Disable rainbow (it adds processing time):
$config = Get-CFConfig $config.lolcat.enabled = $false Set-CFConfig -Config $config
-
Use a smaller fortune database.
What it means: The config file has invalid JSON.
How to fix it:
-
Delete the config file:
# Windows Remove-Item ~/Documents/PowerShell/forgum/config.json # Mac/Linux Remove-Item ~/.config/forgum/config.json
-
Forgum will create a fresh config on next run.
-
Or reset manually:
Set-CFConfig -Config @{ animation = @{ mode = 'static'; speed = 20; duration = 12; spread = 3.0 } cow = @{ file = 'default'; random = $false; mode = $null; eyes = 'oo'; tongue = ' ' } fortune = @{ database = 'fortunes'; offensive = $false } lolcat = @{ enabled = $false; truecolor = $true; frequency = 0.1; invert = $false } output = @{ wordWrap = $true; maxWidth = 60 } shell = @{ integration = 'auto'; tmux = @{ enabled = $false; pane = 'status-right' } } }
What it means: PowerShell takes a long time to start (or appears to hang) after adding Import-Module Forgum to your profile, or running a forgum* command on shell startup.
Root cause: Forgum's animation engine runs an infinite loop when animation.mode is set to anything other than static (e.g. talking, typewriter, bounce, disco, etc.). When an animation is triggered during profile load, the loop never exits and PowerShell cannot finish startup.
How to fix it:
-
Preferred: set the animation mode to
static(only renders the final frame instantly):$config = Get-CFConfig $config.animation.mode = 'static' Set-CFConfig -Config $config
Or in
config.json:{ "animation": { "mode": "static" } } -
Skip auto-start for the current session (handy when the config is unreachable):
$env:FORGUM_NOAUTOSTART = '1' Import-Module Forgum
After fixing, restart your PowerShell window. Startup should return to under one second.
"Execution of scripts is disabled on this system"
# Fix: Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserProfile script not running
# Check if profile exists
Test-Path $PROFILE
# Create if missing
New-Item -ItemType File -Path $PROFILE -Force"pwsh: command not found"
# Install PowerShell
brew install powershell # Mac
# or
sudo apt install powershell # Ubuntu/DebianPermission denied
# Fix permissions
chmod +x ~/.config/forgum/config.jsonFortune not showing in status bar
# Test the command directly
pwsh -NoProfile -Command "Import-Module Forgum -ErrorAction SilentlyContinue; Get-Fortune"
# Check tmux config
tmux show-option status-rightIf none of these solutions work:
- Check the GitHub Issues: https://github.com/harish2222/Forgum/issues
- Search for your error message — someone might have had the same problem
-
Create a new issue with:
- Your operating system
- PowerShell version (
$PSVersionTable.PSVersion) - The exact error message
- What you were trying to do
Back: Custom Fortunes | Home: Home