A Pokémon encyclopedia in your terminal! This interactive command-line application allows you to explore the Pokémon world, discover Pokémon in different location areas, catch them, and build your own Pokédex.
- Explore the Pokémon world: Navigate through different location areas
- Discover Pokémon: Find which Pokémon inhabit each area
- Catch 'em all: Try your luck at catching Pokémon (higher-level Pokémon are harder to catch!)
- Build your Pokédex: Keep track of all the Pokémon you've caught
- Inspect Pokémon: View detailed information about your caught Pokémon
- Caching system: Efficient data management with timed cache to reduce API calls
- Go 1.24 or higher
-
Clone the repository:
git clone https://github.com/arduriki/pokedexcli.git
-
Navigate to the project directory:
cd pokedexcli
-
Build the application:
go build
-
Run the application:
./pokedexcli
- Start the application by running
./pokedexcli
in your terminal - You'll be greeted with a
Pokedex >
prompt - Type
help
to see all available commands - Use
map
to view location areas you can explore - Use
explore [location-name]
to see which Pokémon are in that area - Try to catch Pokémon with
catch [pokemon-name]
- View your caught Pokémon with
pokedex
- Inspect a caught Pokémon's details with
inspect [pokemon-name]
Command | Description | Example |
---|---|---|
help |
Displays all available commands | help |
exit |
Exits the Pokedex application | exit |
map |
Shows the next 20 location areas | map |
mapb |
Shows the previous 20 location areas | mapb |
explore |
Lists Pokémon in a specified area | explore pallet-town |
catch |
Attempts to catch a Pokémon | catch pikachu |
inspect |
Shows details of a caught Pokémon | inspect pikachu |
pokedex |
Lists all caught Pokémon | pokedex |
Pokedex > map
canalave-city-area
eterna-city-area
pastoria-city-area
sunyshore-city-area
sinnoh-pokemon-league-area
...
Pokedex > explore eterna-city-area
exploring eterna-city-area...
Found Pokemon:
- glameow
- stunky
- bronzor
- rapidash
Pokedex > catch glameow
Throwing a Pokeball at glameow...
glameow was caught!
You may now inspect it with the inspect command
Pokedex > inspect glameow
Name: glameow
Height: 5
Weight: 39
Stats:
- hp: 49
- attack: 55
- defense: 42
- special-attack: 42
- special-defense: 37
- speed: 85
Types:
- normal
Pokedex > pokedex
Your Pokedex:
- glameow
This application uses the PokeAPI to fetch data about Pokémon and location areas. It implements a simple caching system to reduce API calls and improve performance.
When catching Pokémon, the success rate is influenced by the Pokémon's base experience - powerful Pokémon are harder to catch!
- Update the CLI to support the "up" arrow to cycle through previous commands
- Simulate battles between Pokémon
- Add more unit tests
- Refactor code for better organization and testability
- Keep Pokémon in a "party" and allow them to level up
- Allow caught Pokémon to evolve after a set amount of time
- Persist a user's Pokédex to disk to save progress between sessions
- Make exploration more interactive with directional choices
- Implement random encounters with wild Pokémon
- Add support for different types of Poké Balls with varying catch rates
Contributions are welcome! Feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Data provided by PokeAPI
- Inspired by the Pokémon game series