@rebon/cli 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 +133 -0
  2. package/bin/rebon.js +97 -0
  3. package/package.json +20 -0
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # rebon
2
+
3
+ An agent CLI for coding and more — a terminal harness that drives an LLM through
4
+ a real agent loop with tools, sessions, permissions, and a full TUI.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm install -g @rebon/cli
10
+ ```
11
+
12
+ Upgrade later:
13
+
14
+ ```bash
15
+ npm install -g @rebon/cli@latest
16
+ ```
17
+
18
+ `@rebon/cli` is a thin launcher that pulls the matching native binary as
19
+ an optional dependency. Supported platforms: `win32-x64`, `darwin-x64`,
20
+ `darwin-arm64`, `linux-x64`, `linux-arm64`.
21
+
22
+ > If install fails with "missing optional platform package", you likely passed
23
+ > `--omit=optional` or `--no-optional`. Reinstall without that flag.
24
+
25
+ ## Quick start
26
+
27
+ ```bash
28
+ # Local TUI in the current directory
29
+ rebon
30
+
31
+ # Resume a previous session
32
+ rebon --resume sess-0-1712937600000
33
+
34
+ # Override the active provider / model
35
+ rebon --provider openrouter --model gpt-5.5
36
+
37
+ # Run as an ACP JSON-RPC server on stdio (for editor / IDE integrations)
38
+ rebon --acp
39
+ ```
40
+
41
+ The first run drops you into onboarding: pick a provider, sign in (OAuth +
42
+ PKCE for Claude / OpenAI, or paste an API key), and you're in.
43
+
44
+ ## CLI flags
45
+
46
+ | Flag | Purpose |
47
+ | ------------------- | ------------------------------------------------------------ |
48
+ | `--acp` | Run as an ACP JSON-RPC server on stdio. |
49
+ | `--provider <name>` | Override `activeCustomProvider` from `~/.rebon/config.json`. |
50
+ | `--model <id>` | Override the resolved provider's default model. |
51
+ | `--resume <id>` | Load an on-disk transcript and replay it into the TUI. |
52
+
53
+ ## Config & data
54
+
55
+ - `~/.rebon/config.json` — providers, models, credentials, defaults.
56
+ - `~/.rebon/sessions/` — saved transcripts.
57
+ - `~/.rebon/skills/`, `~/.rebon/agents/`, `~/.rebon/memory/` — user assets.
58
+ - `$REBON_LOG_DIR/rebon.log` — TUI log file (defaults to
59
+ `%TEMP%/rebon/logs/rebon.log` on Windows, `$TMPDIR/rebon/logs/rebon.log`
60
+ elsewhere). `--acp` mode logs to stderr instead.
61
+
62
+ Project-level overrides live under `.rebon/` and `.claude/` in your working
63
+ directory.
64
+
65
+ ## What you get
66
+
67
+ - **Local TUI** — prompt input with history, paste, image paste, `@`-mention
68
+ and slash-command pickers, queued submissions, mode cycling; streaming
69
+ transcript with markdown, tool grouping, thinking blocks, plan approval,
70
+ permission modal; full dialog stack for onboarding, settings, resume,
71
+ rewind, quick-open, history search, global search, tasks, background
72
+ tasks, teams, agents.
73
+ - **Agentic tool loop** — Bash / PowerShell, Read / Write / Edit, Glob /
74
+ Grep, Sleep, TaskCreate / TaskUpdate / TaskList / TaskGet / TaskStop,
75
+ Agent, SkillTool, AskUserQuestion, SendMessage, EnterPlanMode /
76
+ ExitPlanMode, ToolSearch, Team{Create,Delete,Files,Mailbox,Manager},
77
+ Worktree, plus MCP tools (stdio, Streamable HTTP, legacy SSE).
78
+ - **Providers** — Anthropic, OpenAI, and OpenAI-Responses, with streaming,
79
+ compact / context-prune passes, and automatic session titles.
80
+ - **Permissions, hooks, sandbox** — fine-grained allow / deny for shell,
81
+ filesystem, web-fetch, and skill invocations; user-defined hooks; sandbox
82
+ config with violation reporting.
83
+ - **Skills, agents, memory** — bundled and user skills; spawnable
84
+ worker agents and a coordinator for background tasks; a persistent memory
85
+ layer with recall and surfacing.
86
+ - **ACP server** — drive Rebon from an editor over stdio JSON-RPC:
87
+ `initialize`, `session/new`, `session/load`, `session/list`,
88
+ `session/prompt`, `session/cancel`, reverse-RPC permission prompts,
89
+ streamed tool output.
90
+
91
+ ## Common tasks
92
+
93
+ ```bash
94
+ # Start a fresh session in the current repo
95
+ rebon
96
+
97
+ # Resume the last session you worked on (use Tab in the TUI to browse)
98
+ rebon --resume <session-id>
99
+
100
+ # Plug Rebon into an editor over ACP (the editor manages stdio for you)
101
+ rebon --acp
102
+
103
+ # Override provider/model without editing config
104
+ rebon --provider anthropic --model claude-opus-4-7
105
+ ```
106
+
107
+ Inside the TUI:
108
+
109
+ - `?` — keyboard help
110
+ - `/` — slash-command picker
111
+ - `@` — file / symbol mention
112
+ - `Tab` — switch panel / list
113
+ - `Esc` — cancel current step or dismiss a dialog
114
+
115
+ ## Updating
116
+
117
+ `rebon` ships with a built-in updater that checks for new releases on launch.
118
+ You can also just rerun:
119
+
120
+ ```bash
121
+ npm install -g @rebon/cli@latest
122
+ ```
123
+
124
+ ## Troubleshooting
125
+
126
+ - **"missing optional platform package"** — reinstall without
127
+ `--omit=optional` / `--no-optional` / `--ignore-optional`.
128
+ - **"unsupported platform"** — your `process.platform`/`process.arch` is not
129
+ one of the five supported targets.
130
+ - **TUI looks scrambled** — make sure your terminal supports truecolor and
131
+ Unicode width tables (modern Windows Terminal, iTerm2, Alacritty, WezTerm,
132
+ Kitty all work). The legacy `cmd.exe` and `conhost` are not supported.
133
+ - **Logs** — check `$REBON_LOG_DIR/rebon.log` (TUI) or stderr (`--acp`).
package/bin/rebon.js ADDED
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const path = require("path");
5
+ const { spawn } = require("child_process");
6
+
7
+ const PLATFORM_PACKAGES = {
8
+ "win32-x64": "@rebon/cli-win32-x64",
9
+ "darwin-x64": "@rebon/cli-darwin-x64",
10
+ "darwin-arm64": "@rebon/cli-darwin-arm64",
11
+ "linux-x64": "@rebon/cli-linux-x64",
12
+ "linux-arm64": "@rebon/cli-linux-arm64",
13
+ };
14
+
15
+ function platformKey() {
16
+ return `${process.platform}-${process.arch}`;
17
+ }
18
+
19
+ function fail(message) {
20
+ console.error(`rebon: ${message}`);
21
+ process.exit(1);
22
+ }
23
+
24
+ function resolvePlatformPackageName() {
25
+ const key = platformKey();
26
+ const packageName = PLATFORM_PACKAGES[key];
27
+ if (!packageName) {
28
+ fail(
29
+ `unsupported platform ${key}; @rebon/cli has no bundled Rebon binary for this platform.`,
30
+ );
31
+ }
32
+ return packageName;
33
+ }
34
+
35
+ function loadPlatformPackageJson(packageName) {
36
+ try {
37
+ return require.resolve(`${packageName}/package.json`, {
38
+ paths: [__dirname],
39
+ });
40
+ } catch (error) {
41
+ fail(
42
+ `missing optional platform package ${packageName}. Reinstall @rebon/cli; installing with --omit=optional is a likely cause. (${error.message})`,
43
+ );
44
+ }
45
+ }
46
+
47
+ function resolveBinTarget(packageJsonPath, packageName) {
48
+ let packageJson;
49
+ try {
50
+ packageJson = require(packageJsonPath);
51
+ } catch (error) {
52
+ fail(
53
+ `could not read ${packageName} package.json. Reinstall @rebon/cli. (${error.message})`,
54
+ );
55
+ }
56
+
57
+ const bin = packageJson && packageJson.bin;
58
+ const target = typeof bin === "string" ? bin : bin && bin.rebon;
59
+ if (!target) {
60
+ fail(
61
+ `${packageName} does not declare a rebon bin target. Reinstall @rebon/cli.`,
62
+ );
63
+ }
64
+ return path.resolve(path.dirname(packageJsonPath), target);
65
+ }
66
+
67
+ const packageName = resolvePlatformPackageName();
68
+ const packageJsonPath = loadPlatformPackageJson(packageName);
69
+ const binTarget = resolveBinTarget(packageJsonPath, packageName);
70
+ const isJavaScript = /\.js$/i.test(binTarget);
71
+ const command = isJavaScript ? process.execPath : binTarget;
72
+ const args = isJavaScript
73
+ ? [binTarget, ...process.argv.slice(2)]
74
+ : process.argv.slice(2);
75
+
76
+ const child = spawn(command, args, {
77
+ stdio: "inherit",
78
+ windowsHide: false,
79
+ });
80
+
81
+ child.on("error", (error) => {
82
+ fail(
83
+ `failed to start ${packageName} bin at ${binTarget}. Reinstall @rebon/cli. (${error.message})`,
84
+ );
85
+ });
86
+
87
+ child.on("exit", (code, signal) => {
88
+ if (signal) {
89
+ try {
90
+ process.kill(process.pid, signal);
91
+ } catch (_) {
92
+ process.exit(1);
93
+ }
94
+ return;
95
+ }
96
+ process.exit(code === null ? 1 : code);
97
+ });
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@rebon/cli",
3
+ "version": "0.1.3",
4
+ "description": "Agent cli for coding and more.",
5
+ "license": "MIT OR Apache-2.0",
6
+ "bin": {
7
+ "rebon": "bin/rebon.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "README.md"
12
+ ],
13
+ "optionalDependencies": {
14
+ "@rebon/cli-win32-x64": "0.1.3",
15
+ "@rebon/cli-darwin-x64": "0.1.3",
16
+ "@rebon/cli-darwin-arm64": "0.1.3",
17
+ "@rebon/cli-linux-x64": "0.1.3",
18
+ "@rebon/cli-linux-arm64": "0.1.3"
19
+ }
20
+ }