A terminal-based Pokédex written in C. Fetches live data from PokéAPI and renders it with ANSI colors, a real rendered sprite (via chafa), and full bilingual output.
=== POKÉDEX ENTRY #94: gengar ===
▄▄▄▄▄▄▄▄
▄██████████▄
██▀▀ ▀▀██ (sprite rendered here
██ ● ● ██ in full color by chafa)
██ ▄▄ ██
██▄ ▀▀▀▀ ▄██
▀██▄▄▄▄▄▄██▀
▀▀▀▀▀▀▀▀
Height: 1.5 m Weight: 40.5 kg
Types: [ghost] [poison]
Description: Under a full moon, this Pokémon likes to mimic the moves of the people it is hunting.
Base Stats:
HP [■■■■■■■ ] 60
Attack [■■■■■■■■■ ] 65
Defense [■■■■■■ ] 60
Sp. Atk [■■■■■■■■■ ] 65
Sp. Def [■■■■■■■■ ] 75
Speed [■■■■■■■■■■■ ] 110
Total: 435 / 780
- Fetches live Pokémon data by name from PokéAPI
- Displays ID, name, types, height, weight and Pokédex flavor text
- Renders base stats as colored ANSI bars, plus the Base Stat Total (BST)
- Shows the official artwork sprite directly in the terminal via
chafa - Bilingual output (English / Italian) — labels, stat names, type names and flavor text all switch language with a single flag
- Graceful error handling (unknown Pokémon, network errors, missing
chafa)
| Dependency | Purpose |
|---|---|
| libcurl | HTTP requests to PokéAPI |
| cJSON | JSON parsing |
| chafa | Terminal sprite rendering (optional, but recommended) |
GCC + make |
Build |
sudo pacman -S base-devel curl chafabase-devel provides gcc and make. cJSON.h / cJSON.c are vendored directly in this repository, so no separate cJSON package is required.
git clone https://github.com/<your-username>/pokedex-cli.git
cd pokedex-cli
make # compiles the 'pokedex' binary
sudo make install # installs it to /usr/local/bin, so it's available system-wideOnce installed, run it from anywhere as pokedex <name>. To remove it later: sudo make uninstall.
Prefer a local build without installing? make alone produces a ./pokedex binary you can run directly, no sudo required.
pokedex <pokemon-name> [-it|-en]
The language flag is optional and order-independent — it can come before or after the name. Default language is English.
| Command | Result |
|---|---|
pokedex gengar |
Gengar's entry in English (default) |
pokedex gengar -it |
Gengar's entry in Italian |
pokedex -it charizard |
Same as above — flag before the name works too |
pokedex pikachu -en |
Explicitly force English |
.
├── main.c # application source
├── cJSON.c # vendored JSON library (implementation)
├── cJSON.h # vendored JSON library (header)
├── Makefile # build / install / uninstall targets
└── README.md
- Evolution chain display
- Local caching to reduce redundant API calls (especially for translated type names)
- Config file for default language / sprite size / color theme
- Additional languages beyond English and Italian
MIT — see LICENSE for details.
Data provided by PokéAPI. Sprite rendering by chafa. JSON parsing by cJSON.
