Files
codewhale/npm/deepseek-tui/scripts/run.js
T
Hunter Bown f2881e7e3d feat: add npm package and update install docs
- Add npm/deepseek-tui package that downloads prebuilt binaries from
  GitHub releases (supports macOS, Linux, Windows)
- Published as deepseek-tui@0.3.28 on npmjs.com
- Update README to feature npm as primary install method
- Add npm badge
2026-03-03 09:57:56 -06:00

37 lines
716 B
JavaScript

const { spawnSync } = require("child_process");
const { getBinaryPath } = require("./install");
async function run(binaryName) {
const binaryPath = await getBinaryPath(binaryName);
const result = spawnSync(binaryPath, process.argv.slice(2), {
stdio: "inherit",
});
if (result.error) {
throw result.error;
}
process.exit(result.status ?? 1);
}
async function runDeepseek() {
await run("deepseek");
}
async function runDeepseekTui() {
await run("deepseek-tui");
}
module.exports = {
run,
runDeepseek,
runDeepseekTui,
};
if (require.main === module) {
const command = process.argv[1] || "";
if (command.includes("tui")) {
runDeepseekTui();
} else {
runDeepseek();
}
}