-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
This document provides a comprehensive reference for all public functions exposed by the Forgum PowerShell module.
As of version 1.1.2, all functionality is accessible through the single forgum keyword.
# Standard Default Action (Cowsay + Fortune)
forgum [-Lolcat] [-Animation <mode>] [-Cow <name>] ["<custom text>"]
# Configuration & Setup
forgum config # Opens TUI
# Update
forgum update [-Force] [-CheckOnly]
# Gallery & Preview
forgum gallery [-Count <int>]
forgum preview <cow> "<text>"
# Settings Toggles
forgum toggle # Toggles lolcat
forgum animate <mode> # Sets animation
forgum eyes <preset|custom> # Sets eyesNote: The
forgumkeyword uses Parameter Sets to ensure full native integration withGet-Help forgumand terminal tab-completion.
Generates an ASCII art cow saying the provided text.
-
-Text([string]): The message the cow will say. Required. -
-Cow([string]): The name of the cow to use (e.g.,default,tux,dragon). Default:default. -
-Eyes([string]): Custom eye characters (must be exactly 2 characters). Default:oo. -
-Tongue([string]): Custom tongue characters (must be exactly 2 characters). Default:. -
-Thoughts([string]): The thought bubble character (usually\oro). Default:\. -
-Wrap([int]): Column width to wrap the text. Default: 40.
# Basic usage
forgum -Text "Hello, World!"
# Using a different cow and custom eyes
forgum -Text "I am a Linux penguin" -Cow "tux" -Eyes "=="The main entry point for the combined Forgum experience (Fortune + Cowsay + Lolcat).
-
-Lolcat([switch]): Apply rainbow colors to the output. -
-Animation([string]): Specify an animation mode (e.g.,scroll,fade). -
-Text([string]): Override the fortune with custom text. -
-Cow([string]): The name of the cow to use. If not specified, uses the configured default or randomizes.
# Default behavior (Random fortune + Default cow)
forgum
# Rainbow colored fortune with a specific cow
forgum -Lolcat -Cow "dragon"
# Custom text with rainbow colors
forgum -Text "Stay awesome!" -LolcatRetrieves a random fortune from the internal database.
None.
# Get a single fortune
Get-FortuneLists available ASCII cows or retrieves the raw template for a specific cow.
-
-Name([string]): The specific cow name to retrieve. If omitted, returns a list of all available cow names.
# List all cows
Get-CFCow
# Get raw template for 'ghost'
Get-CFCow -Name "ghost"The easiest way to update your Forgum configuration persistently.
-
-Animation([string]): Sets the animation mode. (e.g.static,talking,typewriter,bounce, etc.) -
-Cow([string]): Sets the default cow character. -
-Eyes([string]): Sets the default eye character for the cow. -
-Lolcat([bool]): Enables or disables rainbow colorization globally. -
-RandomCow([bool]): Enables or disables random cow selection on startup. -
-RainbowFrequency([double]): Adjusts the frequency of rainbow colors (0.01 to 1.0).
# Set dragon as default cow with talking animation
Set-Forgum -Cow dragon -Animation talking
# Enable lolcat and set eyes to 'XX'
Set-Forgum -Lolcat $true -Eyes "XX"Retrieves the current Forgum configuration settings.
None.
# Display current configuration
$config = Get-CFConfig
$config.DefaultCowUpdates the Forgum configuration.
-
-Config([hashtable]): A hashtable containing the configuration keys and values to update. Required.
# Change the default cow and enable Lolcat globally
$newConfig = @{ DefaultCow = "tux"; EnableLolcat = $true }
Set-CFConfig -Config $newConfigApplies an animation effect to the provided text.
-
-Text([string]): The ASCII art or text to animate. Required. -
-Mode([string]): The animation style. Supported values depend on configuration (e.g.,Scroll,Fade,Typewriter). Default:None.
# Scroll animation
$cowText = forgum -Text "Watch me move!"
Show-CFAnimation -Text $cowText -Mode "Scroll"Forgum provides several structured helper commands (and shorter aliases) for everyday usage. All commands support standard PowerShell help features (e.g. \Get-Help cowgallery -Detailed\ or \cowgallery -?).
Displays a randomized gallery of cows with fortunes.
- Parameters: -Count\ (default: 5)
- Example: \cowgallery -Count 10\
Quickly preview what a specific cow looks like with a custom message.
- Parameters: -CowFile\ (default: 'default'), -Text\ (default: 'Hello!')
-
Example: \cowpreview tux
Linux rocks!\
Displays the current Forgum configuration in a formatted JSON layout.
- Example: \cowconfig\
Instantly toggles the rainbow color mode on or off.
- Example: \lolcat-toggle\
Changes your globally configured animation mode.
- Parameters: -Mode\ (e.g. 'static', 'physics', 'aurora', 'matrix')
- Example: \cow-animate physics\
Changes the default eyes of your cow.
- Parameters: -Preset\ (e.g. 'borg', 'dead', 'greedy') or -Custom\
- Example: \cow-eyes -Preset borg\ OR \cow-eyes @@\
Opens an interactive, keyboard-navigable Terminal User Interface to tweak your settings visually. You can change animation modes, toggle lolcat, set default cows, and update your profile automatically.
- Example: \orgum-tui\