@bunshin-cc/bunshin 0.12.2 → 0.13.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/README.md +7 -6
- package/dist/bin.js +501 -200
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,22 +7,23 @@ Bunshin lets your company’s AI agents (and robots) learn from each other. Your
|
|
|
7
7
|
You need Node.js 20 or later, a signed-in Codex, Claude Code, or Pi installation, and an account in your company’s [Bunshin workspace](https://bunshin.cc/dashboard/).
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install -g @bunshin-cc/bunshin
|
|
11
10
|
cd /path/to/your/project
|
|
12
|
-
bunshin
|
|
11
|
+
npm install -g @bunshin-cc/bunshin && bunshin setup
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
Setup finds your agent (`--harness claude-code|codex|pi` picks one when several are installed). The first time on a computer it opens Bunshin on **Connect this computer?** with a short code: check it matches your terminal and click Approve. There is no key to copy. Setup then reads your role, team, and permissions from the workspace, saves the computer's key in a private file outside the project, and configures the project hooks (five for Codex, six plus an MCP server for Claude Code). Every later project on the same computer connects with `bunshin setup` alone. It does not need a separate model API key.
|
|
15
|
+
|
|
16
|
+
When an agent runs setup for you, it uses `bunshin login --no-wait` (prints the link and returns), shows you the link, then runs `bunshin setup` once you have approved. `bunshin logout` forgets the computer's sign-in.
|
|
16
17
|
|
|
17
18
|
Run `codex` interactively in the same project. Review and accept its project trust prompt, then run `/hooks` and review and trust the five Bunshin hooks. Project trust and hook trust are separate steps. If `/hooks` does not list Bunshin, check that you opened the connected project and trusted its configuration. This guide tests interactive sessions; `codex exec` is not a substitute for this setup check.
|
|
18
19
|
|
|
19
20
|
For a linked Git worktree, setup puts Codex hooks in the primary checkout, where Codex reads them. The printed path identifies that shared hook file. Each connected worktree keeps its own `.bunshin` store and private connection. Worktrees created from a bare repository are not supported yet; use a full checkout.
|
|
20
21
|
|
|
21
|
-
For Claude Code,
|
|
22
|
+
For Claude Code, start a new session in the project and approve the `bunshin` MCP server it adds to `.mcp.json` (it gives the model the `bunshin_recall` and `bunshin_load` tools). `/learn` in the Claude Code plugin, or `bunshin learn "<what to remember>"`, captures knowledge on demand.
|
|
22
23
|
|
|
23
24
|
To connect a whole folder of projects (each its own repository), run setup there with `--hooks user`: the hooks go in your user settings and every session under that folder uses its workspace, while sessions elsewhere are untouched. `bunshin sources` shows and changes which of its folders take part (`exclude <folder>`, `only <folders…>`, `include <folder>`, `all`).
|
|
24
25
|
|
|
25
|
-
For Pi, use Node.js 22.19 or later
|
|
26
|
+
For Pi, use Node.js 22.19 or later. Setup installs a project extension in `.pi/extensions/bunshin.js`. Start Pi in the project (or run `/reload` in an existing session), review its project resources, and check `/bunshin status`. The extension ships in this npm package; you do not need a second package or a repository checkout.
|
|
26
27
|
|
|
27
28
|
## Check it works
|
|
28
29
|
|
|
@@ -45,7 +46,7 @@ Sessions uploaded by a CLI before 0.6.2 carry a clipped trace (at most 60,000 ch
|
|
|
45
46
|
|
|
46
47
|
## Scope and removal
|
|
47
48
|
|
|
48
|
-
Setup applies to the current project. The local `.bunshin/` directory contains lessons and session state and is added to `.gitignore`.
|
|
49
|
+
Setup applies to the current project. The local `.bunshin/` directory contains lessons and session state and is added to `.gitignore`. Keys are stored under `~/.config/bunshin/` with owner-only permissions. For CI, set `BUNSHIN_API_KEY` or pipe a key from **Agent keys** to `bunshin setup --key-stdin`. Your existing hooks remain in place.
|
|
49
50
|
|
|
50
51
|
```sh
|
|
51
52
|
bunshin init --harness codex --remove-hooks
|