Skip to Content
Documentation

CLI reference

Commands, global flags, defaults, and exit codes for the Rust CLI.

Syntax and help

nekostream [GLOBAL_OPTIONS] [COMMAND]
nekostream help
nekostream COMMAND --help

With no command in an interactive terminal, NekoStream opens the menu. With no arguments and noninteractive input, it prints the legacy introduction. Use nekostream help for the complete command list; root --help preserves the legacy help layout. --version and -v print the installed version.

Uppercase values such as ANIME_ID, EPISODE_ID_OR_URL, GENRE_ID, PATH, KEY, and VALUE below are placeholders. Use IDs returned by the same selected provider.

Global flags

FlagDefaultPurpose
--jsonOffStructured output with schemaVersion: 1
--provider PROVIDERanimevietsubSelect animevietsub or anime47
--data-dir PATHEnvironment, then user data directoryOverride data storage location
--player-dir PATHEnvironment, then bundle discoverySelect a matching native player bundle
--base-url ORIGINSaved origin/discoveryOverride provider origin for this invocation

Global flags can be supplied before or after subcommands. The saved defaultProvider is used for the menu, not the default for individual commands. See configuration for environment variables and precedence.

Discovery and playback

CommandOptions and behavior
search QUERYSearch the selected provider
catalog--section latest|trending|upcoming (default latest); --page N (default 1, minimum 1)
detail ANIME_ID--enrich requests optional metadata
episodes ANIME_IDList provider episodes
servers EPISODE_ID_OR_URLList available servers
resolve EPISODE_ID_OR_URL--server SELECTOR (default HDX); resolve without opening a window
watch ANIME_ID--episode N, --server SELECTOR, --quality LABEL

SELECTOR is a case-insensitive server-name match or a one-based list position. Supply both --episode and --server when watch is noninteractive or uses --json. Playback still opens a desktop window. Source availability and quality selection are explained in playback.

Scraping

CommandOptions
scrape home--section latest|trending|upcoming (default latest), --page N (default 1, minimum 1)
scrape scheduleAggregate schedule; unsupported by Anime47
scrape genresList genres
scrape genre GENRE_ID--page N (default 1, minimum 1)
scrape catalogOptions below
Catalog export flagDefaultRange
--section SECTIONlatestlatest, trending, upcoming
--start-page N1Minimum 1
--max-pages N51–1000
--concurrency N21–4
--jsonlOffStream one item envelope per line

See automation for output shapes, partial results, and resume.

Accounts and local data

CommandOptions and behavior
auth loginOpen an interactive browser login
auth statusInspect the selected provider's saved session status
auth logoutRemove that provider's local session
account KIND--page N (default 1, minimum 1), --all (up to 100 pages)
history listRead local viewing history
history clear--yes confirms deletion without prompting
settings showRead active settings
settings set KEY VALUEChange a supported preference
settings reset--yes confirms reset without prompting

KIND accepts favorites, history, following, watching, completed, plan_to_watch, on_hold, dropped, and notifications; support varies by provider. See accounts and history and configuration for supported lists and writable keys.

Diagnostics and updates

CommandOptions and behavior
domains--refresh requests fresh discovery
doctorReport CLI, data directory, browser, and native bundle discovery
runtime statusReport the same environment status as doctor
runtime installVerify the existing native bundle; no download
updateInstall the latest native release and restart
update --checkCheck availability only; alias --check-only

Inspect playerStatus for runtime health and checkFailed for update checks. See troubleshooting for interpreting these fields.

Exit codes

CodeMeaning
0Command completed
1Runtime or network error
2Invalid arguments or deferred provider
3Login required
4Anime, episode, or stream not found
130Cancelled

Data is written to stdout. Diagnostics, progress, and errors are written to stderr. Use automation for the JSON contract.

On this page