CLI reference
Commands, global flags, defaults, and exit codes for the Rust CLI.
Syntax and help
nekostream [GLOBAL_OPTIONS] [COMMAND]
nekostream help
nekostream COMMAND --helpWith 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
| Flag | Default | Purpose |
|---|---|---|
--json | Off | Structured output with schemaVersion: 1 |
--provider PROVIDER | animevietsub | Select animevietsub or anime47 |
--data-dir PATH | Environment, then user data directory | Override data storage location |
--player-dir PATH | Environment, then bundle discovery | Select a matching native player bundle |
--base-url ORIGIN | Saved origin/discovery | Override 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
| Command | Options and behavior |
|---|---|
search QUERY | Search 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_ID | List provider episodes |
servers EPISODE_ID_OR_URL | List 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
| Command | Options |
|---|---|
scrape home | --section latest|trending|upcoming (default latest), --page N (default 1, minimum 1) |
scrape schedule | Aggregate schedule; unsupported by Anime47 |
scrape genres | List genres |
scrape genre GENRE_ID | --page N (default 1, minimum 1) |
scrape catalog | Options below |
| Catalog export flag | Default | Range |
|---|---|---|
--section SECTION | latest | latest, trending, upcoming |
--start-page N | 1 | Minimum 1 |
--max-pages N | 5 | 1–1000 |
--concurrency N | 2 | 1–4 |
--jsonl | Off | Stream one item envelope per line |
See automation for output shapes, partial results, and resume.
Accounts and local data
| Command | Options and behavior |
|---|---|
auth login | Open an interactive browser login |
auth status | Inspect the selected provider's saved session status |
auth logout | Remove that provider's local session |
account KIND | --page N (default 1, minimum 1), --all (up to 100 pages) |
history list | Read local viewing history |
history clear | --yes confirms deletion without prompting |
settings show | Read active settings |
settings set KEY VALUE | Change 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
| Command | Options and behavior |
|---|---|
domains | --refresh requests fresh discovery |
doctor | Report CLI, data directory, browser, and native bundle discovery |
runtime status | Report the same environment status as doctor |
runtime install | Verify the existing native bundle; no download |
update | Install the latest native release and restart |
update --check | Check availability only; alias --check-only |
Inspect playerStatus for runtime health and checkFailed for update checks.
See troubleshooting for interpreting these fields.
Exit codes
| Code | Meaning |
|---|---|
0 | Command completed |
1 | Runtime or network error |
2 | Invalid arguments or deferred provider |
3 | Login required |
4 | Anime, episode, or stream not found |
130 | Cancelled |
Data is written to stdout. Diagnostics, progress, and errors are written to stderr. Use automation for the JSON contract.