npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@get-air/stremio-addon-client

v0.1.0

Published

Safe Promise and Effect client for consuming Stremio addons

Readme

@get-air/stremio-addon-client

CI npm

A safe, fully typed client for consuming remote Stremio addon protocol endpoints. It does not build addons, execute addon code, maintain an installed-addon list, or persist addon configuration.

The root API uses ordinary Promises and plain TypeScript values:

import { StremioAddon, isStremioAddonError } from "@get-air/stremio-addon-client"

const addon = await StremioAddon.connect("https://example.com/manifest.json")

try {
  const { streams } = await addon.streams("movie", "tt1254207")
  console.log(streams)
} catch (error) {
  if (isStremioAddonError(error)) console.error(error._tag, error.message)
}

Effect applications import the same implementation from the explicit entrypoint:

import { Effect } from "effect"
import { StremioAddon } from "@get-air/stremio-addon-client/effect"

const program = Effect.gen(function* () {
  const addon = yield* StremioAddon.connect("https://example.com/manifest.json")
  return yield* addon.streams("movie", "tt1254207")
})

Protocol coverage

  • Manifest discovery from a base URL, manifest.json URL, or stremio:// install URL.
  • Catalog, metadata, stream, subtitle, and addon-catalog resources.
  • Manifest capability checks before resource requests.
  • Correct path encoding and deterministic catalog/subtitle extras.
  • Runtime validation of untrusted manifest and resource JSON.

Safety

HTTPS is required by default. Credentials in URL authorities and literal private-network/localhost targets are rejected. Applications may restrict requests further with allowedOrigins or urlPolicy. HTTP and private-network access can be enabled explicitly with allowHttp and allowPrivateNetwork for trusted local addons.

Requests have a 15-second default timeout and a 10 MiB response limit. Redirect destinations are checked against the same URL policy. Non-success status codes, invalid JSON, invalid protocol responses, timeouts, oversized bodies, and unsupported resources have distinct tagged errors.

This library validates protocol data; it does not decide whether a returned stream is legal, trusted, or safe to play. Applications should present P2P warnings and apply their own stream URL policy before playback.

Hostname checks cannot prevent DNS rebinding in a privileged server or desktop process. Applications accepting arbitrary addon URLs should enforce resolved-address policy in their injected transport as well.

Shared transport and Tauri

All networking uses @get-air/http:

import { makeTauriHttpTransport } from "@get-air/http/tauri"
import { StremioAddon } from "@get-air/stremio-addon-client"

const addon = await StremioAddon.connect(manifestUrl, {
  transport: makeTauriHttpTransport({
    connectTimeout: 10_000,
    maxRedirections: 5,
  }),
})

The consuming Tauri app must grant HTTP capabilities for the addon origins it allows.

Optional cache

Pass any @get-air/cache CacheStore. Only validated HTTP response bodies are cached; addon registrations and configuration are never stored. Cache failures are fail-open and can be observed with onCacheError.

import { TauriCacheStore } from "@get-air/cache/tauri"

const cache = await TauriCacheStore.make("air-cache.json")
const addon = await StremioAddon.connect(manifestUrl, { cache })

Cache keys contain SHA-256 URL digests rather than configured addon URLs, so path-based addon credentials are not exposed in persistent keys.

Research basis

The implementation follows the official Stremio addon protocol and SDK response definitions. It also incorporates behavior found in the official addon client, Harbor, and Cremio: capability checks, abortable timeouts, bounded JSON reads, cache-control support, and tolerance for common community-addon response variations.