| 1 | # deepseek-tui |
| 2 | |
| 3 | Install and run the `deepseek` and `deepseek-tui` binaries from GitHub release artifacts. |
| 4 | |
| 5 | ## Install |
| 6 | |
| 7 | ```bash |
| 8 | npm install -g deepseek-tui |
| 9 | # or |
| 10 | pnpm add -g deepseek-tui |
| 11 | ``` |
| 12 | |
| 13 | For project-local usage: |
| 14 | |
| 15 | ```bash |
| 16 | npm install deepseek-tui |
| 17 | npx deepseek-tui --help |
| 18 | ``` |
| 19 | |
| 20 | `postinstall` downloads platform binaries into `bin/downloads/` and exposes |
| 21 | `deepseek` and `deepseek-tui` commands. |
| 22 | |
| 23 | ## First run |
| 24 | |
| 25 | ```bash |
| 26 | deepseek login --api-key "YOUR_DEEPSEEK_API_KEY" |
| 27 | deepseek doctor |
| 28 | deepseek |
| 29 | ``` |
| 30 | |
| 31 | The `deepseek` facade and `deepseek-tui` binary share `~/.deepseek/config.toml` |
| 32 | for DeepSeek auth and default model settings. Common TUI commands are available |
| 33 | directly through the facade, including `deepseek doctor`, `deepseek models`, |
| 34 | `deepseek sessions`, and `deepseek resume --last`. |
| 35 | |
| 36 | The app talks to DeepSeek's documented OpenAI-compatible Chat Completions API. |
| 37 | Set `DEEPSEEK_BASE_URL` only if you need the China endpoint or DeepSeek beta |
| 38 | features such as strict tool mode, chat prefix completion, or FIM completion. |
| 39 | |
| 40 | NVIDIA NIM-hosted DeepSeek V4 Pro is also supported: |
| 41 | |
| 42 | ```bash |
| 43 | deepseek auth set --provider nvidia-nim --api-key "YOUR_NVIDIA_API_KEY" |
| 44 | deepseek --provider nvidia-nim |
| 45 | ``` |
| 46 | |
| 47 | For a single process, set `DEEPSEEK_PROVIDER=nvidia-nim` and `NVIDIA_API_KEY` |
| 48 | or `NVIDIA_NIM_API_KEY` (with `DEEPSEEK_API_KEY` as a compatibility fallback). |
| 49 | The NIM default model is `deepseek-ai/deepseek-v4-pro` and the default base URL |
| 50 | is `https://integrate.api.nvidia.com/v1`. With `--provider nvidia-nim`, |
| 51 | `--model deepseek-v4-flash` maps to `deepseek-ai/deepseek-v4-flash`. |
| 52 | |
| 53 | ## Supported platforms |
| 54 | |
| 55 | Prebuilt binaries for the GitHub release are downloaded automatically: |
| 56 | |
| 57 | - Linux x64 |
| 58 | - Linux arm64 (v0.8.8+) |
| 59 | - macOS x64 / arm64 |
| 60 | - Windows x64 |
| 61 | |
| 62 | Other platform/architecture combinations (musl, riscv64, FreeBSD, …) aren't |
| 63 | shipped as prebuilts. The `postinstall` will exit with a clear error pointing |
| 64 | you at `cargo install deepseek-tui-cli deepseek-tui --locked` and the full |
| 65 | [docs/INSTALL.md](https://github.com/Hmbown/DeepSeek-TUI/blob/main/docs/INSTALL.md) |
| 66 | build-from-source guide. |
| 67 | |
| 68 | ## Configuration |
| 69 | |
| 70 | - Default binary version comes from `deepseekBinaryVersion` in `package.json`. |
| 71 | - Set `DEEPSEEK_TUI_VERSION` or `DEEPSEEK_VERSION` to override the release version. |
| 72 | - Set `DEEPSEEK_TUI_GITHUB_REPO` or `DEEPSEEK_GITHUB_REPO` to override the source repo (defaults to `Hmbown/DeepSeek-TUI`). |
| 73 | - Set `DEEPSEEK_TUI_FORCE_DOWNLOAD=1` to force download even when the cached binary is already present. |
| 74 | - Set `DEEPSEEK_TUI_DISABLE_INSTALL=1` to skip install-time download. |
| 75 | - Set `DEEPSEEK_TUI_OPTIONAL_INSTALL=1` to make the `postinstall` step warn and exit `0` on download/extract errors instead of failing `npm install` (useful in CI matrices). |
| 76 | |
| 77 | ## Release integrity |
| 78 | |
| 79 | - `npm publish` runs a release-asset check to ensure all required binary assets |
| 80 | exist for the target GitHub release before publishing. |
| 81 | - Install-time downloads are verified against the release checksum manifest before |
| 82 | the wrapper marks them executable. |
| 83 | - Set `DEEPSEEK_TUI_RELEASE_BASE_URL` to point the installer at a local or |
| 84 | staged release-asset directory for smoke tests. |
| 85 |