nimblebrain 0.8.0 → 0.9.0-beta.2

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 +69 -3
  2. package/dist/nimblebrain.js +131 -2379
  3. package/package.json +6 -2
package/README.md CHANGED
@@ -8,8 +8,10 @@ coding agent to it.
8
8
  npx nimblebrain
9
9
  ```
10
10
 
11
- It checks the machine, starts NimbleBrain in Docker at `http://127.0.0.1:27246`,
12
- connects your coding agent to a workspace over MCP, and opens it in your browser
11
+ It checks the machine, asks what runs NimbleBrain's agents (your Claude subscription
12
+ through Claude Code, your ChatGPT plan through Codex, an API key, or a local model
13
+ through Ollama), starts NimbleBrain in Docker at `http://127.0.0.1:27246`, connects your
14
+ coding agent to a workspace over MCP, and opens it in your browser
13
15
  (`--no-open` skips that). Run it again any time: on a
14
16
  machine that already has NimbleBrain it reports what is there.
15
17
 
@@ -24,7 +26,9 @@ later.
24
26
  | `doctor` | Check Docker, Compose, architecture, memory and the port; installs nothing |
25
27
  | `status` | Version, health, URL and each workspace's MCP URL |
26
28
  | `open` | Open the web UI in your default browser |
29
+ | `use [claude\|codex\|api\|local] [model]` | Choose what runs NimbleBrain's agents; with none named, it asks |
27
30
  | `key` | Enter the model key at a hidden prompt |
31
+ | `local-model [model]` | Prepare another Ollama model |
28
32
  | `up` / `down` | Start or stop it; data survives `down` |
29
33
  | `logs` | Recent log lines |
30
34
  | `update` | Move to the newest release, keeping data, and refresh your agent's `nimblebrain` skill |
@@ -35,13 +39,75 @@ later.
35
39
 
36
40
  `--json` makes every command answer one JSON object, `{"ok": true, ...}` or
37
41
  `{"ok": false, "error": "<CODE>", "fix": "..."}`, for scripts and coding agents.
38
- `--yes` takes every default. `--agent claude-code|cursor|codex|none` names the agent to
42
+ `--yes` takes every default, but never chooses for you what runs NimbleBrain's agents:
43
+ `init --use claude|codex|api|local` does, and without it a coding agent gets the
44
+ question to ask you in `model_source`. `--agent claude-code|cursor|codex|none` names the agent to
39
45
  connect. `npx nimblebrain help --json` lists every command with the fields it answers, every flag and every error code.
40
46
 
41
47
  When a newer CLI or NimbleBrain release exists, the CLI says so on stderr after its
42
48
  answer (once a day at most; it never updates anything itself).
43
49
  `NIMBLEBRAIN_NO_UPDATE_CHECK=1` turns that off.
44
50
 
51
+ ## A second install
52
+
53
+ ```bash
54
+ npx nimblebrain --home ~/.nimblebrain-beta --runtime vX.Y.Z-rc.N
55
+ ```
56
+
57
+ Each `--home` is its own install, beside the one you use every day. When port 27246 is
58
+ taken, the new install takes the next free port 100 on (27346, 27446, …), says what holds
59
+ it, and keeps that port for every later command. Your coding agent gets it under its own
60
+ name, `nimblebrain-<folder>` (here `nimblebrain-beta`), beside `nimblebrain`, and its
61
+ `uninstall` removes only that one. Pass the same `--home` to every command for it; a port
62
+ you pass with `--port` is used as given, or refused when it is taken.
63
+
64
+ ## Your Claude or ChatGPT subscription instead of a model key
65
+
66
+ ```bash
67
+ npx nimblebrain use claude # or: use codex
68
+ ```
69
+
70
+ On a Mac with Docker Desktop, NimbleBrain's agents can run on the Claude Code or Codex
71
+ you are already signed in to, so each turn is billed to your Claude or ChatGPT
72
+ subscription and no API key is needed.
73
+
74
+ ```
75
+ NimbleBrain (Docker) ──ACP──▶ agent worker (this machine) ──runs──▶ claude -p / codex exec
76
+ ▲ │ │
77
+ └──── your workspace's tools ◀─┴──── loopback MCP bridge ◀─────────┘
78
+ ```
79
+
80
+ - **The vendor's own CLI makes the model calls.** `use` starts an agent worker on this
81
+ machine, which runs the unmodified `claude` or `codex` for each turn. It never reads,
82
+ holds or forwards your login.
83
+ - **Your subscription is checked, not assumed.** The worker removes every API key
84
+ variable from the CLI's environment, refuses to start unless `claude auth status` says
85
+ you are signed in with a Claude subscription (or `codex login status` says ChatGPT),
86
+ and stops a Claude turn that reports any API key source. It never uses `claude --bare`,
87
+ which reads only `ANTHROPIC_API_KEY`.
88
+ - **Your workspace's tools reach the CLI through the worker.** Each turn gets a private
89
+ loopback URL; every tool call is relayed to NimbleBrain, which applies the run's checks.
90
+ Claude Code runs with no built-in tools and none of your settings, hooks, plugins or
91
+ CLAUDE.md. Codex ignores your `config.toml` but keeps a read-only shell it cannot turn
92
+ off; each command shows in the turn.
93
+ - **The worker listens on 127.0.0.1 only.** NimbleBrain's container reaches it at
94
+ `host.docker.internal`, which Docker Desktop forwards to this machine. On Linux that
95
+ name reaches the Docker bridge instead, so `use` refuses there for now.
96
+ - **Usage is counted, not priced.** Turns are recorded with their tokens at $0.
97
+
98
+ Claude Code's turns run on Sonnet, which answers a chat turn faster than Opus; pick
99
+ another with `use claude --model opus` (or `haiku`, or a full model id). Codex runs on its
100
+ own default unless `--model` names one. A conversation's title and history summary run
101
+ with no tools, and on Claude Code on Haiku, so they take a couple of seconds.
102
+
103
+ `status` shows which source is in use and whether its worker answers. The worker is a
104
+ login item (a LaunchAgent for your user, running a copy of the CLI kept in the install's
105
+ folder), so launchd starts it when you log in and again if it crashes; `down` removes it
106
+ and `up` puts it back. `use api` or `use local` goes back to the model key
107
+ or a local model; a saved one stays while you run on a subscription, for runs with a
108
+ spend budget. The worker logs to `agent-worker.log` in the install's folder. It needs a
109
+ NimbleBrain release whose Compose file passes `NB_AGENT_RUNTIME`; `update` brings one.
110
+
45
111
  ## Usage data
46
112
 
47
113
  Nothing is sent until you say yes. `init` asks once in your terminal; run by a coding