An interactive command-line Pokedex built in Go that uses HTTP requests to fetch Pokemon and location data from PokeAPI. Explore locations, catch Pokemon with different Pokeball types, manage your ball inventory, and grow your collection. An in-memory cache reduces redundant API requests and speeds up repeated commands.
Requires Go. Install it @ go.dev.
go install github.com/andrefetch/pokedex@latest
pokedexgit clone https://github.com/andrefetch/pokedex.git
cd pokedex
go build -o pokedex .
./pokedex- Run
pokedexin your terminal. - You should see the
Pokedex >prompt. - Enter
helpto display all available commands. - Use
mapto browse locations andexplore <area-name>to discover Pokemon. - Use
catch <pokemon-name> <ball-type>to attempt a catch.
Enter these commands at the Pokedex prompt, replacing the placeholders with a location and Pokemon you find:
map
explore <area-name>
catch <pokemon-name> pokeball
inspect <pokemon-name>
pokedex
Each catch attempt consumes a ball, whether it succeeds or fails. Use inspect after a successful catch to view the Pokemon’s details.
Supported ball types: pokeball, greatball, ultraball, and masterball. You must have the selected ball in your inventory to use it.
Your ball inventory and caught Pokemon are stored in memory and reset when you exit.
