Skip to content

A command-line interface (CLI) application that allows users to search and explore Pokémon data, including details like stats, abilities, and types, directly from the terminal.

License

Notifications You must be signed in to change notification settings

tsyrdev/cli-pokedex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cli-Pokedex: A CLI Tool That Interacts With the PokéAPI

License: MIT

Overview

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.

How to Install and Run

Prerequisites

  • Go must be installed (download it from golang.org).
  • Ensure your $GOPATH/bin is in your system's PATH.

Option 1: Install the binary (Recommended)

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.

Option 2: Build from source

  1. Clone the repo:
git clone https://github.com/tsyrdev/cli-pokedex.git
cd cli-pokedex
  1. Build the project:
go build -o pokedex ./cmd/cli-pokedex/
  1. Run the tool locally:
./pokedex
  1. If you want to run it globally, move the binary to your $GOPATH/bin:
mv pokedex ~/go/bin

How to Use it

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

Credits

This project idea comes from a Go tutorial on Boot.dev

License

This project is licensed under the MIT License

About

A command-line interface (CLI) application that allows users to search and explore Pokémon data, including details like stats, abilities, and types, directly from the terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages