rvmp-cli 1.0.1
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/rvmp.js +40 -0
- package/package.json +16 -0
package/bin/rvmp.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// rvmp-cli launcher (spec §14 front door): `npx rvmp-cli` must work
|
|
3
|
+
// with zero commitment. Resolution order:
|
|
4
|
+
// 1. RVMP_BIN override
|
|
5
|
+
// 2. the installed binary at ~/.rvmp/bin/rvmp
|
|
6
|
+
// 3. a local `bun` + monorepo checkout (developer convenience)
|
|
7
|
+
// 4. print the curl installer one-liner (release binaries carry the daemon;
|
|
8
|
+
// this shim stays tiny and never bundles a runtime).
|
|
9
|
+
"use strict";
|
|
10
|
+
const { spawnSync } = require("node:child_process");
|
|
11
|
+
const { existsSync } = require("node:fs");
|
|
12
|
+
const { join } = require("node:path");
|
|
13
|
+
const os = require("node:os");
|
|
14
|
+
|
|
15
|
+
const args = process.argv.slice(2);
|
|
16
|
+
const candidates = [];
|
|
17
|
+
if (process.env.RVMP_BIN) candidates.push(process.env.RVMP_BIN);
|
|
18
|
+
candidates.push(join(os.homedir(), ".rvmp", "bin", "rvmp"));
|
|
19
|
+
|
|
20
|
+
for (const bin of candidates) {
|
|
21
|
+
if (bin && existsSync(bin)) {
|
|
22
|
+
const r = spawnSync(bin, args, { stdio: "inherit" });
|
|
23
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Developer path: running from a checkout with bun available.
|
|
28
|
+
const cliTs = join(__dirname, "..", "..", "..", "apps", "daemon", "src", "cli.ts");
|
|
29
|
+
const bunOk = spawnSync("bun", ["--version"], { stdio: "ignore" }).status === 0;
|
|
30
|
+
if (bunOk && existsSync(cliTs)) {
|
|
31
|
+
const r = spawnSync("bun", [cliTs, ...args], { stdio: "inherit" });
|
|
32
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
console.error(
|
|
36
|
+
"rvmp-cli is a launcher: it runs the rvmp binary, which is not installed yet.\n" +
|
|
37
|
+
"Install it with:\n\n curl -fsSL https://codegent.io/install | sh\n\n" +
|
|
38
|
+
"then re-run `rvmp` (or set RVMP_BIN to an existing binary)."
|
|
39
|
+
);
|
|
40
|
+
process.exit(1);
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rvmp-cli",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "rvmp \u2014 self-hosted coding-agent orchestrator (CLI launcher)",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
|
+
"bin": {
|
|
7
|
+
"rvmp": "bin/rvmp.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/burakgon/rvmp"
|
|
15
|
+
}
|
|
16
|
+
}
|