nimblebrain 0.8.0 → 0.9.0-beta.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.
Files changed (3) hide show
  1. package/README.md +51 -3
  2. package/dist/nimblebrain.js +130 -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,57 @@ 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
+ ## Your Claude or ChatGPT subscription instead of a model key
52
+
53
+ ```bash
54
+ npx nimblebrain use claude # or: use codex
55
+ ```
56
+
57
+ On a Mac with Docker Desktop, NimbleBrain's agents can run on the Claude Code or Codex
58
+ you are already signed in to, so each turn is billed to your Claude or ChatGPT
59
+ subscription and no API key is needed.
60
+
61
+ ```
62
+ NimbleBrain (Docker) ──ACP──▶ agent worker (this machine) ──runs──▶ claude -p / codex exec
63
+ ▲ │ │
64
+ └──── your workspace's tools ◀─┴──── loopback MCP bridge ◀─────────┘
65
+ ```
66
+
67
+ - **The vendor's own CLI makes the model calls.** `use` starts an agent worker on this
68
+ machine, which runs the unmodified `claude` or `codex` for each turn. It never reads,
69
+ holds or forwards your login.
70
+ - **Your subscription is checked, not assumed.** The worker removes every API key
71
+ variable from the CLI's environment, refuses to start unless `claude auth status` says
72
+ you are signed in with a Claude subscription (or `codex login status` says ChatGPT),
73
+ and stops a Claude turn that reports any API key source. It never uses `claude --bare`,
74
+ which reads only `ANTHROPIC_API_KEY`.
75
+ - **Your workspace's tools reach the CLI through the worker.** Each turn gets a private
76
+ loopback URL; every tool call is relayed to NimbleBrain, which applies the run's checks.
77
+ Claude Code runs with no built-in tools and none of your settings, hooks, plugins or
78
+ CLAUDE.md. Codex ignores your `config.toml` but keeps a read-only shell it cannot turn
79
+ off; each command shows in the turn.
80
+ - **The worker listens on 127.0.0.1 only.** NimbleBrain's container reaches it at
81
+ `host.docker.internal`, which Docker Desktop forwards to this machine. On Linux that
82
+ name reaches the Docker bridge instead, so `use` refuses there for now.
83
+ - **Usage is counted, not priced.** Turns are recorded with their tokens at $0.
84
+
85
+ `status` shows which source is in use and whether its worker answers. The worker is a
86
+ login item (a LaunchAgent for your user, running a copy of the CLI kept in the install's
87
+ folder), so launchd starts it when you log in and again if it crashes; `down` removes it
88
+ and `up` puts it back. `use api` or `use local` goes back to the model key
89
+ or a local model; a saved one stays while you run on a subscription, for runs with a
90
+ spend budget. The worker logs to `agent-worker.log` in the install's folder. It needs a
91
+ NimbleBrain release whose Compose file passes `NB_AGENT_RUNTIME`; `update` brings one.
92
+
45
93
  ## Usage data
46
94
 
47
95
  Nothing is sent until you say yes. `init` asks once in your terminal; run by a coding