Cowser
A fun, cross-platform command-line tool that greets you with ASCII art
animals. Inspired by cowsay, written in Python.
Features
- 35+ animals across categories: cows, cats, dogs, birds, sea life, robots, mythical creatures and more
- Greet users with a random animal, or pick one by name/index/prefix
- Custom messages and piping from stdin
- Configurable eyes (
--eyes) on token-based art - Colored output (ANSI, works on modern Windows terminals)
- Config file at
~/.config/neostore/cowser/config.toml - Usable as a library in your own Python code
Installation
Requires Python 3.8+.
pip install cowser
For color support on legacy Windows consoles (cmd.exe pre-Windows 10):
pip install cowser[color]
From source:
git clone https://github.com/rkriad585/Cowser
cd Cowser
pip install .
Usage
cowser Alice # greet with a random animal
cowser --cow owl Bob # pick a specific animal
cowser --message "Hello!" # custom message
echo "From stdin" | cowser # pipe a message
cowser --list # show all animals
cowser --search mythical # search by name, category, or tag
_________
/ Hi Bob! \
\__________/
_____
/ o o \
( V )
\_____/
Options
| Option | Description |
|---|---|
-c, --cow NAME_OR_INDEX |
Choose an animal by name, prefix, or index. |
-e, --eyes CHARS |
Replace the {eyes} token in the art. |
--seed INT |
Seed random selection for reproducible output. |
-m, --message TEXT |
Show a custom message instead of a greeting. |
-l, --list |
List all available animals. |
--search TEXT |
List animals matching name, category, or tag. |
--color COLOR |
Output color (default: cyan). |
--no-color |
Disable colored output. |
-V, --version |
Show version. |
-h, --help |
Show help. |
Legacy commands
Backwards-compatible with the original script:
python main.py Alice
python main.py help
python main.py list
./cowset Alice
Configuration
Defaults are read from ~/.config/neostore/cowser/config.toml.
Command-line flags always win. See config.example.toml.
# ~/.config/neostore/cowser/config.toml
color = "green"
cow = "fish"
eyes = "o o"
# seed = 42
Using Cowser as a library
from cowser import COWS, render, register_cow, search_cows, Cow
print(render("Hello from my app", cow="owl", eyes="0.0"))
for cow in search_cows(category="mythical"):
print(cow.name, cow.tags)
register_cow(Cow("my-dragon", " ~\n (o.o)", category="mythical"))
render() is a pure function — no I/O, no side effects — so it is safe to
embed in other tools.
Adding more animals
Open cowser/cows.py and add a Cow to the COWS list. Art may include an
{eyes} token that --eyes replaces:
Cow("my-cow", r""" /\
/ \
| oo |
~~ ~~""", "misc", ("new",)),
Development
pip install -e ".[dev]"
python -m pytest
Tests run on Linux, macOS, and Windows via GitHub Actions.
License
MIT © 2026 rkriad585
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cowser-1.1.0.tar.gz.
File metadata
- Download URL: cowser-1.1.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe83caaa10cc024f9bacf174c9bca9497c3295d09ede2aa62be7001195da1f03
|
|
| MD5 |
1fa02630800ad88b68e9ff19b7316117
|
|
| BLAKE2b-256 |
d7329e49e883a84956903ee2444cf53d311dcddfee13c1c25ab9039f0184d201
|
File details
Details for the file cowser-1.1.0-py3-none-any.whl.
File metadata
- Download URL: cowser-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b8d49d9f9beea2612b17dece12575570fc0d0be1d661f2be66718f321f3ea7
|
|
| MD5 |
be41dfe622bc7fcd8b00139c0262a763
|
|
| BLAKE2b-256 |
ef00a53858dba273f7cd706e64e23a253e00ef1920bb99a7041d487eb2167485
|