@dosu/cli 0.1.6 → 0.2.0

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 (4) hide show
  1. package/README.md +66 -13
  2. package/bin/dosu.js +5166 -0
  3. package/package.json +38 -13
  4. package/bin/dosu +0 -59
package/package.json CHANGED
@@ -1,28 +1,53 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
+ "type": "module",
4
5
  "description": "Dosu CLI - Manage MCP servers for AI tools",
5
- "license": "UNLICENSED",
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://github.com/dosu-ai/dosu-cli",
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
- "optionalDependencies": {
19
- "@dosu/cli-darwin-arm64": "0.1.6",
20
- "@dosu/cli-darwin-x64": "0.1.6",
21
- "@dosu/cli-linux-arm64": "0.1.6",
22
- "@dosu/cli-linux-x64": "0.1.6",
23
- "@dosu/cli-win32-x64": "0.1.6"
19
+ "scripts": {
20
+ "dev": "bun run src/index.ts",
21
+ "dev:local": "DOSU_DEV=true bun run src/index.ts",
22
+ "build": "bun --env-file=.env.production build --compile --env=DOSU_* --env=SUPABASE_* src/index.ts --outfile bin/dosu",
23
+ "build:npm": "bun --env-file=.env.production run scripts/build-npm.ts",
24
+ "build:all": "bun --env-file=.env.production run scripts/build-all.ts",
25
+ "test": "bunx vitest run",
26
+ "test:watch": "bunx vitest",
27
+ "typecheck": "bunx tsc --noEmit",
28
+ "lint": "bunx biome lint .",
29
+ "format": "bunx biome format .",
30
+ "check": "bunx biome check .",
31
+ "prepack": "bun run build:npm"
24
32
  },
25
33
  "engines": {
26
- "node": ">=16"
34
+ "node": ">=18"
35
+ },
36
+ "devDependencies": {
37
+ "@biomejs/biome": "^2.4.9",
38
+ "@semantic-release/changelog": "^6.0.3",
39
+ "@semantic-release/exec": "^7.1.0",
40
+ "@semantic-release/git": "^10.0.1",
41
+ "@types/bun": "^1.3.11",
42
+ "@vitest/coverage-v8": "^3.2.0",
43
+ "semantic-release": "^25.0.3",
44
+ "typescript": "^5.8.3",
45
+ "vitest": "^3.1.1"
46
+ },
47
+ "dependencies": {
48
+ "@clack/prompts": "^0.10.0",
49
+ "commander": "^13.1.0",
50
+ "open": "^10.1.0",
51
+ "picocolors": "^1.1.1"
27
52
  }
28
53
  }
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
- });