@dosu/cli 0.1.6 → 0.1.7
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/README.md +66 -13
- package/bin/dosu.js +5102 -0
- package/package.json +30 -13
- package/bin/dosu +0 -59
package/package.json
CHANGED
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosu/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Dosu CLI - Manage MCP servers for AI tools",
|
|
5
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "https://github.com/dosu-ai/dosu-cli.git"
|
|
9
10
|
},
|
|
10
|
-
"homepage": "https://
|
|
11
|
+
"homepage": "https://dosu.dev",
|
|
12
|
+
"main": "bin/dosu.js",
|
|
11
13
|
"bin": {
|
|
12
|
-
"dosu": "bin/dosu"
|
|
14
|
+
"dosu": "bin/dosu.js"
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
15
|
-
"bin/dosu"
|
|
16
|
-
"README.md"
|
|
17
|
+
"bin/dosu.js"
|
|
17
18
|
],
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "bun run src/index.ts",
|
|
21
|
+
"dev:local": "DOSU_DEV=true bun run src/index.ts",
|
|
22
|
+
"build": "bun build --compile src/index.ts --outfile bin/dosu",
|
|
23
|
+
"build:npm": "bun run scripts/build-npm.ts",
|
|
24
|
+
"build:all": "bun run scripts/build-all.ts",
|
|
25
|
+
"test": "bunx vitest run",
|
|
26
|
+
"test:watch": "bunx vitest",
|
|
27
|
+
"typecheck": "bunx tsc --noEmit",
|
|
28
|
+
"prepack": "bun run build:npm"
|
|
24
29
|
},
|
|
25
30
|
"engines": {
|
|
26
|
-
"node": ">=
|
|
31
|
+
"node": ">=18"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/bun": "^1.3.11",
|
|
35
|
+
"@vitest/coverage-v8": "^3.2.0",
|
|
36
|
+
"typescript": "^5.8.3",
|
|
37
|
+
"vitest": "^3.1.1"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@clack/prompts": "^0.10.0",
|
|
41
|
+
"commander": "^13.1.0",
|
|
42
|
+
"open": "^10.1.0",
|
|
43
|
+
"picocolors": "^1.1.1"
|
|
27
44
|
}
|
|
28
45
|
}
|
package/bin/dosu
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
const { spawn } = require("child_process");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const fs = require("fs");
|
|
7
|
-
|
|
8
|
-
const PLATFORMS = {
|
|
9
|
-
"darwin arm64": "@dosu/cli-darwin-arm64",
|
|
10
|
-
"darwin x64": "@dosu/cli-darwin-x64",
|
|
11
|
-
"linux arm64": "@dosu/cli-linux-arm64",
|
|
12
|
-
"linux x64": "@dosu/cli-linux-x64",
|
|
13
|
-
"win32 x64": "@dosu/cli-win32-x64",
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
function getBinaryPath() {
|
|
17
|
-
const key = `${process.platform} ${process.arch}`;
|
|
18
|
-
const pkg = PLATFORMS[key];
|
|
19
|
-
if (!pkg) {
|
|
20
|
-
console.error(
|
|
21
|
-
`Unsupported platform: ${process.platform} ${process.arch}\n` +
|
|
22
|
-
`Install from https://github.com/dosu-ai/dosu-cli/releases instead.`
|
|
23
|
-
);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let pkgDir;
|
|
28
|
-
try {
|
|
29
|
-
pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
|
|
30
|
-
} catch {
|
|
31
|
-
console.error(
|
|
32
|
-
`Platform package ${pkg} is not installed.\n` +
|
|
33
|
-
`Try: npm install -g @dosu/cli\n` +
|
|
34
|
-
`Or download from https://github.com/dosu-ai/dosu-cli/releases`
|
|
35
|
-
);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const bin = process.platform === "win32" ? "dosu.exe" : "dosu";
|
|
40
|
-
const p = path.join(pkgDir, "bin", bin);
|
|
41
|
-
if (!fs.existsSync(p)) {
|
|
42
|
-
console.error(`Binary not found at ${p}. Try reinstalling @dosu/cli.`);
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
return p;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const child = spawn(getBinaryPath(), process.argv.slice(2), {
|
|
49
|
-
stdio: "inherit",
|
|
50
|
-
env: process.env,
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
child.on("exit", (code, signal) => {
|
|
54
|
-
if (signal) {
|
|
55
|
-
process.kill(process.pid, signal);
|
|
56
|
-
} else {
|
|
57
|
-
process.exit(code ?? 1);
|
|
58
|
-
}
|
|
59
|
-
});
|