@narumitw/pi-nyaa

Pi extension for querying public metadata from nyaa.si and sukebei.nyaa.si.

Packages

Package details

extension

Install @narumitw/pi-nyaa from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@narumitw/pi-nyaa
Package
@narumitw/pi-nyaa
Version
0.1.6
Published
May 6, 2026
Downloads
85/mo · 12/wk
Author
narumitw
License
MIT
Types
extension
Size
23.5 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "extensions/nyaa.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-nyaa

Project-local pi extension for querying public metadata from:

The extension registers two tools:

  • nyaa_search — searches RSS metadata and returns titles, categories, size, dates, swarm counts, comments, and view-page URLs.
  • nyaa_view — fetches one /view/<id> page and returns public metadata, description, and file list.

The tools intentionally do not return torrent download links or magnet links.

Install / load

Install from npm

This extension is published as an npm pi package:

pi install npm:@narumitw/pi-nyaa

This installs @narumitw/pi-nyaa into your global pi settings, so nyaa_search and nyaa_view are available in all pi sessions.

To install it only for the current project, write it to the project-local .pi/settings.json instead:

pi install -l npm:@narumitw/pi-nyaa

After installing, restart pi. If pi is already running, use:

/reload

You can also load the npm package for a single run without installing it:

pi -e npm:@narumitw/pi-nyaa

Load from this repository

This repository also places the extension in pi's conventional package path:

extensions/nyaa.ts

Start pi from this repository, then run /reload if pi was already open.

For a one-off run from another directory:

pi -e /home/narumi/workspace/pi-nyaa/extensions/nyaa.ts

Examples

Ask pi:

Use nyaa_search to search for "ばにぃうぉ~か~", sort by seeders, and list the top 5 results.
Use nyaa_search on nyaa to search for "frieren", sort by seeders, and list the top 5 results.
Use nyaa_view for nyaa id 2097677. Do not include the description; only list category, size, and files.
Use nyaa_search on sukebei to search for "test" with limit 3.

Notes

  • site accepts nyaa or sukebei; nyaa_search defaults to sukebei when omitted.
  • sukebei is the adult index; pass site: "nyaa" for the non-adult index.
  • category accepts raw Nyaa category IDs such as 0_0 or 1_2.
  • Search output is capped at 50 items and tool output is truncated to pi's default limits.