6f1158a2d7
DeepSeek TUI - Unofficial terminal UI + CLI for DeepSeek models. Features: - Interactive TUI with multiple modes (Normal, Plan, Agent, YOLO, RLM, Duo) - Comprehensive tool access with approval gating - File operations, shell execution, task management - Sub-agent system for parallel work - MCP integration for external tool servers - Session management and skills system - Cross-platform support (macOS, Linux, Windows) 🤖 Generated with [Claude Code](https://claude.ai/code)
37 lines
988 B
JavaScript
37 lines
988 B
JavaScript
#!/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);
|
|
});
|