cowsay
Version, currently 0.0.42 versions
- 0.0.5latestApr 18, 2025
- 0.0.4not indexedJun 19, 2026
github.com/kojix2/cowsay.cr
A Crystal implementation of the classic cowsay program.
Nothing has been indexed for 0.0.4 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
cowsay:
github: kojix2/cowsay.cr
version: ~> 0.0.4Then run:
shards installshard.yml
No shard.yml has been indexed for 0.0.4. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Cowsay (In Crystal)
___________
< OMGHI2U!! >
-----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
A Crystal implementation of the classic cowsay program, which generates ASCII art of a cow with a message.
Installation
From Binary
Download the latest binary from the Releases page.
From Source
git clone https://github.com/kojix2/cowsay.cr
cd cowsay.cr
shards build --release
The compiled binary will be available at bin/cowsay.
Usage
As a Command Line Tool
Basic usage:
bin/cowsay "Hello, World!"
Output:
_____________
< Hello, World! >
-------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Using a different character:
bin/cowsay -c tux "Hello, Linux!"
Making the character think:
bin/cowsay -n "I am thinking..."
Using different modes:
bin/cowsay -b "Borg mode" # Borg mode
bin/cowsay -d "Dead mode" # Dead mode
bin/cowsay -s "Stoned mode" # Stoned mode
Custom eyes and tongue:
bin/cowsay -e ^^ -T ~~ "Custom face"
Colored output:
bin/cowsay -C "Colorful message!"
As a Library
require "cowsay"
# Basic usage
puts Cowsay.say("Hello, World!")
# Using a different character
puts Cowsay.say("Hello, Linux!", character: "tux")
# Making the character think
puts Cowsay.think("I am thinking...")
# Using different modes
puts Cowsay.say("Borg mode", mode: "borg")
puts Cowsay.say("Dead mode", mode: "dead")
# Custom eyes and tongue
puts Cowsay.say("Custom face", eyes: "^^", tongue: "~~")
# Colored output
puts Cowsay.say("Colorful message!", color: true)
# Direct class usage
cow = Cowsay::Cow.new(mode: "stoned", color: true)
puts cow.say("I'm feeling strange...")
Command Line Options
Usage: cowsay [options] message
-c, --cow CHARACTER Selects a character
-n, --think Makes the cow think
-e EYES, --eyes=EYES Sets the eyes of the cow (default 'oo')
-T TONGUE, --tongue=TONGUE Sets the tongue of the cow (default ' ')
-b, --borg Borg mode
-d, --dead appear dead
-g, --greedy Greedy mode
-p, --paranoid Paranoid mode
-s, --stoned Stoned mode
-t, --tired Tired mode
-w, --wired Wired mode
-y, --young Youthful appearance
-l, --list Lists available characters
-W, --wrap-column WIDTH Sets the width of the cow
-C, --color Enable colored output
-v, --version Displays version information
-h, --help Displays this help message
Available Characters
You can list all available characters with:
bin/cowsay -l
Some notable characters include:
cow: The default cowtux: The Linux mascotdragon: A dragonsheep: A sheepturtle: A turtlebunny: A bunnymoose: A moose- And many more!
Face Modes
The following face modes are available:
| Mode | Description | Eyes | Tongue |
|---|---|---|---|
| default | Default face | oo | |
| borg | Borg mode | == | |
| dead | Dead face | == | U |
| greedy | Greedy face | $$ | |
| paranoid | Paranoid face | @@ | |
| stoned | Stoned face | ** | U |
| tired | Tired face | -- | |
| wired | Wired face | OO | |
| young | Young face | .. |
Development / Contributing
This project was forked from ruby cowsay.
Here are some ways you can contribute:
- Fork this repository
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
- Add tests
Special Thanks
Special thanks to Tony Monroe for the original perl CLI implementation. You can find out more about that here:
http://www.nog.net/~tony/warez/cowsay.shtml
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.0.4- Tagged
- Jun 19, 2026
- Commit
d846104f704c- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/kojix2/cowsay.cr
Metadata
- Created
- Sep 3, 2026
- Updated
- Sep 24, 2026
- Synced
- Sep 23, 2026
- Versions
- 2