#download #tui #torrent #cli #cli-tool

app nyaa

A tui tool for browsing and downloading torrents from nyaa.si

11 releases (6 breaking)

0.8.0 Apr 4, 2024
0.7.0 Mar 21, 2024
0.6.3 Mar 4, 2024
0.6.2 Feb 29, 2024
0.1.0 Nov 18, 2023

#523 in Command line utilities

Download history 5/week @ 2024-01-29 4/week @ 2024-02-05 20/week @ 2024-02-12 200/week @ 2024-02-19 498/week @ 2024-02-26 160/week @ 2024-03-04 82/week @ 2024-03-11 138/week @ 2024-03-18 157/week @ 2024-03-25 248/week @ 2024-04-01 47/week @ 2024-04-08 31/week @ 2024-04-15

486 downloads per month

GPL-3.0-or-later

3.5MB
4K SLoC

nyaa πŸˆβ€β¬›

A simple TUI for browsing and downloading anime torrents from nyaa.si.


animated

Table of Contents

⚑ Installation

With cargo

cargo install nyaa

On Arch Linux (AUR)

yay -S nyaa

or

yay -S nyaa-bin

Using nix (flakes)

Run without installing

nix run github:Beastwick18/nyaa

Install (via home-manager)

Add to inputs in flake.nix

nyaa = {
    url = "github:Beastwick18/nyaa";
    inputs.nixpkgs.follows = "nixpkgs";
};

Add to home.nix

home.packages = [ inputs.nyaa.packages.x86_64-linux.default ];

Install (via nix profile)

nix profile install github:Beastwick18/nyaa

Ubuntu/Debian

Download the .deb file from the latest release and install with apt:

sudo apt install ./nyaa-VERSION-x86_64.deb

or dpkg

sudo dpkg -i ./nyaa-VERSION-x86_64.deb

Windows/Linux Binaries

Binaries for Linux and Windows are available on the releases page.

From Source

To build from source, you must have both git and cargo installed.

git clone https://github.com/Beastwick18/nyaa
cd nyaa
cargo install --path .

⌨️ Keybinds

Like modal text editors such as Vim, there are several modes. Each have their own keybinds, which can be found out by pressing F1 or ? while in that mode. Some of the important ones are:

  • hjkl or arrow keys for general navigation
  • / or i to search
  • c to open category popup
  • s to open sort popup
  • f to open filter popup
  • t to open theme popup
  • n, p or l, h for next and previous page
  • q to quit

For a list of all modes and their respective keybinds, check Keybinds on the wiki.

🌐 Proxies

If nyaa.si is not accessible in your region, try one of the proxies. Once you find one that works, replace the value for base_url in the default config with the working proxy url. I would recommend nyaa.land, as it is very compatible, and usually working. Here's what the config for nyaa.land would look like:

base_url = 'nyaa.land'

If you have your own proxy setup, you use it by adding:

request_proxy = "localhost:8118"

to your config. Replace the value with the IP and port for your proxy.

βš™οΈ Configuration

The location of the config file for linux is:

~/.config/nyaa/config.toml

and on windows is

C:\Users\%USERNAME%\AppData\Roaming\nyaa\config\config.toml

default_category = "AllCategories"
default_filter = "NoFilter"
default_sort = "Date"
default_search = ""
theme = "Default"
source = "NyaaHtml"
download_client = "transmission"
date_format = "%Y-%m-%d %H:%M"
base_url = "https://nyaa.si/"
request_proxy = "localhost:8118" # None by default
timeout = 30

# ...

default_category refers to the category selected by default when the app is opened. Possible values are defined in the Wiki.

default_filter refers to the filter selected by default when the app is opened. Possible values are NoFilter, NoRemakes, TrustedOnly or Batches.

default_sort refers to the sort selected by default when the app is opened. Possible values are Date, Downloads, Seeders, Leechers, or Size.

default_search refers to the search entered once the app is opened.

theme refers to the theme selected by default when the app is opened. Possible values are Default, Dracula, Gruvbox, or Catppuccin Macchiato. Custom themes coming soon!

source refers to the source selected by default once the app is opened. Possible values are NyaaHtml and NyaaRss.

download_client refers to the download client selected by default once the app is opened. Possible values are defined in the Wiki

date_format refers to the formatting of the dates in the Date column of the results table. Refer to chrono's documentation for information on how to format the date.

base_url refers to the url used to make requests. Change this to any nyaa mirror url in the format: http(s)://nyaa.si or nyaa.si

request_proxy refers to the url to proxy request through. This is not to be confused with nyaa proxies, which are defined with base_url.

timeout refers to how long the program will wait for a search request before it times out. This value is measured in seconds. You may want to increase this if your request times are usually long.

Download Client Integration

🎨 Custom Themes

Check the wiki for how to add User-defined Themes

πŸ—ΊοΈ Planned Features

  • Mouse support
  • Sources other than nyaa/Custom user-defined sources
  • User-defined themes
  • Integration with torrent clients
  • RPM Release
  • Nyaa proxies/mirrors support
  • Page navigation
  • Choice between HTML scraper or RSS feed

Dependencies

~21–40MB
~692K SLoC