gokedex-cli : pokedex CLI written in Golang fetching from pokeapi.co. GOtta Catch 'Em All!
Overview
Install
go get github.com/brunopma/gokedex-cli
Build
After installing the package, just go to the project root and write:
go build .
Download
Pre-built binary file for UNIX of this project can be downloaded from Releases page
Usage:
- Fetching pokemon by name:
$ ./gokedex-cli -n charmander
#4
Name: Charmander
Height: 0.6m
Weight: 8.5Kg
Types: fire
Abilities: blaze / solar-power
$ ./gokedex-cli -i 91
#91
Name: Cloyster
Height: 1.5m
Weight: 132.5Kg
Types: water / ice
Abilities: shell-armor / skill-link / overcoat
- Displaying result as JSON:
$ ./gokedex-cli -n bulbasaur -o json
{"abilities":[{"ability":{"name":"overgrow","url":"https://pokeapi.co/api/v2/ability/65/"},"is_hidden":false,"slot":1},{"ability":{"name":"chlorophyll","url":"https://pokeapi.co/api/v2/ability/34/"},"is_hidden":true,"slot":3}],"height":7,"id":1,"name":"bulbasaur","types":[{"slot":1,"type":{"name":"grass","url":"https://pokeapi.co/api/v2/type/12/"}},{"slot":2,"type":{"name":"poison","url":"https://pokeapi.co/api/v2/type/4/"}}],"weight":69}
$ ./gokedex-cli --help
Usage of ./gokedex-cli:
-i int
Pokemon ID to fetch, currently there's 807 available pokemon!
-n string
Pokemon ID to fetch (default "text")
-o string
Print output in format: text/json (default "text")
-t int
Client timeout in seconds (default 30)