Remove npm package, cargo only

This commit is contained in:
Hunter Bown
2026-01-20 09:05:12 -06:00
parent 2a5f40450a
commit 93e62b64c2
4 changed files with 2 additions and 175 deletions
+2 -19
View File
@@ -4,7 +4,6 @@ Your AI-powered terminal companion for DeepSeek models
[![CI](https://github.com/Hmbown/DeepSeek-TUI/actions/workflows/ci.yml/badge.svg)](https://github.com/Hmbown/DeepSeek-TUI/actions/workflows/ci.yml)
[![crates.io](https://img.shields.io/crates/v/deepseek-tui)](https://crates.io/crates/deepseek-tui)
[![npm](https://img.shields.io/npm/v/@hmbown/deepseek-tui)](https://www.npmjs.com/package/@hmbown/deepseek-tui)
Unofficial terminal UI (TUI) + CLI for the [DeepSeek platform](https://platform.deepseek.com) — chat with DeepSeek models and collaborate with AI assistants that can read, write, execute, and plan with approval-gated tool access.
@@ -34,10 +33,7 @@ Unofficial terminal UI (TUI) + CLI for the [DeepSeek platform](https://platform.
2. **Install and run**:
```bash
# Install via npm (recommended)
npm install -g @hmbown/deepseek-tui
# Or install via Cargo
# Install via Cargo
cargo install deepseek-tui --locked
# Set your API key
@@ -53,17 +49,7 @@ If anything looks off, run `deepseek doctor` to diagnose configuration issues.
## 📦 Installation
### Prebuilt via npm / bun (recommended)
The npm package is a thin wrapper that downloads the platformappropriate Rust binary from GitHub Releases.
```bash
npm install -g @hmbown/deepseek-tui
# or
bun install -g @hmbown/deepseek-tui
```
### From crates.io (Rust)
### From crates.io
```bash
cargo install deepseek-tui --locked
@@ -256,9 +242,6 @@ Run `deepseek sessions` and try `deepseek --resume latest`.
### MCP tools missing
Validate `~/.deepseek/mcp.json` (or `DEEPSEEK_MCP_CONFIG`) and restart.
### Command not found (npm install)
Ensure `npm` is installed and the global bin directory is in your `PATH`.
### Sandbox errors (macOS)
Ensure `/usr/bin/sandbox-exec` exists (comes with macOS). For other platforms, sandboxing is limited.
-36
View File
@@ -1,36 +0,0 @@
#!/usr/bin/env node
/**
* CLI wrapper - executes the downloaded DeepSeek binary.
*/
const { spawn } = require("child_process");
const path = require("path");
const fs = require("fs");
const binDir = path.join(__dirname, "bin");
const binName = process.platform === "win32" ? "deepseek.exe" : "deepseek";
const binPath = path.join(binDir, binName);
// Check for override
const override = process.env.DEEPSEEK_CLI_PATH;
const effectivePath = override && fs.existsSync(override) ? override : binPath;
if (!fs.existsSync(effectivePath)) {
console.error("DeepSeek CLI binary not found.");
console.error("Try reinstalling: npm install -g @hmbown/deepseek-tui");
process.exit(1);
}
// Spawn the binary with all arguments
const child = spawn(effectivePath, process.argv.slice(2), {
stdio: "inherit",
});
child.on("error", (err) => {
console.error("Failed to start DeepSeek CLI:", err.message);
process.exit(1);
});
child.on("exit", (code) => {
process.exit(code ?? 0);
});
-93
View File
@@ -1,93 +0,0 @@
#!/usr/bin/env node
/**
* Postinstall script - downloads the DeepSeek CLI binary for the current platform.
*/
const https = require("https");
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const VERSION = require("./package.json").version;
const REPO = "Hmbown/DeepSeek-TUI";
const PLATFORMS = {
"linux-x64": "deepseek-linux-x64",
"darwin-arm64": "deepseek-macos-arm64",
"darwin-x64": "deepseek-macos-x64",
"win32-x64": "deepseek-windows-x64.exe",
};
async function main() {
const platform = `${process.platform}-${process.arch}`;
const assetName = PLATFORMS[platform];
if (!assetName) {
console.error(`Unsupported platform: ${platform}`);
console.error(`Supported: ${Object.keys(PLATFORMS).join(", ")}`);
process.exit(1);
}
const binDir = path.join(__dirname, "bin");
const binName = process.platform === "win32" ? "deepseek.exe" : "deepseek";
const binPath = path.join(binDir, binName);
// Skip if already exists
if (fs.existsSync(binPath)) {
console.log(`DeepSeek CLI already installed at ${binPath}`);
return;
}
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}`;
console.log(`Downloading DeepSeek CLI v${VERSION}...`);
fs.mkdirSync(binDir, { recursive: true });
await download(url, binPath);
// Make executable on Unix
if (process.platform !== "win32") {
fs.chmodSync(binPath, 0o755);
}
console.log(`Installed DeepSeek CLI to ${binPath}`);
}
function download(url, dest) {
return new Promise((resolve, reject) => {
const file = fs.createWriteStream(dest);
function doRequest(requestUrl) {
https
.get(requestUrl, (response) => {
// Handle redirects
if (response.statusCode >= 300 && response.statusCode < 400 && response.headers.location) {
doRequest(response.headers.location);
return;
}
if (response.statusCode !== 200) {
reject(new Error(`Download failed: HTTP ${response.statusCode}`));
return;
}
response.pipe(file);
file.on("finish", () => {
file.close();
resolve();
});
})
.on("error", (err) => {
fs.unlink(dest, () => {});
reject(err);
});
}
doRequest(url);
});
}
main().catch((err) => {
console.error("Failed to install DeepSeek CLI:", err.message);
process.exit(1);
});
-27
View File
@@ -1,27 +0,0 @@
{
"name": "@hmbown/deepseek-tui",
"version": "0.1.0",
"description": "Unofficial DeepSeek CLI - downloads and runs the Rust binary",
"keywords": ["deepseek", "cli", "ai", "agent", "m2.1"],
"homepage": "https://github.com/Hmbown/DeepSeek-TUI",
"repository": {
"type": "git",
"url": "git+https://github.com/Hmbown/DeepSeek-TUI.git"
},
"license": "MIT",
"author": "Hmbown",
"bin": {
"deepseek": "cli.js"
},
"scripts": {
"postinstall": "node install.js"
},
"files": [
"cli.js",
"install.js",
"bin"
],
"engines": {
"node": ">=16"
}
}