@devboy-tools/cli 0.1.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.
- package/README.md +105 -0
- package/bin/devboy-tools.js +47 -0
- package/index.d.ts +16 -0
- package/index.js +59 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# @devboy-tools/cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@devboy-tools/cli)
|
|
4
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
|
+
|
|
6
|
+
npm distribution of [DevBoy Tools](https://github.com/meteora-pro/devboy-tools) — a fast MCP server for coding agents, written in Rust.
|
|
7
|
+
|
|
8
|
+
The correct binary for your platform is installed automatically via platform-specific packages.
|
|
9
|
+
|
|
10
|
+
## Supported Platforms
|
|
11
|
+
|
|
12
|
+
| OS | Architecture | Package |
|
|
13
|
+
|---------|-------------|------------------------------|
|
|
14
|
+
| macOS | ARM64 | `@devboy-tools/darwin-arm64` |
|
|
15
|
+
| macOS | x64 | `@devboy-tools/darwin-x64` |
|
|
16
|
+
| Linux | x64 | `@devboy-tools/linux-x64` |
|
|
17
|
+
| Linux | ARM64 | `@devboy-tools/linux-arm64` |
|
|
18
|
+
| Windows | x64 | `@devboy-tools/win32-x64` |
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @devboy-tools/cli
|
|
24
|
+
# or
|
|
25
|
+
pnpm add @devboy-tools/cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### CLI
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Start MCP server
|
|
34
|
+
npx devboy mcp
|
|
35
|
+
|
|
36
|
+
# Show help
|
|
37
|
+
npx devboy --help
|
|
38
|
+
|
|
39
|
+
# Configure a provider
|
|
40
|
+
npx devboy config set github.owner <owner>
|
|
41
|
+
npx devboy config set github.repo <repo>
|
|
42
|
+
npx devboy config set-secret github.token <token>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Claude Code
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
claude mcp add devboy -- npx devboy mcp
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Claude Desktop
|
|
52
|
+
|
|
53
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"devboy": {
|
|
59
|
+
"command": "npx",
|
|
60
|
+
"args": ["devboy", "mcp"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Programmatic API
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
const { getBinaryPath, name, version } = require("@devboy-tools/cli");
|
|
70
|
+
|
|
71
|
+
console.log(getBinaryPath()); // /path/to/node_modules/@devboy-tools/darwin-arm64/bin/devboy
|
|
72
|
+
console.log(name); // "devboy"
|
|
73
|
+
console.log(version); // "0.3.0"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { getBinaryPath, name, version } from "@devboy-tools/cli";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Environment Variables
|
|
81
|
+
|
|
82
|
+
| Variable | Description |
|
|
83
|
+
|----------------------|--------------------------------------------------|
|
|
84
|
+
| `DEVBOY_BINARY_PATH` | Override binary path (skips platform package resolution) |
|
|
85
|
+
|
|
86
|
+
## Troubleshooting
|
|
87
|
+
|
|
88
|
+
### Binary not found after install
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm rebuild @devboy-tools/cli
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Unsupported platform
|
|
95
|
+
|
|
96
|
+
If your platform is not listed above, build from source:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
cargo install --git https://github.com/meteora-pro/devboy-tools.git
|
|
100
|
+
export DEVBOY_BINARY_PATH=$(which devboy)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
[Apache License 2.0](https://github.com/meteora-pro/devboy-tools/blob/main/LICENSE)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const { spawn } = require("child_process");
|
|
6
|
+
const { getBinaryPath } = require("../index");
|
|
7
|
+
|
|
8
|
+
let binaryPath;
|
|
9
|
+
try {
|
|
10
|
+
binaryPath = getBinaryPath();
|
|
11
|
+
} catch (err) {
|
|
12
|
+
console.error(err.message);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
child.on("error", (err) => {
|
|
21
|
+
if (err.code === "ENOENT") {
|
|
22
|
+
console.error(
|
|
23
|
+
`devboy binary not found at: ${binaryPath}\n` +
|
|
24
|
+
"Run 'npm rebuild @devboy-tools/cli' or set DEVBOY_BINARY_PATH.",
|
|
25
|
+
);
|
|
26
|
+
} else {
|
|
27
|
+
console.error(`Failed to start devboy: ${err.message}`);
|
|
28
|
+
}
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
child.on("exit", (code, signal) => {
|
|
33
|
+
if (signal) {
|
|
34
|
+
process.kill(process.pid, signal);
|
|
35
|
+
} else {
|
|
36
|
+
process.exit(code ?? 1);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Forward signals to child process
|
|
41
|
+
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
42
|
+
process.on(sig, () => {
|
|
43
|
+
if (!child.killed) {
|
|
44
|
+
child.kill(sig);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the absolute path to the devboy binary.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. `DEVBOY_BINARY_PATH` environment variable
|
|
6
|
+
* 2. Platform-specific npm package (`@devboy-tools/{platform}-{arch}`)
|
|
7
|
+
*
|
|
8
|
+
* @throws {Error} If the binary is not found at any location
|
|
9
|
+
*/
|
|
10
|
+
export declare function getBinaryPath(): string;
|
|
11
|
+
|
|
12
|
+
/** Binary name: `"devboy"` */
|
|
13
|
+
export declare const name: string;
|
|
14
|
+
|
|
15
|
+
/** Package version (e.g. `"0.3.0"`) */
|
|
16
|
+
export declare const version: string;
|
package/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const pkg = JSON.parse(
|
|
7
|
+
fs.readFileSync(path.join(__dirname, "package.json"), "utf8"),
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
/** Package name */
|
|
11
|
+
exports.name = "devboy";
|
|
12
|
+
|
|
13
|
+
/** Package version */
|
|
14
|
+
exports.version = pkg.version;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the path to the devboy binary.
|
|
18
|
+
*
|
|
19
|
+
* Resolution order:
|
|
20
|
+
* 1. DEVBOY_BINARY_PATH environment variable
|
|
21
|
+
* 2. Platform-specific npm package (@devboy-tools/{platform}-{arch})
|
|
22
|
+
*
|
|
23
|
+
* @returns {string} Absolute path to the devboy binary
|
|
24
|
+
* @throws {Error} If binary is not found
|
|
25
|
+
*/
|
|
26
|
+
exports.getBinaryPath = function getBinaryPath() {
|
|
27
|
+
// 1. Environment variable override
|
|
28
|
+
const envPath = process.env.DEVBOY_BINARY_PATH;
|
|
29
|
+
if (envPath) {
|
|
30
|
+
if (!fs.existsSync(envPath)) {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`DEVBOY_BINARY_PATH is set to "${envPath}" but the file does not exist.`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return path.resolve(envPath);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 2. Platform-specific package
|
|
39
|
+
const platformPkg = `@devboy-tools/${process.platform}-${process.arch}`;
|
|
40
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
41
|
+
const binaryName = `devboy${ext}`;
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const pkgJsonPath = require.resolve(`${platformPkg}/package.json`);
|
|
45
|
+
const binaryPath = path.join(path.dirname(pkgJsonPath), "bin", binaryName);
|
|
46
|
+
if (fs.existsSync(binaryPath)) {
|
|
47
|
+
return binaryPath;
|
|
48
|
+
}
|
|
49
|
+
} catch {
|
|
50
|
+
// Package not installed
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
throw new Error(
|
|
54
|
+
`devboy binary not found. No package ${platformPkg} installed.\n` +
|
|
55
|
+
"Your platform might not be supported. " +
|
|
56
|
+
"Set DEVBOY_BINARY_PATH to point to a devboy binary, or install from source:\n" +
|
|
57
|
+
" cargo install --git https://github.com/meteora-pro/devboy-tools.git",
|
|
58
|
+
);
|
|
59
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@devboy-tools/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fast and efficient MCP server for coding agents — npm wrapper for Rust binary",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/meteora-pro/devboy-tools.git",
|
|
9
|
+
"directory": "npm/devboy-tools"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/meteora-pro/devboy-tools",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/meteora-pro/devboy-tools/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"mcp",
|
|
17
|
+
"model-context-protocol",
|
|
18
|
+
"devboy",
|
|
19
|
+
"code-review",
|
|
20
|
+
"ai-agent",
|
|
21
|
+
"gitlab",
|
|
22
|
+
"github",
|
|
23
|
+
"clickup",
|
|
24
|
+
"jira"
|
|
25
|
+
],
|
|
26
|
+
"bin": {
|
|
27
|
+
"devboy": "bin/devboy-tools.js"
|
|
28
|
+
},
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"types": "index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"bin/devboy-tools.js",
|
|
33
|
+
"index.js",
|
|
34
|
+
"index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"optionalDependencies": {
|
|
40
|
+
"@devboy-tools/darwin-arm64": "0.1.0",
|
|
41
|
+
"@devboy-tools/darwin-x64": "0.1.0",
|
|
42
|
+
"@devboy-tools/linux-arm64": "0.1.0",
|
|
43
|
+
"@devboy-tools/linux-x64": "0.1.0",
|
|
44
|
+
"@devboy-tools/win32-x64": "0.1.0"
|
|
45
|
+
}
|
|
46
|
+
}
|