Skip to content

A CLI tool written in Go that allows you to view data about Pokémon from the terminal.

License

Notifications You must be signed in to change notification settings

digitalghost-dev/poke-cli

Repository files navigation

pokemon-logo

Pokémon CLI

version-label docker-image-size ci-status-badge
tests-label go-version codecov

Overview

poke-cli is a hybrid of a classic CLI and a modern TUI tool for viewing data about Pokémon! This is my first Go project.

The architecture behind how the tool works is straight forward:

  1. Each command indicates which API endpoint to use.
  2. Flags provide more information and can be stacked together or used individually.
  3. Each command has a -h | --help flag that is built-in with Golang's flag package.

View future plans in the Roadmap section.


Demo

demo


Install

Binary

Download a pre-built binary

  1. Head to the releases page of the project.
  2. Choose a version to download. The latest is best.
  3. Choose an operating system and click on the matching zipped folder to start the download.
  4. Extract the folder. The tool is ready to use.
  5. Either change directories into the extracted folder or move the binary to a chosen directory.
  6. Run the tool!

Important

For macOS, you may have to allow the executable to run as it is not signed. Head to System Settings > Privacy & Security > scroll down and allow executable to run.

View Image of Settings

settings

Example usage

# Windows
.\poke-cli.exe pokemon charizard --types --abilities
 
# Unix
.\poke-cli pokemon vespiquen -t -a

Docker Image

Use a Docker Image

  1. Install Docker Desktop.
  2. Once installed, use the command below to pull the image and run the container!
    • --rm: Automatically remove the container when it exits.
      • Optional.
    • -i: Interactive mode, keeps STDIN open for input.
      • Necessary.
    • -t: Allocates a terminal (TTY) for a terminal-like session.
      • Necessary.
docker run --rm -i -t digitalghostdev/poke-cli:v0.12.2 <command> [subcommand] flag]

Go Install

If you have Go already, install the executable yourself

  1. Run the following command:
    go install github.com/digitalghost-dev/poke-cli@latest
  2. The tool is ready to use!

Usage

By running poke-cli [-h | --help], it'll display information on how to use the tool.

╭─────────────────────────────────────────────────────────╮
│Welcome! This tool displays data related to Pokémon!     │
│                                                         │
│ USAGE:                                                  │
│    poke-cli [flag]                                      │
│    poke-cli <command> [flag]                            │
│    poke-cli <command> <subcommand> [flag]               │
│                                                         │
│ FLAGS:                                                  │
│    -h, --help      Shows the help menu                  │
│    -l, --latest    Prints the latest version available  │
│    -v, --version   Prints the current version           │
│                                                         │
│ COMMANDS:                                               │
│    ability         Get details about an ability         │
│    natures         Get details about Pokémon natures    │
│    pokemon         Get details about a specific Pokémon │
│    types           Get details about a specific typing  │
╰─────────────────────────────────────────────────────────╯

Roadmap

Below is a list of the planned/completed commands and flags:

  • ability: get data about a specific ability.
    • -p | --pokemon: display Pokémon that learn this ability.
  • berry: get data about a specific berry.
  • move: get data about a specific move.
    • -p | --pokemon: display Pokémon that learn this move.
  • natures: get data about natures.
  • pokemon: get data about a specific Pokémon.
    • -a | --abilities: display the Pokémon's abilities.
    • -i | --image: display a pixel image of the Pokémon.
    • -s | --stats: display the Pokémon's base stats.
    • -t | --types: display the Pokémon's typing.
    • -m | --moves: display learnable moves.
  • search: search for a resource (ability, berry, pokemon, move)
  • speed: compare speed stats between two Pokémon.
  • types: get data about a specific typing.