Skip to content

mandriota/what-anime-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What Anime TUI

A TUI alternative to irevenko/what-anime-cli. Wrapper for trace.moe API.

Showcase

what-anime-tui-showcase.mp4

Installation

Download and install Go from go.dev, then enter the following command in your terminal:

go install github.com/mandriota/what-anime-tui@latest

You may also need to add go/bin directory to PATH environment variable. Enter the following command in your terminal to find go/bin directory:

echo `go env GOPATH`/bin

Using Homebrew

brew tap mandriota/mandriota
brew install what-anime-tui

Using npm

npm i what-anime-tui

Usage

what-anime-tui [-c=/path/to/your/config] [-q] [path]

Where

  • -c specifies the PATH to your configuration file
  • -q, if set, quits the program immediately after displaying first search result
  • path can be either URL or path to local file

These flags can be omitted and you can run:

what-anime-tui

Configuration

By default config is read from ~/.config/wat/wat.toml if -c flag is not set.

Default config:

[appearance]
# Specifies background color by hex or ANSI value.
# Examples:
# background = "#0F0"
# background = "#FF006F"
# background = "6"
background = "6"
# Specifies foreground color by hex or ANSI value.
foreground = "15"

[appearance.border]
# Specifies border foreground color by hex or ANSI value.
foreground = "15"

# Warning: this configuration parameter is unstable and can be changed at any moment
[fetcher]
# API URL to fetch by image/gif URL, which will be passed in the link in place of {{ .Path }}
apiUrlByUrl = "https://api.trace.moe/search?anilistInfo&url={{ .Path }}"
# API URL to fetch by image/gif file, which will be passed in "image" field in multipart
apiUrlByFile = "https://api.trace.moe/search?anilistInfo"