https://github.com/durocodes/pokefetch
Display a random Pokémon from the PokéAPI in your terminal.
https://github.com/durocodes/pokefetch
Last synced: 6 months ago
JSON representation
Display a random Pokémon from the PokéAPI in your terminal.
- Host: GitHub
- URL: https://github.com/durocodes/pokefetch
- Owner: DuroCodes
- Created: 2024-06-06T17:15:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-01T06:48:49.000Z (11 months ago)
- Last Synced: 2024-07-05T17:44:55.394Z (11 months ago)
- Language: Go
- Homepage:
- Size: 4.33 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PokéFetch
Displays a random Pokémon from the PokéAPI in your terminal.
## Usage
1. Clone the repository.
2. Run the following command in the root directory of the repository to build for your system:```sh
go build
```3. Run the following command to display a random Pokémon:
```sh
./pokefetch # or pokefetch.exe on Windows
```## Flags
- `-id`: The ID of the Pokémon to display (default: random).
- If this is provided, it takes precedence over the `-name` flag.
- `-name`: The name of the Pokémon to display (default: random).
- If both `-id` and `-name` are provided, `-id` takes precedence.
- `-shiny`: The chance of the Pokémon being shiny (default: 0.5).
- This is a float between 0 and 1.## Terminal Startup
You can add this to your shell's startup script to display a random Pokémon every time you open a new terminal window.
For example, for `.zshrc`:
```sh
# Display a random Pokémon on terminal startup (but not in VSCode)
if [ "$TERM_PROGRAM" != "vscode" ]
then
.local/bin/pokefetch
fi
```