CLI Reference
The cowser command-line interface, end to end.
Table of Contents
Synopsis
cowser [OPTIONS] [NAME]
NAME is a person to greet — Cowser prints Hi <NAME>!. If no name, message,
or stdin is given, Cowser prints its help and exits with a usage error.
Equivalent entry points:
cowser Alice # console script (installed by pip)
python -m cowser Alice
python main.py Alice # backwards-compatible with the original script
cowser.cmd Alice # Windows cmd.exe wrapper
.\cowser.ps1 Alice # Windows PowerShell wrapper
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. |
--mode MODE |
Preset style: borg, dead, greedy, paranoid, stoned, drunk, wired, youthful. |
--tongue CHARS |
Replace the {tongue} token in the art. |
--think |
Use a thought bubble instead of a speech bubble. |
-W, --wrap WIDTH |
Word-wrap the message to WIDTH columns. |
-n, --no-wrap |
Disable word wrapping. |
--rainbow |
Colorize output line by line in rainbow order. |
--bold |
Make the output bold. |
--fortune |
Show a random fortune instead of a message. |
--and NAME_OR_INDEX |
Render a second animal next to the first. |
--interactive |
Start an interactive REPL session. |
--cow-dir DIR |
Load extra animals from DIR (.cow, .txt, .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. |
Colors available to --color: black, red, green, yellow, blue,
magenta, cyan, white, grey/gray, and the light-* variants.
Text sources
Cowser takes text from exactly one place:
--message TEXT— wins over everything else.NAME— rendered asHi NAME!.- Stdin — when stdin is not a TTY, its contents are read (blank input is ignored).
- Otherwise — a usage error is shown.
cowser --message "Hello, world!" --eyes '@.@'
echo "From stdin" | cowser
With --fortune, the text is a random fortune from the built-in collection
and the sources above are ignored.
Interactive mode
cowser --interactive
Starts a REPL: type messages after the > prompt and see the chosen animal
reply. Type exit, quit, :q, or press Ctrl-D (EOF) to leave. Ctrl-C
also ends the session.
Legacy commands
For compatibility with the original standalone script:
python main.py help # print help
python main.py list # list all animals
python main.py Alice # greet Alice
./cowset Alice # the old script
Exit codes
0— success.1— no animals match a--search/--listquery.2— usage errors (unknown option, bad cow name, missing text); reported viaargparse.