CLI Reference
Every Kunai launch flag, bootstrap flow, and mpv option, synced directly from the CLI help text so the table never drifts from the binary you actually run.
Beta: what to know first
install.sh or install.ps1. They install a self-contained binary, so you need neither Bun nor Node. The Bun and npm installs also work; npm needs Node on PATH.Playback. You need mpv to play anything. Setup and browsing work without it.
Providers. Kunai is a client-side tool. It does not host, mirror or distribute video. Streams come from third-party providers it is not affiliated with, so use it in line with the law and each provider's terms. Providers change, which is what the recovery commands are for.
Kunai is a terminal-first CLI. Most day-to-day work happens inside the interactive shell after launch: history, provider pickers, recovery, and diagnostics are shell commands, not separate argv flags.
This page lists process flags parsed from kunai --help. For shell commands, see
Commands and shortcuts or the generated command table
on the Feature tour.
Install and run
| Command | When to use |
|---|---|
curl … | bash (install.sh) | Preferred end-user install (binary; no Bun required) |
npm install -g @kitsunekode/kunai | npm channel (Node launcher; no Bun required) |
bun install -g @kitsunekode/kunai | Bun global channel |
kunai | Open the interactive shell |
kunai -S "Title" | Bootstrap with a search query |
kunai -i 438631 -t movie | Open a known TMDB id (non-anime) |
kunai -a -S "Anime" | Anime mode with bootstrap search |
From a repo clone (contributor-oriented), use bun run dev -- <flags> so Bun forwards argv to the CLI.
Lifecycle maintenance
| Command | What it does |
|---|---|
kunai install | Install or reinstall (binary default) |
kunai upgrade | Primary channel-aware update |
kunai upgrade --check | Report whether an update is available |
kunai rollback | Roll back to the previous verified local version |
kunai rollback --list | List local verified rollback candidates |
kunai rollback --to <ver> | Roll back to an explicit verified version |
kunai doctor | Read-only install health (PATH, ownership) |
kunai doctor --json | Same report as JSON |
kunai doctor --strict | Exit non-zero on any warning, for scripts |
kunai uninstall | Ownership-aware removal |
kunai uninstall --purge | Also delete config/history/cache |
kunai diagnostics recent | Print recent redacted diagnostics from the cache DB |
kunai diagnostics recent
Prints the most recent diagnostic events Kunai recorded locally, already redacted, without launching the shell. Useful when attaching evidence to an issue.
kunai diagnostics recent # readable output, most recent first
kunai diagnostics recent --format jsonl # one JSON object per line
kunai diagnostics recent --format markdown # human-readable table
kunai diagnostics recent --limit 50 # cap how many events print
kunai diagnostics recent --no-color # readable output without colour--format accepts pretty, jsonl, or markdown. Without --format, Kunai
prints the readable pretty output to a terminal and jsonl when the output is
piped or redirected, so kunai diagnostics recent > report.jsonl and
kunai diagnostics recent | jq behave exactly as before.
Colour follows the terminal and turns off under NO_COLOR or --no-color. Use
--color to keep it through a pipe.
To stay readable, pretty shortens very long context values and says how much it
left out. --format jsonl and --format markdown always print them in full.
Events come from the local cache database; nothing is uploaded.
Shell completions
kunai completion <shell> prints a completion script for bash, zsh, fish,
or powershell. Completions cover every flag the parser accepts and every
maintenance subcommand.
| Shell | Install |
|---|---|
| bash | kunai completion bash > /etc/bash_completion.d/kunai |
| zsh | kunai completion zsh > "${fpath[1]}/_kunai" |
| fish | kunai completion fish > ~/.config/fish/completions/kunai.fish |
| PowerShell | kunai completion powershell >> $PROFILE |
For a quick trial without installing, evaluate it in the current session;
eval "$(kunai completion bash)" (bash/zsh), or
kunai completion powershell | Out-String | Invoke-Expression.
Launch flows
- Interactive: no bootstrap flags: the Ink shell opens and you search or pick from history.
- Bootstrap search:
-S/--search: runs the first search and lands on results. Does not auto-play unless you add--jumpor--quick. - Bootstrap a known id:
-i/--idskips the initial title search for that id. A bare ortmdb:<id>id needs-t movieor-t tv(tv = series) and is not supported together with anime mode (-a). Namespaced ids reuse the share-link grammar:anilist:<id>andmal:<id>imply anime mode,youtube:<id>implies YouTube mode;imdb:is rejected. - Anime mode:
-a/--anime: anime discovery and providers. - Continue watching:
--continue/--resume: newest unfinished local history entry. - History first:
--history: watch history picker at startup. - Offline library first:
--offline: completed downloads only (same intent as/library). - Discover / calendar / random:
--discover,--calendar,--random: open those trays first without auto-play. - Share link handoff:
--open <kunai://url>: trusted launch without protocol confirmation;--install-protocol-handlerregisters the Linux-only OS handler. - Playback picks:
-e/--episode <n>(plus--season <n>for series) starts at a specific episode instead of the resume point or starting menu;--quality,--audio,--sub,--duboverride the stream/track picks for this run only and never touchconfig.json.
Share links
| Flag / command | What it does |
|---|---|
kunai --open "kunai://play?..." | Resolve and play a shared catalog link |
kunai --install-protocol-handler | Register kunai:// with the OS (Linux-only) |
/share | Copy an HTTPS link for current playback context |
/share --qr | Show an HTTPS QR and copy the full link |
/watch | Open HTTPS, compact, or kunai:// clipboard data |
/up-next | Current playback order |
/downloads | Download queue overlay |
/library | Offline library |
More: Share links.
Download modes (do not confuse)
| Entry | What it does |
|---|---|
kunai --download -S "Title" | Download-only launch flag. Resolves a title, then runs the download flow and exits; no interactive shell queue UI. Requires -S or -i bootstrap. |
kunai --download -i 438631 -t movie | Same download-only path with a fixed TMDB id. |
/downloads in the shell | Queue overlay while the shell is running; queued, running, and failed jobs. |
/download during playback | Queue the current item for offline from inside a session. |
Launch flags
| Flag | Description |
|---|---|
| -S, --search | Search for a title on launch |
| -i, --id | Open a specific title id or namespaced catalog id |
| -t, --type | Content type for --id (tv = series) |
| -a, --anime | Anime mode (HiAnime default with provider fallback) |
| -y, --youtube | YouTube mode (YouTube provider) |
| --continue | Jump into Continue Watching |
| --resume | Jump into Continue Watching |
| --history | Open watch history |
| --offline | Offline library only (no provider calls) |
| --discover | Open recommendations |
| --calendar | Open the release calendar |
| --random | Open the random picks tray |
| --download | Download-only flow for a selected title (use with -S or -i; does not open the shell queue) |
| --onboarding | Run the guided onboarding wizard |
| --setup | Run the guided onboarding wizard |
| -m, --minimal | Minimal chrome |
| -z, --zen | Zen mode (bare, ani-cli-style) |
| --plain | Plain / screen-reader mode (no animation, no box art, text state) |
| -q, --quick | Quick layout |
| --jump | Auto-pick the n-th search result (1-based, with -S) |
| -e, --episode | Start at episode n (anime: absolute; series: S1) |
| --season | Season for --episode (series only) |
| --quality | Stream quality: best | 2160p | 1440p | 1080p | 720p | 480p |
| --audio | Audio track: original | en | ja | hi | pt | es | fr | de | dub |
| --sub | Subtitles: en | interactive | none | hi | pt | ar | de | es | fr | ja |
| --dub | Shortcut for --audio dub |
| --hdr | HDR mode: auto | passthrough | tone-map | sdr-only |
| --player | Player backend: desktop <auto|mpv>; Android/Termux <auto|mpv|vlc> |
| --mpv-debug | Verbose mpv logging |
| --mpv-clean | Ignore your mpv config for this run |
| --no-user-mpv-config | Same, explicit |
| --mpv-log-file | Write the mpv log to a file |
| --download-path | Override the download directory |
| --open | Open a trusted kunai:// share link |
| --install-protocol-handler | Register the Linux-only kunai:// URL handler |
| --handoff-url | Internal: open a kunai:// deep link |
| --dry-run | Print what would happen, change nothing |
| --json | Machine-readable JSON output (with -S, doctor, capabilities) |
| --debug | Verbose redacted logging to ./logs.txt |
| --debug-json | Debug + JSON event stream |
| --debug-session | Debug + full session trace |
| --support-bundle | Write a redacted local support bundle and exit |
| -h, --help | Show this help |
| -v, --version | Print the version |
mpv and diagnostics
- Player selection:
--playerchooses the backend for one run. Desktop accepts--player autoand--player mpv, both supervised mpv; desktop VLC is not supported. Android/Termux additionally accepts--player vlc:autoopens the chooser, whilempvandvlctarget those installed Android apps. - mpv:
--mpv-debug,--mpv-clean,--no-user-mpv-config,--mpv-log-file <path>forward into the player for this run. - Diagnostics:
--debugwrites verbose logs to./logs.txt.--debug-jsonand--debug-sessionadd structured traces for support bundles. - Dry run:
--dry-runprints the planned bootstrap without changing state.
Android handoff reports launch acceptance only. Kunai cannot observe external progress, completion, EOF, track changes, or player controls, so it does not infer history progress, autoplay, or queue acknowledgement from the intent.
Stremio addons
| Command | What it does |
|---|---|
kunai addons enable | Turn experimental addons on after accepting the risk (--accept-risk for non-interactive) |
kunai addons disable | Stop addon use at the next resolve; keeps the installed list and your acknowledgement |
kunai addons list | List the addons you added: number, name, host, provider id, status |
kunai addons add <url> | Add an addon by its https://…/manifest.json URL (--stdin reads it from stdin) |
kunai addons remove <n> | Remove an addon by its number, id, host or name |
kunai addons check [n] | Ask each addon for its manifest; exits non-zero if one cannot be used |
All addon actions accept --json and print one JSON object on stdout. While addons are off, list and check report disabled (experimental addons are off) per entry without contacting the addon, add refuses, and enable/disable emit experimentalStremioAddons plus whether anything changed. Unsupported flags, including --dry-run, are rejected before the command can change your config. No command prints an addon's full URL. See Stremio addons.
Providers
Production providers are registered in the CLI container and listed here for reference:
| Provider | Domain | Media | Description |
|---|---|---|---|
| Videasy videasy | videasy.to | movie, series | Registered movies/series adapter; source and subtitle inventory vary by titleKnown limitations (10)
|
| VidLink vidlink | vidlink.pro | movie, series | Movies and series with multi-language subtitlesKnown limitations (3)
|
| VidRock vidrock | vidrock.net | movie, series | Backup source for movies and series with direct video filesKnown limitations (8)
|
| Rivestream rivestream | rivestream.app | movie, series | Mirror-aggregator for movies/series; coverage varies by titleKnown limitations (1)
|
| Movy movy | movy.sx | movie, series | Movies and series via a multi-lane source aggregatorKnown limitations (4)
|
| AllManga allanime | mkissa.to | anime | Anime episodes in sub and dub — the ani-cli parity sourceKnown limitations (4)
|
| HiAnime hianime | hianime.at | anime | Anime episodes in sub and dub via HiAnime (ani-cli parity lane)Known limitations (6)
|
| Miruro miruro | www.miruro.bz | anime | Primary anime source — sub and dub from many backends behind one AniList-keyed pipeKnown limitations (14)
|
| AnimeGG animegg | www.animegg.org | anime | Independent anime source — direct MP4s, sub and dub, no AniList dependencyKnown limitations (9)
|
| KickAssAnime kickassanime | kaa.lt | anime | Independent anime source — HLS with separate subtitle tracks, sub and dubKnown limitations (9)
|
| YouTube youtube | youtube.com | video | YouTube via Invidious search and yt-dlp playbackKnown limitations (1)
|
Command and provider tables on this page are generated from the Kunai CLI (v0.4.0) at Nov 25, 2026, 1:10 AM UTC · source 74166e150304. Run bun run --cwd apps/docs generate after registry changes. Docs maintenance