A modern, feature-rich replacement for cowsay built in Go. Create personality-themed speech bubbles with rich styling, animations, and visual effects.
- 🎨 Rich Styling - Beautiful terminal output using Charm Lipgloss
- 😊 Mood-Based Expressions - Multiple emotional states (happy, sad, angry, surprised, etc.)
- ⌨️ Typing Animations - Watch your messages appear character by character
- 🎭 Personality Themes - Default, Rainbow, Cyber, and Retro themes with unique color schemes
- 🎆 Visual Effects - Confetti, fireworks, sparkles, and rainbow effects
- 🐮 Custom Characters - Support for traditional .cow character files
- 💭 Bubble Styles - Both speech and thought bubbles
- 🎪 Multi-Panel Layouts - Display multiple characters at once (experimental)
git clone https://github.com/MagikIO/familiar-says.git
cd familiar-says
go build -o familiar-says .go install github.com/MagikIO/familiar-says@latestBasic usage:
familiar-says "Hello, World!"With mood and theme:
familiar-says --mood happy --theme rainbow "I'm so happy!"With animation:
familiar-says --animate "Watch me type..."With effects:
familiar-says --effect confetti "Celebration time!"Using a built-in character:
familiar-says --character cat "Meow!"familiar-says [message] [flags]
Flags:
-a, --animate Enable typing animation
-c, --character string Character to use (cat, owl, fox, bunny, penguin, dragon, robot, bat, turtle, default)
-C, --list-characters List available characters
-e, --effect string Visual effect (none, confetti, fireworks, sparkle, rainbow, rainbow-text) (default "none")
-E, --list-effects List available effects
-M, --list-moods List available moods
-T, --list-themes List available themes
-m, --mood string Mood expression (happy, sad, angry, surprised, bored, excited, neutral, sleepy) (default "neutral")
-p, --multipanel Enable multi-panel mode (experimental)
-s, --speed int Animation speed in milliseconds (default 50)
-t, --theme string Theme to use (default, rainbow, cyber, retro) (default "default")
--think Use thought bubble instead of speech bubble
-w, --width int Width of speech bubble (default 40)
--outline-color string Color for character outline/body (hex, ANSI, or name)
--eye-color string Color for character eyes (hex, ANSI, or name)
--mouth-color string Color for character mouth (hex, ANSI, or name)
--list-colors List available named colors
-h, --help help for familiar-says
familiar-says supports configuration files, profiles, and environment variables to reduce repetitive flag usage.
Create a config file at ~/.config/familiar-says/config.json:
{
"default": {
"character": "cat",
"theme": "cyber",
"mood": "happy",
"width": 50
}
}All flags can be configured:
character,theme,mood,width,animate,speed,effect,think,multipaneloutlineColor,eyeColor,mouthColor
Define multiple profiles for different use cases:
{
"default": {
"character": "cat",
"width": 50
},
"profiles": {
"work": {
"character": "owl",
"theme": "cyber",
"mood": "neutral"
},
"fun": {
"character": "dragon",
"theme": "rainbow",
"effect": "sparkle",
"animate": true
},
"presentation": {
"character": "robot",
"theme": "cyber",
"width": 80,
"animate": true,
"speed": 40
}
}
}Use profiles with the --profile flag:
familiar-says --profile work "Meeting at 3pm"
familiar-says --profile fun "Party time!"Override config values using environment variables:
export FAMILIAR_SAYS_CHARACTER="owl"
export FAMILIAR_SAYS_THEME="cyber"
export FAMILIAR_SAYS_MOOD="neutral"
familiar-says "Using env vars!"All flags have corresponding environment variables with the FAMILIAR_SAYS_ prefix:
FAMILIAR_SAYS_CHARACTER,FAMILIAR_SAYS_THEME,FAMILIAR_SAYS_MOODFAMILIAR_SAYS_WIDTH,FAMILIAR_SAYS_SPEEDFAMILIAR_SAYS_ANIMATE,FAMILIAR_SAYS_THINK,FAMILIAR_SAYS_MULTIPANEL(usetrue/false,1/0, oryes/no)FAMILIAR_SAYS_EFFECTFAMILIAR_SAYS_OUTLINE_COLOR,FAMILIAR_SAYS_EYE_COLOR,FAMILIAR_SAYS_MOUTH_COLORFAMILIAR_SAYS_PROFILE
Configuration sources are applied in this order (highest priority last):
- Defaults - Built-in defaults
- Config File - Values from
~/.config/familiar-says/config.json - Environment Variables -
FAMILIAR_SAYS_*env vars - CLI Flags - Command-line flags (always win)
This allows you to set defaults in your config file, override them per-session with environment variables, and override everything with explicit CLI flags.
Classic terminal colors with standard ASCII expressions
- Eyes:
oo,^^,TT, etc.
Colorful Unicode expressions with vibrant colors
- Eyes:
◕‿◕,•́︵•̀,ಠ_ಠ, etc.
Green matrix-style with boxed expressions
- Eyes:
[^_^],[;_;],[>_<], etc.
Orange/amber colors with classic emoticons
- Eyes:
:D,:(,>:(, etc.
- neutral - Default calm expression
- happy - Joyful expression
- sad - Sorrowful expression
- angry - Upset expression
- surprised - Shocked expression
- bored - Uninterested expression
- excited - Enthusiastic expression
- sleepy - Tired expression
Each theme has unique eye and tongue expressions for each mood!
Adds colorful confetti characters around the output
familiar-says --effect confetti "Party time!"Creates firework-like star bursts
familiar-says --effect fireworks "Boom!"Adds sparkle emojis around the output
familiar-says --effect sparkle "Shiny!"Colors each character with rainbow colors
familiar-says --effect rainbow "Colorful!"Applies rainbow colors only to the message text (not the character)
familiar-says --effect rainbow-text "Colorful message!"familiar-says includes several built-in character familiars:
default- Classic cowcat- Cute catbunny- Adorable bunnydragon- Majestic dragonowl- Wise owlfox- Clever foxpenguin- Waddle penguinrobot- Mechanical robotbat- Night batturtle- Slow turtle
Characters are defined using JSON files with support for customizable colors and anchor positions. Example format:
{
"name": "cat",
"description": "A cute cat familiar",
"art": [
" /\\_/\\ ",
" ( @@ ) ",
" =( Y )=",
" ^ ^ "
],
"anchor": {"x": 4, "y": 0},
"eyes": {
"line": 1,
"col": 3,
"width": 2,
"placeholder": "@@"
},
"mouth": {
"line": 2,
"col": 4,
"width": 1,
"placeholder": "Y"
},
"colors": {
"eyes": "#7CFC00",
"mouth": "#FF69B4"
}
}You can customize character colors using the color flags:
# Custom colored cat
familiar-says --character cat --eye-color "#00FF00" --mouth-color pink "Custom colors!"
# Full color customization
familiar-says --character dragon --outline-color fire --eye-color gold --mouth-color red "Fiery dragon!"
# See all available named colors
familiar-says --list-colorsSupported color formats:
- Hex codes:
#FF6B6B,#F6B,FF6B6B - ANSI 256:
196,82,46 - Named colors:
red,blue,pink,fire,ocean,sunset, etc.
# Happy cat with rainbow effect
familiar-says --character cat --mood happy --effect rainbow "I love rainbows!"
# Animated angry cyber-themed message
familiar-says --mood angry --theme cyber --animate --speed 30 "System breach detected!"
# Thought bubble with sparkles
familiar-says --think --effect sparkle "What should I think about?"
# Custom width for long messages
familiar-says --width 60 "This is a much longer message that needs more space to display properly without wrapping too much."
# Custom colored owl
familiar-says --character owl --eye-color gold --mood wise "Hoot hoot!"echo "Hello from stdin!" | familiar-says
fortune | familiar-says --mood happy --theme rainbowThe project is organized into several packages:
internal/bubble- Speech bubble generation with word wrappinginternal/personality- Theme and mood systeminternal/animation- Terminal animations using Bubble Teainternal/effects- Visual effects engineinternal/character- Character rendering engine (loads JSON character files)internal/canvas- Low-level character rendering with color support and compositioninternal/config- Configuration file, profile, and environment variable managementinternal/errors- Custom error types with consistent formattingcmd- CLI application using Cobracharacters/- Built-in character definitions in JSON format
The application features comprehensive error handling with:
- Custom error types for better error context (CharacterLoadError, ColorParseError, ValidationError)
- Wrapped errors using
fmt.Errorfwith%wfor full error chains - Input validation at entry points with user-friendly messages
- Graceful degradation for terminal width detection failures
- Clear error messages showing exactly what went wrong and where
- Cobra - CLI framework
- Lipgloss - Terminal styling
- Bubble Tea - Terminal UI framework
Contributions are welcome! Feel free to:
- Add new themes
- Create new character files
- Implement new effects
- Improve animations
- Fix bugs
MIT License - see LICENSE file for details
Inspired by the classic cowsay by Tony Monroe. Built with ❤️ using Charm libraries.