flatbread-cli 0.1.0 → 0.2.0
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 +34 -4
- package/dist/flatbread.mjs +884 -157
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,8 +10,7 @@ npm install -g flatbread-cli # installs the `flatbread` command (Node 2
|
|
|
10
10
|
npx -y flatbread-cli --help # or run it without installing
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
`npm install -g ./flatbread-cli-<version>.tgz`. **The npm package is `flatbread-cli`, not `flatbread`.** `flatbread` on npm is an unrelated
|
|
13
|
+
On npm since 2026-10-18 (0.1.0). **The npm package is `flatbread-cli`, not `flatbread`.** `flatbread` on npm is an unrelated
|
|
15
14
|
project, so `npx flatbread` runs somebody else's code. The command it installs is `flatbread`.
|
|
16
15
|
|
|
17
16
|
## Commands
|
|
@@ -123,8 +122,12 @@ Visibility is `private` unless a human raises it - in the review UI, or from the
|
|
|
123
122
|
panel on the site while signed in as the run's owner. There is no `--visibility` flag
|
|
124
123
|
and no API field for it: `--no-review` is non-interactive and must never publish.
|
|
125
124
|
|
|
126
|
-
`parse` writes `
|
|
127
|
-
|
|
125
|
+
`parse` writes nothing: it prints the run's summary and brief. `parse --save` writes the raw
|
|
126
|
+
(unredacted) trace to `packages/cli/.tmp/last-parse.json`, and `parse --out <file>` writes it there instead.
|
|
127
|
+
`share` writes `packages/cli/.tmp/last-share.json`. `--title <text>` sets the run's title (the review
|
|
128
|
+
page opens with it and can still change it; every secret in a typed title is redacted), and
|
|
129
|
+
`--commit [sha]` binds the run to a commit (bare = HEAD) and records whether the working tree was
|
|
130
|
+
clean against it.
|
|
128
131
|
`view` reads the newest artifact (share draft preferred over raw parse), builds the
|
|
129
132
|
deterministic Execution Brief with `buildExecutionBrief`, writes `last-brief.json` and
|
|
130
133
|
`CAPSULE.md`, and prints `open http://127.0.0.1:3000/r/local`. It does **not**
|
|
@@ -136,6 +139,33 @@ capsule quotes trace text verbatim and inherits whatever the source still contai
|
|
|
136
139
|
session's working directory is a git repository. Nothing else is read from git, the index is
|
|
137
140
|
never written, and a log that names a different branch than the checkout gets no commit.
|
|
138
141
|
|
|
142
|
+
### Auto-capture: `flatbread setup`
|
|
143
|
+
|
|
144
|
+
`flatbread setup` turns on capture for this machine. It installs the Claude Code hook (as `hook
|
|
145
|
+
install` does) with one difference - the SessionEnd handler also starts `flatbread capture` for the
|
|
146
|
+
session that just ended - and, inside a git repository, a chained `post-commit` that records each
|
|
147
|
+
commit against the newest session of that repository (if that session moved in the last two hours).
|
|
148
|
+
|
|
149
|
+
Every capture goes to `~/.flatbread/bucket` (`FLATBREAD_HOME/bucket`): one record per session, with
|
|
150
|
+
EVERY redaction match redacted, visibility `private`, never uploaded. A capture is not a share; to
|
|
151
|
+
publish one, run `share --file` on its session, which opens the review. `capture.log` in the bucket
|
|
152
|
+
has one line per capture, including the ones that skipped or were refused.
|
|
153
|
+
|
|
154
|
+
The post-commit hook never replaces yours: an existing `post-commit` is kept as
|
|
155
|
+
`post-commit.pre-flatbread`, runs first with git's arguments, and its exit status is the hook's.
|
|
156
|
+
It runs after the commit exists, so no SHA changes. When the repository sets `core.hooksPath`
|
|
157
|
+
(husky, lefthook) nothing is written and the line to add is printed. When `core.hooksPath` is
|
|
158
|
+
set machine-wide (system or global config), the hook goes in the repository's own hooks
|
|
159
|
+
directory and setup says it fires only if that machine-wide hook runs it.
|
|
160
|
+
|
|
161
|
+
`setup --dry-run` writes nothing. `setup --uninstall` removes the handlers and the hook, and puts
|
|
162
|
+
a chained hook back byte for byte. `FLATBREAD_HOOK_DISABLED=1` stops every capture.
|
|
163
|
+
|
|
164
|
+
`flatbread search <words>` answers from this machine's shared runs, its captured runs, then the
|
|
165
|
+
site - the same text the MCP tool returns. Words are matched as typed, and by stem ("retry" finds
|
|
166
|
+
"retries" and "retrying"). `--local` leaves the site out; a site that did not answer is said, and
|
|
167
|
+
exits 1.
|
|
168
|
+
|
|
139
169
|
`pull` and `mcp` only read. A token from `flatbread login` goes only to the site that issued it;
|
|
140
170
|
a private run's share link (`?t=`) is sent as a header, never in a URL. Add the MCP server to
|
|
141
171
|
Claude Code with `claude mcp add flatbread -- flatbread mcp`.
|