A fun, interactive command-line Pokédex built in Go!
Explore the Pokémon world, discover Pokémon in different areas, catch them, inspect their stats, and build your own Pokédex – all from your terminal.
This project uses the free PokéAPI to fetch real Pokémon data.
- Map navigation: Use
mapto see the next 20 locations andmapbto go back - Explore areas:
explore <area-name>to list Pokémon that can appear there - Catch Pokémon:
catch <pokemon-name>– try your luck with a Poké Ball! - Inspect caught Pokémon:
inspect <pokemon-name>to view detailed stats - View your Pokédex:
pokedexto list all Pokémon you've caught - Help & Exit:
helpfor commands,exitto quit - Caching: Responses from PokéAPI are cached in memory for faster repeated requests
- Pagination: Seamless next/previous navigation through the world map
- Language: Go (standard library + minimal dependencies)
- API: PokéAPI (public, no key required)
- Go 1.22 or higher
-
Clone the repository:
git clone https://github.com/CodeZeroSugar/pokedexcli.git cd pokedexcli -
Build and run:
go run .Or build a binary:
go build -o pokedexcli ./pokedexcli
The program starts an interactive REPL prompt (Pokedex >).
| Command | Description | Example |
|---|---|---|
help |
Show this list of commands | help |
exit |
Exit the Pokédex | exit |
map |
Display the next page of location areas | map |
mapb |
Display the previous page of location areas | mapb |
explore <area> |
List Pokémon that can be encountered in an area | explore viridian-forest |
catch <pokemon> |
Attempt to catch a Pokémon | catch pikachu |
inspect <pokemon> |
View details of a caught Pokémon | inspect pikachu |
pokedex |
List all Pokémon in your Pokédex | pokedex |
Pokedex > map
celadon-city
cerulean-cave
...
Pokedex > explore cerulean-cave
Possible encounters:
- golbat
- parasect
- raichu
- ...
Pokedex > catch raichu
Throwing a Pokeball at raichu...
raichu was caught!
Pokedex > inspect raichu
Name: raichu
Height: 8
Weight: 300
Stats:
- hp: 60
- attack: 90
...
Types:
- electric
Pokedex > pokedex
You have caught these Pokemon:
- raichu
- pikachu
Pokedex > exit
- Catching success depends on the Pokémon's base experience (easier for lower values)
- No persistence – your Pokédex is in-memory only (resets on exit)
- All API calls are cached to reduce load on PokéAPI
Feel free to open issues or pull requests! Ideas for improvements:
- Persistent storage (JSON file or SQLite)
- More commands (e.g., battles, evolution info)
- Colorful output with third-party libraries
Enjoy your Pokémon adventure in the terminal! 🐾