fortune + cow + rainbow = joy
A cross-platform PowerShell module that combines cowsay, fortune, and lolcat into one beautiful, configurable, and fun terminal experience.
|
Monochrome
|
Rainbow Lolcat
|
PowerShell
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/harish2222/Forgum/main/install.ps1'))Bash / Zsh / Fish
bash <(curl -fsSL https://raw.githubusercontent.com/harish2222/Forgum/main/install.sh)# Get a fortune from a random cow in rainbow colors
forgum -Lolcat
# View the full configuration UI
forgum config
# See a gallery of cows
forgum gallery -Count 3Forgum isn't just another cowsay wrapper. It's a production-grade terminal personality engine built for developers who want their CLI to feel alive.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PowerShell Module (Thin Wrapper) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β JSON Protocol βββΊ Rust Engine (Native Binary) β β
β β βββ ANSI Framebuffer Renderer β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β’ Zero animation logic in PowerShell β
β β’ Background rendering (shell stays usable) β
β β’ Cross-platform: Windows, macOS, Linux β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Metric | Forgum | Traditional cowsay |
|---|---|---|
| Load Time | < 100ms (PS 7.4) | N/A |
| Render Time | Sub-millisecond | ~50ms |
| Animation FPS | 60 FPS | 15-30 FPS |
| Memory Footprint | ~2MB (Rust binary) | ~10MB (Python) |
| Background Mode | β Non-blocking | β Blocks terminal |
| Suite | Tests | Status |
|---|---|---|
| CLI | 31 | β |
| Forgum Core | 35 | β |
| Comprehensive | 20 | β |
| Cross-Platform | 10 | β |
| Engine Manual | 49 | β |
| Ghost | 11 | β |
| Live Show | 3 | β |
| New Subcommands | 50 | β |
| Permutations | 123 | β |
| Shell Usability | 24 | β |
| Subcommands | 132 | β |
| Visual | 4 | β |
| Rust Unit | 45 | β |
| Total | 492 | β 0 Failures |
Forgum features a lightning-fast differential ANSI framebuffer renderer in Rust, seamlessly integrated through PowerShell.
| Effect | Description | Best For |
|---|---|---|
| aurora | Northern lights with flowing gradients | Ambient terminal beauty |
| plasma | Classic plasma shader effect | Retro aesthetic |
| ember | Glowing fire particles | Warm, cozy terminals |
| liquid-chrome | Reflective metallic surface | Sleek, modern look |
| shatter | Fragmented glass breaking | Dramatic reveals |
| portal | Interdimensional rift effect | Sci-fi enthusiasts |
| glitch | Digital artifact corruption | Cyberpunk vibes |
| neon-pulse | Pulsating neon lights | Night owl coders |
| physics | Particle physics simulation | Dynamic motion |
| Style | Description |
|---|---|
| breathe | Gentle scaling animation |
| liquid | Fluid wave motion |
| sway | Side-to-side rocking |
| bounce | Vertical bouncing |
| fly | Floating flight path |
| fire | Flame flicker effect |
| matrix | Digital rain cascade |
| pulse | Rhythmic pulsing |
| dissolve | Gradual fade out |
# Background mode (default) β shell stays usable
forgum run --mode aurora
# Foreground mode β blocks until animation completes
forgum run --mode plasma --no-background
# Random effect selection
forgum run --mode randomTechnical Details:
- Cursor Save/Restore: Each frame saves cursor position, renders overlay, restores cursor
- Differential Rendering: Only modified cells are updated (minimizes flicker)
- Non-Blocking I/O: Engine runs independently while shell accepts input
- ANSI Framebuffer: True 24-bit color with proper terminal state management
Forgum comes packed with 109 unique characters. Whether you want a friendly kitty, a wise dragon, or a tuxedo-wearing penguin, we've got you covered.
| Style | Examples | Animation Match |
|---|---|---|
| Aquatic | whale, dolphin, shark | liquid, sway |
| Avian | bird, eagle, penguin | fly, bounce |
| Mammal | cow, dragon, unicorn | breathe, physics |
| Reptile | dinosaur, snake, lizard | dissolve, matrix |
| Mythical | ghost, dragon, phoenix | portal, glitch |
| ζΊζ’° | robot, alien, cyborg | neon-pulse, plasma |
Run Get-CFCow to see the full list of names!
- 109 ASCII Cows: Massive library with intelligent style matching
- 19 Animation Effects: 9 flagship Rust-powered + 10 base styles
- Truecolor Rainbow: 24-bit color support for stunning visuals
- Unified CLI: Single
forgumcommand with 18 subcommands - Background Rendering: Animations run while shell stays usable
- Native Shell Hooks: bash/zsh/fish integration via
forgum init <shell>
- Cow Style Matching: Automatic animation selection based on cow personality
- Dynamic Fortune Database: Multiple fortune sources with filtering
- Interactive Configuration: TUI wizard for easy setup
- Auto-Update: Silent background update checks
- Cross-Shell Compatibility: PowerShell, Bash, Zsh, Fish, tmux
The entire functionality of the module is accessible through a single keyword: forgum.
# Core Commands
forgum # Render default cow with fortune
forgum "Hello World!" # Render custom text
forgum run --cow tux --mode aurora # Full control
# Configuration
forgum config # Interactive TUI
forgum toggle # Toggle rainbow mode
forgum animate <mode> # Set animation mode
forgum eyes <preset> # Change eye style
# Gallery & Preview
forgum gallery -Count 5 # Show multiple cows
forgum preview tux "Linux rules!" # Preview specific cow
# System
forgum update [-Force] # Update Forgum
forgum init <shell> # Generate shell hooks
forgum help [command] # Get help| Command | Description | Example |
|---|---|---|
run |
Render cow with options | forgum run --cow dragon --mode plasma |
config |
Open configuration TUI | forgum config |
gallery |
Display cow gallery | forgum gallery --count 10 |
preview |
Preview cow with text | forgum preview kitty "Meow!" |
update |
Check/install updates | forgum update --force |
toggle |
Toggle rainbow mode | forgum toggle |
animate |
Set animation mode | forgum animate aurora |
eyes |
Change eye style | forgum eyes borg |
init |
Generate shell hooks | forgum init bash |
live |
Start live show mode | forgum live |
daemon |
Run background engine | forgum daemon |
help |
Show help | forgum help run |
- Windows:
~/Documents/PowerShell/Forgum/config.json - Linux/macOS:
~/.config/Forgum/config.json
{
"animation": {
"mode": "random",
"background": true,
"speed": 20,
"duration": 12,
"spread": 3.0,
"blinkRate": 0.2,
"amplitude": 2,
"cycleInterval": 3
},
"cow": {
"file": "default",
"random": false,
"mode": null,
"eyes": "oo",
"tongue": " "
},
"fortune": {
"database": "fortunes",
"databases": ["fortunes"],
"offensive": false,
"lengthFilter": null
},
"lolcat": {
"enabled": false,
"truecolor": true,
"frequency": 0.1,
"spread": 3.0,
"seed": 0,
"invert": false,
"animate": false,
"duration": 12,
"speed": 20.0
},
"output": {
"wordWrap": true,
"maxWidth": 60,
"noWrap": false
},
"startup": {
"enabled": true,
"command": "forgum"
},
"shell": {
"integration": "auto",
"tmux": {
"enabled": false,
"pane": "status-right"
}
}
}| Mode | Eyes | Description |
|---|---|---|
b |
== |
Borg |
d |
xx |
Dead |
g |
$$ |
Greedy |
p |
@@ |
Paranoia |
s |
** |
Stoned |
t |
-- |
Tired |
w |
OO |
Wasted |
y |
.. |
Youthful |
# Add to ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish
eval "$(pwsh -Command 'Import-Module Forgum; forgum init bash')"# Add to ~/.tmux.conf
set -g status-right "#(pwsh -Command 'Import-Module Forgum; forgum' 2>/dev/null)"
set -g status-interval 300# Add to $PROFILE
Import-Module Forgum
forgum # Show fortune on shell startAdd these to your $PROFILE:
# Quick config toggle
function cowconfig {
param([string]$Path, [object]$Value)
$config = Get-CFConfig
if ($Path) {
$parts = $Path -split '\.'
$current = $config
foreach ($part in $parts[0..($parts.Length-2)]) { $current = $current.$part }
if ($Value) { $current.$parts[-1] = $Value; Set-CFConfig -Config $config }
else { $current.$parts[-1] }
} else { $config | ConvertTo-Json -Depth 4 }
}
# Preview any cow
function cowpreview {
param([string]$Cow = 'default', [string]$Text = 'Hello!')
forgum -Text $Text -CowFile $Cow
}
# Random cow gallery
function cowgallery {
param([int]$Count = 5)
Get-CFCow | Get-Random -Count $Count | ForEach-Object {
forgum -Text (Get-Fortune) -CowFile $_
}
}
# Toggle rainbow
function lolcat-toggle {
$config = Get-CFConfig
$config.lolcat.enabled = -not $config.lolcat.enabled
Set-CFConfig -Config $config
Write-Host "Lolcat: $(if ($config.lolcat.enabled) {'ON'} else {'OFF'})"
}
# Set animation
function cow-animate {
param([ValidateSet('static','talking','typewriter','aurora','plasma')]$Mode)
$config = Get-CFConfig
$config.animation.mode = $Mode
Set-CFConfig -Config $config
Write-Host "Animation: $Mode"
}
# Set cow eyes
function cow-eyes {
param(
[ValidateSet('borg','dead','greedy','paranoia','stoned','tired','wasted','youthful')]$Preset,
[string]$Custom
)
$eyes = switch ($Preset) {
'borg' {'=='}, 'dead' {'xx'}, 'greedy' {'$$'}, 'paranoia' {'@@'},
'stoned' {'**'}, 'tired' {'--'}, 'wasted' {'OO'}, 'youthful' {'..'}
default { $Custom }
}
$config = Get-CFConfig
$config.cow.eyes = $eyes
Set-CFConfig -Config $config
Write-Host "Cow eyes: $eyes"
}Create a .cow file in Data/Cows/:
$the_cow = <<EOC;
\\ ^__^
\\ (oo)\\_______
(__)\\ )\\/\\
||----w |
|| ||
EOCUse $eyes, $tongue, $thoughts for customizable parts.
Add your own to ~/Documents/PowerShell/fortunes.txt:
Your first fortune here
%
Your second fortune here
%
Your third fortune here
- User Guide: New to the command line? Start here for a fun, jargon-free guide!
- Installation Guide: Detailed steps for every platform.
- Configuration: How to tweak every setting.
- API Reference: For developers and scripters.
Don't settle for static text files! Forgum supports a highly flexible Placeholder API (the {{...}} engine) in your .cow files.
- You can inject variables dynamically.
- You define eyes, tongue, thoughts, and complex visual states with variables like
$eyes,$tongue,$thoughts. - This API allows any third-party cow file to integrate beautifully with Forgum's mood and theme system!
Fixed in v1.1.2. If you are still experiencing this issue, update to the latest version.
If PowerShell appears to hang on startup after adding Import-Module Forgum (or any forgum* command) to your profile, the cause is almost always an animation loop:
- Root cause: Forgum's animation engine ran an infinite loop when
animation.modewas set to anything other thanstatic(e.g.talking,typewriter,bounce,disco). If an animation fired during profile load, the loop never exited and PowerShell couldn't finish startup. - Fix 1 β update Forgum (recommended):
Update-Forgum - Fix 2 β set animation mode to static (if update isn't available):
Or in
$config = Get-CFConfig $config.animation.mode = 'static' Set-CFConfig -Config $config
config.json:{ "animation": { "mode": "static" } } - Fix 3 β skip auto-start for the current session:
$env:FORGUM_NOAUTOSTART = '1' Import-Module Forgum
After applying the fix, restart your PowerShell window. Startup should return to under one second.
If Rust-powered animations (aurora, plasma, ember, etc.) fall back to native physics:
- Check if the engine binary exists:
Import-Module Forgum Get-EngineBinary # Should return a path, or $null if not found
- Rebuild the engine (requires Rust toolchain):
cd engine && cargo build --release
- Copy the binary to
bin/:Copy-Item engine/target/release/forgum-engine.exe bin/ # Windows cp engine/target/release/forgum-engine bin/ # Linux/macOS
If eval "$(pwsh -Command 'Import-Module Forgum; forgum init bash')" produces an error:
- Ensure PowerShell is available in your
PATH - Test manually:
pwsh -Command 'Import-Module Forgum; forgum init bash' - If the module isn't installed, import from the repo:
pwsh -Command 'Import-Module ./Forgum.psd1; forgum init bash'
Forgum stores config in a platform-appropriate location:
- Windows:
~/Documents/PowerShell/Forgum/config.json - Linux/macOS:
~/.config/Forgum/config.json
To find yours:
(Get-CFConfig | ConvertTo-Json -Depth 1) -replace '\\', '/'- PowerShell 5.1+ (Windows) or PowerShell 7+ (cross-platform)
- Rust toolchain (optional, for engine rebuilds)
- No external dependencies
.\uninstall.ps1Or manually:
- Module:
~/Documents/PowerShell/Modules/Forgum/ - Config:
~/Documents/PowerShell/Forgum/ - Profile entry in
$PROFILE
See CONTRIBUTING.md for guidelines.
MIT License β see LICENSE for details.
| Project | Description |
|---|---|
| piuccio/cowsay | Original cow files |
| fortune-mod | Fortune database |
| lolcat | Rainbow colorization algorithm |
| Rust | High-performance engine language |
Made with β€οΈ and a cow


