@neuro.corp/dash 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dash.js +47 -1
- package/dist/dash.exe +2 -2
- package/package.json +2 -2
package/bin/dash.js
CHANGED
|
@@ -1,9 +1,55 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const pkgPath = path.resolve(__dirname, "..", "package.json");
|
|
9
|
+
let version = "0.0.0";
|
|
10
|
+
try {
|
|
11
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
12
|
+
if (pkg.version) version = pkg.version;
|
|
13
|
+
} catch {}
|
|
14
|
+
|
|
15
|
+
const args = process.argv.slice(2);
|
|
16
|
+
const hasVersion = args.includes("--version") || args.includes("-v");
|
|
17
|
+
const hasHelp = args.includes("--help") || args.includes("-h");
|
|
18
|
+
|
|
19
|
+
if (hasVersion) {
|
|
20
|
+
console.log(`dash version ${version}`);
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (hasHelp) {
|
|
25
|
+
console.log(`dash - AI-powered coding agent for your terminal
|
|
26
|
+
|
|
27
|
+
Usage:
|
|
28
|
+
dash [options] [prompt]
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
-v, --version Show version number
|
|
32
|
+
-h, --help Show help
|
|
33
|
+
|
|
34
|
+
Commands:
|
|
35
|
+
/new Start new chat
|
|
36
|
+
/sessions View past sessions
|
|
37
|
+
/models Manage AI models
|
|
38
|
+
/providers Manage API providers
|
|
39
|
+
/updates Check for updates
|
|
40
|
+
/exit Exit terminal
|
|
41
|
+
/help Show help
|
|
42
|
+
/donate Donate to support development
|
|
43
|
+
|
|
44
|
+
Examples:
|
|
45
|
+
dash "create a todo app"
|
|
46
|
+
dash --version
|
|
47
|
+
`);
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
4
50
|
|
|
5
51
|
const executable = fileURLToPath(new URL("../dist/dash.exe", import.meta.url));
|
|
6
|
-
const child = spawn(executable,
|
|
52
|
+
const child = spawn(executable, args, { stdio: "inherit" });
|
|
7
53
|
|
|
8
54
|
child.on("error", (error) => {
|
|
9
55
|
console.error(`Could not start Dash: ${error.message}`);
|
package/dist/dash.exe
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/dash.exe
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 104695296 bytes
|
|
4
|
+
sha256: 64f6bc3d180f001feb0cdf157ca4a6ac72fa6332944be0df7fded04f9f9580ab
|
package/package.json
CHANGED