{"id":15712419,"url":"https://github.com/tmck-code/pokesay","last_synced_at":"2025-10-05T03:49:07.774Z","repository":{"id":39718300,"uuid":"246445601","full_name":"tmck-code/pokesay","owner":"tmck-code","description":"Print pokemon in the CLI! An adaptation of the classic \"cowsay\"","archived":false,"fork":false,"pushed_at":"2025-03-12T12:13:34.000Z","size":162164,"stargazers_count":23,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T17:03:59.924Z","etag":null,"topics":["bashrc","cli","cowsay","dotfiles","golang","krabby","pokemon","pokemon-colorscripts","pokemonsay","pokemonshow","pokeshell","poketerm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmck-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-11T01:24:57.000Z","updated_at":"2025-03-25T23:00:08.000Z","dependencies_parsed_at":"2023-07-13T04:16:29.278Z","dependency_job_id":"e700d70a-0c92-4a5c-88a3-7ef1b17efeae","html_url":"https://github.com/tmck-code/pokesay","commit_stats":null,"previous_names":["tmck-code/pokesay-go"],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmck-code%2Fpokesay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmck-code%2Fpokesay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmck-code%2Fpokesay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmck-code%2Fpokesay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmck-code","download_url":"https://codeload.github.com/tmck-code/pokesay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251722797,"owners_count":21633016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bashrc","cli","cowsay","dotfiles","golang","krabby","pokemon","pokemon-colorscripts","pokemonsay","pokemonshow","pokeshell","poketerm"],"created_at":"2024-10-03T21:16:03.087Z","updated_at":"2025-10-05T03:49:07.670Z","avatar_url":"https://github.com/tmck-code.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pokesay\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/tmck-code/pokesay/main.yml)\n![AUR](https://img.shields.io/aur/version/pokesay-bin)\n![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/tmck-code/pokesay/total?color=red)\n![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/tmck-code/pokesay/latest/total?color=orange)\n\nPrint pokemon in the CLI! An adaptation of the classic 'cowsay'\n\n\u003cimg width=\"1065\" alt=\"464197914-4c145f23-8837-41df-835c-aeaa49afd13d 2\" src=\"https://github.com/user-attachments/assets/57d33b92-95cf-4a5b-890c-39ff530d447c\" /\u003e\n\n- 🏃 _Pokesay is a single binary with **zero dependencies** that can run on any popular OS and architecture._\n- ⚙️ _It is **flexible**, offering far more features than its ancestor `cowsay`._\n- 🚀 _It is the **fastest** to run compared to similar projects_\n- 🕶️ _It is **modern**, fully supporting unicode borders, japanese names \u0026 colourful ANSI text_\n\n## Installation\n\n- Via homebrew (MacOS/Linux/Windows)\n  ```shell\n  brew install tmck-code/tap/pokesay\n  ```\n- Via the AUR (Arch Linux)\n  ```shell\n  yay -S pokesay-bin\n  ```\n\nFor installation without a package manager, see the options below.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ci\u003eVia the install script (Others)\u003c/i\u003e\u003c/summary\u003e\n\n_(These commands can also be used to update your existing pokesay)_\n\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003ctd\u003eOS/arch\u003c/td\u003e \u003ctd\u003ecommand\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eOSX / darwin\u003c/td\u003e\n  \u003ctd\u003e\n\n```shell\nbash -c \"$(curl https://raw.githubusercontent.com/tmck-code/pokesay/master/build/scripts/install.sh)\" \\\n  bash darwin amd64\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eOSX / darwin (M1)\u003c/td\u003e\n  \u003ctd\u003e\n\n```shell\nbash -c \"$(curl https://raw.githubusercontent.com/tmck-code/pokesay/master/build/scripts/install.sh)\" \\\n  bash darwin arm64\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eLinux / x64\u003c/td\u003e\n  \u003ctd\u003e\n\n```shell\nbash -c \"$(curl https://raw.githubusercontent.com/tmck-code/pokesay/master/build/scripts/install.sh)\" \\\n  bash linux amd64\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eAndroid / arm64 (termux)\u003c/td\u003e\n  \u003ctd\u003e\n\n```shell\nbash -c \"$(curl https://raw.githubusercontent.com/tmck-code/pokesay/master/build/scripts/install.sh)\" \\\n  bash android arm64\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eWindows / x64 (.exe)\u003c/td\u003e\n  \u003ctd\u003e\n\n```shell\nbash -c \"$(curl https://raw.githubusercontent.com/tmck-code/pokesay/master/build/scripts/install.sh)\" \\\n  bash windows amd64\n```\n\n  \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c/details\u003e\n\n---\n\n## Usage\n\nJust pipe some text! e.g.\n\n```shell\necho yolo | pokesay\n```\n\n\u003e _Note: The pokesay tool is intended to only be used with piped text input from STDIN, entering text by typing (or other methods) might not work as expected!_\n\n### Examples\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eDefault output\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_00_fortune\" src=\"https://github.com/user-attachments/assets/019a9055-0a71-472e-84df-791ff8803bb4\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eSet bubble width \u003cb\u003e\u003ccode\u003e-w\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_01_set_width\" src=\"https://github.com/user-attachments/assets/c458d24d-ea0c-4d36-abd3-1a329e81dfde\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eUnicode borders \u003cb\u003e\u003ccode\u003e-u\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_02_unicode\" src=\"https://github.com/user-attachments/assets/9620db09-58e3-4c38-b1a4-99aab6b6e85e\" /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eInfo border \u003cb\u003e\u003ccode\u003e-b\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_03_info_border\" src=\"https://github.com/user-attachments/assets/fe857d59-4400-4251-824b-171d5f10ac52\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eChoose by name \u003cb\u003e\u003ccode\u003e-n\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_04_name\" src=\"https://github.com/user-attachments/assets/88e5fc35-28ac-4b48-a04d-fb1f14446d9d\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eNo category info \u003cb\u003e\u003ccode\u003e-C\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_05_no_category\" src=\"https://github.com/user-attachments/assets/dc9217b8-77a8-4add-a42c-c734d488d1ec\" /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eShow Japanese name \u003cb\u003e\u003ccode\u003e-j\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_06_japanese\" src=\"https://github.com/user-attachments/assets/34ebce1c-4448-4560-aa78-704cbabaef1e\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eShow ID \u003cb\u003e\u003ccode\u003e-I\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_07_id\" src=\"https://github.com/user-attachments/assets/cd2ba951-89db-4764-9dbd-553105d54707\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eSmall size \u003cb\u003e\u003ccode\u003e-c small\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_08_small_size\" src=\"https://github.com/user-attachments/assets/644d9574-2c67-4e2c-a586-b4b0aa95211c\" /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eMedium size \u003cb\u003e\u003ccode\u003e-c medium\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_09_medium_size\" src=\"https://github.com/user-attachments/assets/9979c100-76a2-479c-a5fc-cea858906b25\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eBig size \u003cb\u003e\u003ccode\u003e-c big\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_10_big_size\" src=\"https://github.com/user-attachments/assets/a65c822c-fcd8-4a1a-bdc0-bb81ff9e164e\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eShiny \u003cb\u003e\u003ccode\u003e-c shiny\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_10_shiny\" src=\"https://github.com/user-attachments/assets/1a0022fb-921f-46b8-911c-8db7a8e8769b\" /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eSize and name \u003cb\u003e\u003ccode\u003e-c small -n ...\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_11_size_and_name\" src=\"https://github.com/user-attachments/assets/e0dc9d09-b439-4dc5-81b0-ea5419308c47\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eSize and name \u003cb\u003e\u003ccode\u003e-c big -n ...\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_12_size_and_name_2\" src=\"https://github.com/user-attachments/assets/339a2832-9488-49bf-89ef-abf0f376e336\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd valign=\"top\"\u003eSelect by ID \u003cb\u003e\u003ccode\u003e-i\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_13_select_by_id\" src=\"https://github.com/user-attachments/assets/73aa44c5-bec5-41b0-98b7-717dd29b395f\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eFlip \u003cb\u003e\u003ccode\u003e-F\u003c/code\u003e\u003c/b\u003e\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_14_flip\" src=\"https://github.com/user-attachments/assets/f610c99d-6ad4-4eaa-82ff-0afbe1a7d2a3\" /\u003e\u003c/td\u003e\n  \u003ctd valign=\"top\"\u003eFiglet + lolcat\u003cbr\u003e\u003cimg width=\"350\" alt=\"p_15_figlet_lolcat\" src=\"https://github.com/user-attachments/assets/1e88880b-adb2-4cc2-9ee9-29c0acf26f57\" /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\nTo see it every time you open a terminal, add it to your `.bashrc` file!   \n_(This requires that you have `fortune` installed)_\n\n```shell\necho 'fortune | pokesay' \u003e\u003e $HOME/.bashrc\n```\n\n### Full Usage\n\n\u003e Run pokesay with `-h` or `--help` to see the full usage\n\n```shell\nUsage: pokesay [-bBCfFhIjLsuvW] [-c value] [-i value] [-l value] [-n value] [-t value] [-w value] [parameters ...]\n -b, --info-border  draw a border around the info box\n -B, --no-bubble    do not draw the speech bubble\n -c, --category=value\n                    choose a pokemon from a specific category\n -C, --no-category-info\n                    do not print pokemon category information in the info box\n -f, --fastest      run with the fastest possible configuration (--nowrap \u0026\n                    --notabspaces)\n -F, --flip         flip the pokemon horizontally (face right instead of left)\n -h, --help         display this help message\n -i, --id=value     choose a pokemon from a specific ID (see `pokesay -l` for\n                    IDs)\n -I, --id-info      print the pokemon ID in the info box\n -j, --japanese-name\n                    print the japanese name in the info box\n -L, --list-categories\n                    list all available categories\n -l, --list-names[=value]\n                    list all available names\n -n, --name=value   choose a pokemon from a specific name\n -s, --no-tab-spaces\n                    do not replace tab characters (fastest)\n -t, --tab-width=value\n                    replace any tab characters with N spaces [4]\n -u, --unicode-borders\n                    use unicode characters to draw the border around the speech\n                    box (and info box if --info-border is enabled)\n -v, --verbose      print verbose output\n -W, --no-wrap      disable text wrapping (fastest)\n -w, --width=value  the max speech bubble width [80]\n```\n\n---\n\n## How it works\n\nThis project extends on the original `fortune | cowsay`, a simple command combo that can be added to\nyour .bashrc to give you a random message spoken by a cow every time you open a new shell.\n\n```\n ☯ ~ fortune | cowsay\n ______________________________________\n/ Hollywood is where if you don't have \\\n| happiness you send out for it.       |\n|                                      |\n\\ -- Rex Reed                          /\n --------------------------------------\n        \\   ^__^\n         \\  (oo)\\_______\n            (__)\\       )\\/\\\n                ||----w |\n                ||     ||\n```\n\nAs a personal project, this has been lovingly over-engineered with a focus on the lowest latency possible, so that it doesn't slow down your terminal experience.\n\n1. These pokemon sprites used here are sourced from the awesome repo\n[msikma/pokesprite](https://github.com/msikma/pokesprite)\n\n    ![sprits](https://github.com/msikma/pokesprite/raw/master/resources/images/banner_gen8_2x.png)\n\n2. All of these sprites are converted into a form that can be rendered in a terminal (unicode\ncharacters and colour control sequences) by the `img2xterm` tool, found at\n[rossy/img2xterm](https://github.com/rossy/img2xterm)\n\n3. Use some go tools (`encoding/gob` and `go:embed`) to generate a go source code file\nthat encodes all of the converted unicode sprites as gzipped text and some search-optimised data structures.\n\n4. Finally, this is built with the main CLI logic in `pokesay.go` into an single executable that can be\neasily popped into a directory in the user's `$PATH`\n\nIf all you are after is installing the program to use, then there are no dependencies required!\nNavigate to the Releases and download the latest binary.\n\n## Similar projects\n\nThere are many other projects that bring pokemon to the terminal!\nCheck them out via the links.\n\nInspired by the [pokeshell](https://github.com/acxz/pokeshell) project, I've included a comparison table\n\n| project                                                                                     | language      | speed      | jp   | size | name | category  | flip | id | tab completion |\n|---------------------------------------------------------------------------------------------|---------------|------------|------|------|------|-----------|------|----|----------------|\n| [`tmck-code/pokesay`](https://github.com/tmck-code/pokesay)                                 | go            | 1.7ms      | ✅   | ✅   | ✅   | ✅        | ✅   | ✅ | ❌            |\n| [`yannjor/krabby`](https://github.com/yannjor/krabby)                                       | rust          | 5.2ms      | ✅   | ✅   | ✅   | ✅        | ❌   | ✅ | ❌            |\n| [`Altair-39/kingler`](https://github.com/Altair-39/kingler)                                 | rust          | 39.2ms     | ✅   | ✅   | ✅   | ✅        | ❌   | ✅ | ✅            |\n| [`xiota/pokemon-colorscripts`](https://gitlab.com/xiota/pokemon-colorscripts)               | bash          | 26.7ms     | ❌   | ✅   | ✅   | ✅        | ❌   | ❌ | ❌            |\n| [`rubiin/pokego`](https://github.com/rubiin/pokego)                                         | go            | 2.0ms      | ❌   | ❌   | ✅   | ❌        | ❌   | ❌ | ❌            |\n| [`talwat/pokeget-rs`](https://github.com/talwat/pokeget-rs)                                 | rust          | 1.5ms      | ❌   | ✅   | ✅   | ✅        | ❌   | ✅ | ❌            |\n| [`possatti/pokemonsay`](https://github.com/possatti/pokemonsay)                             | cowsay (perl) | 26.3ms     | ❌   | ❌   | ✅   | ❌        | ❌   | ✅ | ❌            |\n| [`HRKings/pokemonsay-newgenerations`](https://github.com/HRKings/pokemonsay-newgenerations) | cowsay (perl) | 26.9ms     | ❌   | ✅   | ✅   | ✅        | ❌   | ✅ | ❌            |\n| [`dfrankland/pokemonsay`](https://github.com/dfrankland/pokemonsay)                         | nodejs        | 180.2ms    | ❌   | ✅   | ✅   | ❌        | ❌   | ✅ | ❌            |\n\n---\n\n## TODO\n\n- **In progress**\n- **Short-term**\n  - [ ] requesting mew returns mewtwo also\n  - [ ] create \"vertical\" friendly display mode, place the Pokemon standing beside the text box, on the left or right\n  - [ ] shell completion scripts (bash, zsh, fish)\n  - [ ] non-say mode (only print the pokemon, no speech bubble)\n- **Longer-term**\n  - [ ] make the process async.\n    - (Currently the searching/pokemon fetching is done _before_ any printing begins. There's an opportunity to start printing the speech bubble while also fetching the pokemon to print below it)\n    - [ ] implement native lolcat/rainbow HR/colour\n- **In Beta**\n  - [x] optionally print ID assigned to each pokemon, support deterministic selection via the same ID\n- **Completed**\n  - [x] add option to flip Pokemon to face right or left, remove all \"right\" facing cowfiles\n  - [x] create Debian package\n  - [x] create Arch package\n  - [x] support long and short cli args (e.g. --name/-n)\n  - [x] Make the category struct faster to load - currently takes up to 80% of the execution time\n  - [x] Store metadata and names in a more storage-efficient manner\n  - [x] Import japanese names from data/pokemon.json\n  - [x] Fix bad whitespace stripping when building assets\n  - [x] List all names\n  - [x] Make data structure to hold categories, names and pokemon\n  - [x] Increase speed\n  - [x] Improve categories to be more specific than shiny/regular\n  - [x] Filter by both name and category\n\n\n## Other docs\n\n- [Building binaries](./docs/build.md)\n- [Developing/Deploying](./docs/development.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmck-code%2Fpokesay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmck-code%2Fpokesay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmck-code%2Fpokesay/lists"}