poke-cli

command module
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 10 Imported by: 0

README

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


Installation

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 ability airlock --pokemon

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.
  3. Choose how to interact with the container:
    • Run a single command and exit:
    docker run --rm -it digitalghostdev/poke-cli:v1.2.2 <command> [subcommand] flag]
    
    • Enter the container and use its shell:
    docker run --rm -it --name poke-cli --entrypoint /bin/sh digitalghostdev/poke-cli:v1.2.2 -c "cd /app && exec sh"
    # placed into the /app directory, run the program with './poke-cli'
    # example: ./poke-cli ability swift-swim
    

Homebrew

brew tap digitalghost-dev/poke-cli
brew install poke-cli

# verify
poke-cli -v

Source

  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          │
│    move            Get details about a move              │
│    natures         Get details about all natures         │
│    pokemon         Get details about a Pokémon           │
│    search          Search for a resource                 │
│    types           Get details about a typing            │
│                                                          │
│ hint: when calling a resource with a space, use a hyphen │
│ example: poke-cli ability strong-jaw                     │
│ example: poke-cli pokemon flutter-mane                   │
╰──────────────────────────────────────────────────────────╯

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.
  • item: get data about a specific item.
  • 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.

Tested Terminals

OS Terminal Status Issues
macOS Ghostty None
macOS Alacritty None
macOS HyperJS None
macOS iTerm2 None
macOS macOS Terminal ⚠️ Images do not render properly
Windows Windows Terminal None
Ubuntu Standard Terminal None
Ubuntu Tabby None

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL