The cli-pokedex tool allows the user to look up data on different Pokémon and locations, with a few game-like features. It is written in Go due to its simplicity, efficiency, and built-in support for handling HTTP requests. Go's concurrency model also ensures smooth and fast execution, even when making multiple API calls.
Additionally, Go's lightweight binaries and cross-platform compatibility make it an excellent choice for a CLI-based application, enabling fast performance and easy distribution.
You can fork the project and add custom commands or modify existing ones as needed.
- Go must be installed (download it from golang.org).
- Ensure your
$GOPATH/bin
is in your system'sPATH
.
Run the following command to install the binary globally:
go install github.com/tsyrdev/cli-pokedex/cmd/pokedex@latest
Once installed, you can run the tool using pokedex
.
- Clone the repo:
git clone https://github.com/tsyrdev/cli-pokedex.git
cd cli-pokedex
- Build the project:
go build -o pokedex ./cmd/cli-pokedex/
- Run the tool locally:
./pokedex
- If you want to run it globally, move the binary to your
$GOPATH/bin
:
mv pokedex ~/go/bin
The cli-pokedex
tool supports 7 commands. You can see available commands by using the the help
command:
Pokedex > help
Welcome to the Pokedex!
Usage:
mapb: Get the previous page of locations
explore <location_name>: Explore a location
catch <pokemon_name>: Try to catch a pokemon
inspect <pokemon_name>: Inspect one of the pokemons you've caught
pokedex: Display your Pokémon
exit: Exit the Pokedex
help: Get help
map: Get the next page of locations
This project idea comes from a Go tutorial on Boot.dev
This project is licensed under the MIT License