> ## Documentation Index
> Fetch the complete documentation index at: https://nirmauniversity-d6cdc5d7-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI commands

> Reference for the NoteWise command surface from the Typer CLI source.

Run `notewise COMMAND --help` for command-specific flags. The command set is defined in `src/notewise/cli/app.py`.

## Main commands

| Command                        | Purpose                                                           |
| ------------------------------ | ----------------------------------------------------------------- |
| `notewise process URL`         | Generate notes from one video, playlist, or batch file.           |
| `notewise setup`               | Run the interactive config wizard.                                |
| `notewise config`              | Print masked effective config.                                    |
| `notewise config keys`         | List every key `get`/`set`/`unset` accept.                        |
| `notewise config get KEY`      | Print one config value (masked if secret).                        |
| `notewise config set KEY VAL`  | Set one config value.                                             |
| `notewise config unset KEY`    | Remove one config value.                                          |
| `notewise config edit`         | Interactively browse and edit config, grouped by category.        |
| `notewise config-path`         | Print the active config database path.                            |
| `notewise edit-config`         | Edit config as an env-style file in your editor.                  |
| `notewise auth login PROVIDER` | Login to OAuth providers.                                         |
| `notewise info`                | Show runtime config and state paths.                              |
| `notewise info URL`            | Inspect YouTube metadata and cache status without generation.     |
| `notewise transcript URL`      | Download one video's transcript (txt/json) without AI generation. |
| `notewise inference`           | List and manage saved inference endpoints.                        |
| `notewise doctor`              | Check config, provider readiness, output, cache, and logs.        |
| `notewise stats`               | Show processing totals and model breakdown.                       |
| `notewise history`             | Show recent processed videos.                                     |
| `notewise cache`               | Inspect or maintain the SQLite cache.                             |
| `notewise logs`                | Inspect or clean session logs.                                    |
| `notewise update`              | Check whether a newer release is available.                       |
| `notewise version`             | Show the installed version.                                       |
| `notewise help`                | Show the same output as `notewise --help`/`-h`.                   |

## Process command

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise process "https://youtu.be/VIDEO_ID" --format md,docx --quiz
```

Important flags: `--model`, `--base-url`, `--api-key`, `--output`, `--format`, `--language`, `--target-language`, `--temperature`, `--max-tokens`, `--throttle`, `--force`, `--no-ui`, `--verbose`, `--quiz`, `--export-transcript`, `--timestamps`, `--chapter-directory-output`, and `--cookie-file`.

### Custom endpoint run overrides

Set up named custom endpoints with `notewise setup`, then select one through its
`<name>/<model-id>` model name. `--base-url` sends only the current `process` run
to a different OpenAI-compatible URL:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise process "<video-url>" --model <name>/<model-id> --base-url <base-url> --api-key <api-key>
```

Both flags are transient: they do not update `config.db` or ambient environment
variables. `--base-url` takes precedence for the request URL. An explicitly passed
`--api-key` takes precedence for the request key; otherwise, NoteWise reuses a
saved profile key only when the normalized URL is the profile's saved origin.
Supply `--api-key` whenever `--base-url` changes that origin.

## Inference endpoints

Saved custom endpoints use a model name in the form `<name>/<model-id>`.
Manage those profiles with the `inference` command group:

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise inference list
notewise inference add <name> --base-url <url> --api-key <api-key> --model <model-id>
notewise inference update <name> [--base-url <url>] [--api-key <api-key>] [--model <model-id>]
notewise inference delete <name>
```

`list` displays each saved endpoint's name and base URL, never its API key.

`add` requires every shown option. It normalizes the URL, discovers models from
the live endpoint, and accepts `<model-id>` only when discovery returns it. It
then verifies the endpoint before atomically adding or replacing the named
profile.

`update` requires `--base-url`, `--api-key`, or both. Omitted URL and key values
come from the saved profile, except changing `--base-url` also requires a new
`--api-key`. If `--model` is omitted, NoteWise uses the suffix of the current
default model only when it is named `<name>/<model-id>`; otherwise, `--model` is
required. The resulting endpoint is live-discovered and verified before its saved
profile is replaced.

`delete` removes a saved profile without prompting, but refuses to remove a
profile while the default model begins with `<name>/`.

API keys supplied on a command line can be retained in shell history. Prefer
`notewise setup` or direct configuration for persistent secrets.

## Transcript command

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise transcript "https://youtu.be/VIDEO_ID"
notewise transcript "https://youtu.be/VIDEO_ID" --format json -o ./exports
notewise transcript "https://youtu.be/VIDEO_ID" -l en -l hi -c cookies.txt
```

Downloads one video's transcript without any AI generation and needs no API key. Use `--format json` for structured output instead of the default `txt`, `--output` for a different folder, `--language` to repeat preferred languages, and `--cookie-file` for restricted videos.

Playlists and batch files are not supported here; use `notewise process --export-transcript` instead.

## Setup and auth

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise setup
notewise setup --show
notewise setup --force
notewise auth login chatgpt
notewise auth login github_copilot
notewise auth login codex
```

## Update command

```bash theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
notewise update
```

The update check compares the installed version with the latest GitHub release. It detects whether NoteWise is running as a standalone binary or as a Python package and prints the matching upgrade command group.

Standalone binaries receive the short release installer command. Python package installs receive package-manager commands for `uv tool`, `pipx`, and `python -m pip`; use the one that matches how you installed NoteWise.

## Exit behavior

Successful commands exit with `0`. Processing failures exit with `1`.
