This project is a Command-Line Interface (CLI) Pokedex built using the Go programming language. It interacts with the Pokémon API (PokeAPI) to fetch data about Pokémon, their locations, abilities, and more. With this project I learned essential Go concepts such as HTTP requests, data parsing, and handling user inputs in a REPL (Read-Eval-Print Loop) environment.
-
Browse map locations
Browse over 1000 locations in the pokemon world. -
Catch Pokémon
Simulate catching Pokémon with a random chance based on their base experience. -
Pokedex
Display your catch pokemon in your pokedex. -
Interactive REPL (Read-Eval-Print Loop)
Engage with the Pokedex in an interactive shell environment. -
Caching
Speed up subsequent searches by caching results locally. -
HTTP Integration
Fetch live Pokémon data from a public API. -
Custom Commands
Use specialized commands for advanced queries or help options.
By the end of this project, you will:
- Understand and make HTTP requests in Go.
- Implement a REPL interface.
- Learn how to cache API responses.
- Enhance your understanding of Go's standard library.
- Build a fully functional command-line tool.
- Clone the repository:
git clone https://github.com/yourusername/pokedex-cli.git
- Navigate to the project directory:
cd pokedex-cli - Install dependencies (if any):
go mod tidy
- Run the application:
go run main.go
-
Start the Pokedex CLI:
Run the application and follow the interactive prompts. -
Available Commands:
map: Get the next page of locations.mapb: Get the previous page of locations.explore: Get the next page of locations.catch: Attempt to catch a pokemon.inspect: View details about a caught Pokemon.pokedex: See all the pokemon you've caught.help: List all available commands.exit: Exit the application.
- Go: The primary programming language.
- HTTP Requests: To fetch Pokémon data.
- REPL: For interactive command handling.
- Caching: To optimize performance.
This is a personal project to learn go, but feel free to clone the repository.
Developed by Jaime
“Gotta code ‘em all!”