Skip to main content

nstream

Native, terminal-first Stremio alternative. No Electron, no embedded browser, no Node server — Python 3.13+ stdlib only, driving fzf, mpv, and optional cast/P2P CLIs over Stremio addon HTTP APIs.

Docs hub: docs/README.md

What it does

  1. Search / browse titles (Cinemeta and other catalog addons).
  2. Pick title and episode in a fzf TUI (or headless --json for scripts/agents).
  3. Optional subtitles (OpenSubtitles v3 + alignment; ADR 0020).
  4. Fetch streams from Torrentio and/or extra manifests (Comet, MediaFusion, … — ADR 0024).
  5. Rank & filter for your GPU or Chromecast (hardware-aware + cast-aware).
  6. Play in mpv and/or cast (castbridge / catt / remux / mirror).
  7. Resume and continue-watching; series binge with next-episode overlay.

Playback backends: local P2P (TorrServer, default), debrid (eight Torrentio providers), auto hybrid, or native provider API (TorBox / Premiumize). See docs/user/config.md.

Why

The Stremio Flatpak beta (Rust shell) crashes on Wayland/Hyprland (ozone-X11 Missing X server); the Qt build is heavy. nstream reuses the Stremio addon ecosystem with a fraction of the footprint and native mpv / Cast integration.

Requirements

Packages
Required python3 ≥ 3.13 (zero third-party deps), mpv, fzf
Strongly recommended ffmpeg/ffprobe (tracks, remux), foot (desktop launcher)
Optional catt (cast discovery/fallback), chafa (posters), vainfo/libva-utils (HW ranking), TorrServer (local P2P)
Optional native cast castbridge ($CASTBRIDGE_BIN), mirror sender ($CAST_MIRROR_BIN) — openscreen-fork builds; fallback without them

Install/dev tooling: uv.

Install

Method Command Notes
From source (dev) ./install.sh uv tool install → ~/.local/bin/nstream
PyPI pipx install nstream or uv tool install nstream
Git uv tool install git+https://github.com/gianlucamazza/nstream tagged releases too: …@vX.Y.Z
AUR yay -S nstream source package
Arch (local) cd packaging && makepkg -si from the GitHub source tarball

nstream does not host, index, or distribute video files. Catalogs, stream addons, and debrid backends are configured by the user. Use only sources you are entitled to access.

The Arch package installs binaries + desktop entry + config.example.json under /usr/share/nstream/; it does not write $HOME. ./install.sh bootstraps ~/.config/nstream/config.json from the example when missing.

Quickstart

# 1) Config (defaults = local P2P; no paid service)
#    For debrid: set playback_backend to "debrid" and put the key in torrentio_base —
#    see docs/user/config.md
nstream --settings

# 2) Play
nstream "the matrix"          # TUI search → Enter plays best stream
nstream --cast "dune"         # Chromecast
nstream --json --cast "dune"  # headless JSON for scripts/agents

Full config tables: docs/user/config.md.
TUI keys: docs/user/tui.md.
Cast guide: docs/user/cast.md.
Headless contract: docs/headless.md.

Develop

uvx ruff check . && uvx ruff format --check .
uvx ty check
uv run python -m pytest          # not bare pytest — see CONTRIBUTING.md
uv run nstream "the matrix"

Contributor guide: CONTRIBUTING.md.
Module map: docs/architecture.md.
Stream ranking: docs/selection.md.
Decisions: docs/adr/.

Usage

# Interactive
nstream "the matrix"              # search; Enter = auto-play; Tab = manual
nstream                           # continue-watching or prompt
nstream --cast "dune"             # cast (castbridge, else catt)
nstream --mirror "dune"           # realtime mirror (1080p SDR)
nstream --local "dune"            # force mpv when prefer_cast is on
nstream --play "dune"             # force auto-pick
nstream --subs / --sub-menu / --sub-lang eng …
nstream --sub-offset -2.5 …       # constant subtitle shift (seconds)
nstream --sub-fps 25:23.976 …     # framerate drift correction
nstream --browse [popolari|nuovi|top]
nstream --movies | --series …
nstream -c / --continue           # resume from history
nstream --no-history              # do not read/write watch history this run
nstream --no-autoplay             # skip next-episode overlay
nstream --settings
nstream --explain "dune"          # ranking dump, no play
nstream --quality 1080 "matrix"   # hard resolution filter (aliases: 4k, 720, auto)
nstream --forget-dead             # clear proven-gone denylist (ADR 0025)
nstream --forget-breakers         # clear per-addon circuit breakers (ADR 0027)
nstream --debrid-test INFOHASH    # native debrid diagnostics
nstream --debug / --version

# Headless (--json): one JSON object on stdout — see docs/headless.md
nstream --json --cast --device TV "dune"
nstream --json --cast --follow …          # JSONL until end
nstream --json --local "dune"
nstream --json --probe "dune"             # languages / resolutions (no play)
nstream --json --year 1999 --movies "X"
nstream --json --season 1 --episode 3 "Show"
nstream --json --audio-lang eng --quality 4k --cast "…"
nstream --json --stop | --status | --pause | --resume
nstream --json --seek 1250 | --volume 35
nstream --json --no-mirror --cast "…"
nstream --json -c "Show"                  # continue / next episode

Launcher: app menu → home (continue · search · watchlist · Film · Serie · settings).
Cheatsheet: docs/user/tui.md.

Logging & security

  • Log: $XDG_STATE_HOME/nstream/nstream.log (rotating); --debug / NSTREAM_DEBUG=1 → stderr.
  • Dead sources: $XDG_STATE_HOME/nstream/dead-sources.json (ADR 0025).
  • Debrid token only in config.json (chmod 600). Redacting formatter scrubs tokens from every log line including tracebacks. nstream never prints stream URLs.
  • mpv gets --no-resume-playback (nstream owns resume); URLs stay out of watch_later.

Diagnostics detail: docs/user/troubleshooting.md.

Documentation map

Doc Role
docs/README.md Audience hub
docs/user/config.md Every config key
docs/user/cast.md Chromecast delivery
docs/user/tui.md Menus & keys
docs/user/troubleshooting.md Failures & recovery
docs/headless.md --json contract
docs/selection.md How streams are chosen
docs/architecture.md Where code lives
docs/adr/ Why (ADRs)
docs/roadmap.md Non-goals & Proposed ADRs
CONTRIBUTING.md Dev workflow
CHANGELOG.md Release notes

License

MIT — see LICENSE.

Metadata

Release files for nstream 1.46.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nstream 1.46.0
File Size Uploaded Provenance Actions
nstream-1.46.0.tar.gz 994.4 kB With provenance Details for nstream-1.46.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nstream 1.46.0
File Interpreter ABI Platform Actions
nstream-1.46.0-py3-none-any.whl Python 3 none any Details for nstream-1.46.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / nstream-1.46.0.tar.gz

Download URL nstream-1.46.0.tar.gz
Size 994.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f4b375bb070012a1ec60647082317024c1f4e12c1307ba2c398897dfb8e0e16a
BLAKE2b-256 checksum
How to use checksums
0979837e8eff296a1d0c1a8e49511fb3d84e676d067fbb83a2809731587bd40b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / nstream-1.46.0-py3-none-any.whl

Download URL nstream-1.46.0-py3-none-any.whl
Size 368.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca1d1e39a8fd11dc443aae4b9afbe32e5f8d038c49dab1100791fe75585c7136
BLAKE2b-256 checksum
How to use checksums
692ef5ddd587720aee9610626f75b084a02bb0f9465c9eb9e3dbbe8aa181cdd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for nstream 1.46.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nstream-1.46.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page