rebon 0.0.1 → 0.1.3

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 +26 -0
  2. package/bin/rebon.js +58 -0
  3. package/package.json +18 -2
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # rebon
2
+
3
+ The Rebon agent CLI — an agent for coding and more. Install it globally:
4
+
5
+ ```sh
6
+ npm install -g rebon
7
+ ```
8
+
9
+ Then run:
10
+
11
+ ```sh
12
+ rebon
13
+ ```
14
+
15
+ ## What this installs
16
+
17
+ `rebon` is a thin wrapper around **[`@rebon/cli`](https://www.npmjs.com/package/@rebon/cli)**.
18
+ Installing `rebon` pulls in `@rebon/cli` plus the matching prebuilt binary for
19
+ your platform, and forwards the `rebon` command to it. You can also install the
20
+ scoped package directly if you prefer:
21
+
22
+ ```sh
23
+ npm install -g @rebon/cli@latest
24
+ ```
25
+
26
+ Both give you the same `rebon` command.
package/bin/rebon.js ADDED
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // `rebon` is a thin wrapper around @rebon/cli: it depends on @rebon/cli and
5
+ // forwards to its launcher, so `npm install -g rebon` gives the full CLI
6
+ // (@rebon/cli pulls in the matching prebuilt platform binary as an
7
+ // optionalDependency). Args, stdio, exit code and signals are passed through.
8
+ const path = require("path");
9
+ const { spawn } = require("child_process");
10
+
11
+ function fail(message) {
12
+ console.error(`rebon: ${message}`);
13
+ process.exit(1);
14
+ }
15
+
16
+ let target;
17
+ try {
18
+ const pkgJsonPath = require.resolve("@rebon/cli/package.json", {
19
+ paths: [__dirname],
20
+ });
21
+ const pkg = require(pkgJsonPath);
22
+ const bin = pkg && pkg.bin;
23
+ const rel = typeof bin === "string" ? bin : bin && bin.rebon;
24
+ if (!rel) {
25
+ fail(
26
+ "@rebon/cli does not declare a rebon bin target. Reinstall: npm install -g rebon",
27
+ );
28
+ }
29
+ target = path.resolve(path.dirname(pkgJsonPath), rel);
30
+ } catch (error) {
31
+ fail(
32
+ `could not locate @rebon/cli. Reinstall with 'npm install -g rebon' ` +
33
+ `(installing with --omit=optional breaks it). (${error.message})`,
34
+ );
35
+ }
36
+
37
+ const child = spawn(process.execPath, [target, ...process.argv.slice(2)], {
38
+ stdio: "inherit",
39
+ windowsHide: false,
40
+ });
41
+
42
+ child.on("error", (error) => {
43
+ fail(
44
+ `failed to start @rebon/cli at ${target}. Reinstall with 'npm install -g rebon'. (${error.message})`,
45
+ );
46
+ });
47
+
48
+ child.on("exit", (code, signal) => {
49
+ if (signal) {
50
+ try {
51
+ process.kill(process.pid, signal);
52
+ } catch (_) {
53
+ process.exit(1);
54
+ }
55
+ return;
56
+ }
57
+ process.exit(code === null ? 1 : code);
58
+ });
package/package.json CHANGED
@@ -1,5 +1,21 @@
1
1
  {
2
2
  "name": "rebon",
3
- "version": "0.0.1",
4
- "description": "Rebon CLI - see @rebon/cli"
3
+ "version": "0.1.3",
4
+ "description": "Rebon agent CLI for coding and more. Installs @rebon/cli.",
5
+ "license": "MIT OR Apache-2.0",
6
+ "homepage": "https://github.com/Quorafind/Rebon-Releases",
7
+ "keywords": ["rebon", "cli", "agent", "coding-agent", "ai"],
8
+ "bin": {
9
+ "rebon": "bin/rebon.js"
10
+ },
11
+ "dependencies": {
12
+ "@rebon/cli": "^0.1.3"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "README.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ }
5
21
  }