@dosu/cli 0.1.1-alpha

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.
Files changed (3) hide show
  1. package/README.md +35 -0
  2. package/bin/dosu +59 -0
  3. package/package.json +28 -0
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @dosu/cli
2
+
3
+ Dosu CLI — Manage MCP servers for AI tools.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ npx @dosu/cli setup
9
+ ```
10
+
11
+ ## Global Install
12
+
13
+ ```bash
14
+ npm install -g @dosu/cli
15
+ dosu setup
16
+ ```
17
+
18
+ ## Supported Platforms
19
+
20
+ | OS | Architecture |
21
+ |---------|-------------|
22
+ | macOS | ARM64 (Apple Silicon) |
23
+ | macOS | x64 (Intel) |
24
+ | Linux | ARM64 |
25
+ | Linux | x64 |
26
+ | Windows | x64 |
27
+
28
+ ## Alternative Installation
29
+
30
+ If you prefer not to use npm, install via [Homebrew](https://github.com/dosu-ai/dosu-cli#homebrew-recommended) or download directly from [GitHub Releases](https://github.com/dosu-ai/dosu-cli/releases).
31
+
32
+ ## Links
33
+
34
+ - [GitHub](https://github.com/dosu-ai/dosu-cli)
35
+ - [Discord](https://go.dosu.dev/discord-cli)
package/bin/dosu ADDED
@@ -0,0 +1,59 @@
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
+ });
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@dosu/cli",
3
+ "version": "0.1.1-alpha",
4
+ "description": "Dosu CLI - Manage MCP servers for AI tools",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/dosu-ai/dosu-cli.git"
9
+ },
10
+ "homepage": "https://github.com/dosu-ai/dosu-cli",
11
+ "bin": {
12
+ "dosu": "bin/dosu"
13
+ },
14
+ "files": [
15
+ "bin/dosu",
16
+ "README.md"
17
+ ],
18
+ "optionalDependencies": {
19
+ "@dosu/cli-darwin-arm64": "0.1.1-alpha",
20
+ "@dosu/cli-darwin-x64": "0.1.1-alpha",
21
+ "@dosu/cli-linux-arm64": "0.1.1-alpha",
22
+ "@dosu/cli-linux-x64": "0.1.1-alpha",
23
+ "@dosu/cli-win32-x64": "0.1.1-alpha"
24
+ },
25
+ "engines": {
26
+ "node": ">=16"
27
+ }
28
+ }