Skip to content

hcourt/pokecli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pokecli

Command line interface (CLI) for PokéAPI, written in Go using pokeapi-go. Supports PokeAPI v2.

Documentation

Full API documentation can be found at pokeapi.co.

Getting Started

Build the pokecli binary from source:

$ make

Then run:

$ pokecli

Usage

$ pokecli -h
A simple command line interface wrapper for PokéAPI written by
                hcourt in Go using pokeapi-go.
                Complete documentation is available at https://pokeapi.co

Usage:
  pokecli [command]

Available Commands:
  help        Help about any command
  search      Search for entities by type and name
  show        Show information about an entity

Flags:
  -h, --help      help for pokecli
  -v, --verbose   enable logging

Use "pokecli [command] --help" for more information about a command.

Operations

search - Search for entities

Search takes a type (-t) and one or more search strings, and prints a list of matching entities.

Examples
$ pokecli search -t pokemon saur
bulbasaur
ivysaur
venusaur
venusaur-mega
$ pokecli search -t move thunder
thunder-punch
thunder-shock
thunderbolt
thunder-wave
thunder
thunder-fang
10-000-000-volt-thunderbolt

With multiple search strings:

$ pokecli search -t pokemon foo leo
foongus
mienfoo
charmeleon
kecleon
sealeo
empoleon
litleo
solgaleo

show - Show an Entity

Show takes a type (-t) and a single name or ID number, and prints a simple summary of the entity.

Examples
$ pokecli show -t pokemon bulbasaur
bulbasaur (#1) [poison grass]
$ pokecli show -t move flamethrower
flamethrower (class: special, type: fire, power: 90, accuracy: 100)

Using an ID number:

$ pokecli show -t pokemon 100
voltorb (#100) [electric]

effect - Check the Type Effectiveness of a Move

Effect takes a pokemon (-p) and a move (-m), and prints a message about the effectiveness of that move's type on the defending pokemon. If the move is non-damaging it will return that information instead. Use (-v) to get a more detailed answer.

Examples
$ pokecli effect -v -m rock-slide -p charizard
If a rock move attacks a [flying fire] pokemon, the damage is double super effective.
$ pokecli effect -v -m flamethrower -p bulbasaur
If a fire move attacks a [poison grass] pokemon, the damage is super effective.
$ pokecli effect -v -m shadow-ball -p beedrill
  If a ghost move attacks a [poison bug] pokemon, the damage is effective.
$ pokecli effect -v -m body-slam -p steelix
If a normal move attacks a [ground steel] pokemon, the damage is not very effective (50%).
$ pokecli effect -v -m solar-beam -p dialga
If a grass move attacks a [dragon steel] pokemon, the damage is not very effective (25%).
$ pokecli effect -v -m thunder -p geodude
If a electric move attacks a [ground rock] pokemon, the damage is not effective.

Non-damaging moves:

$ pokecli effect -v -m hypnosis -p snorlax
Move is a status move and will not cause typed damage.

About

Command line interface for PokéAPI, written with pokeapi-go https://github.com/mtslzr/pokeapi-go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published