@grum-os/cli 0.3.13 → 0.3.15

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 (4) hide show
  1. package/README.md +54 -21
  2. package/content.md5 +1 -1
  3. package/grum.mjs +247 -223
  4. package/package.json +2 -2
package/README.md CHANGED
@@ -44,7 +44,7 @@ The page you open is [app.grum.so/agent/human](https://app.grum.so/agent/human).
44
44
  npx --yes @grum-os/cli setup --agent cursor --json
45
45
  ```
46
46
 
47
- Use `codex` or `generic` instead of `cursor` for those agents. The command prints JSON. Exit 0 means ready, exit 2 means the agent should take the next action and run it again, and exit 1 is a fault. `grum doctor --agent cursor --json` reports the same checks and changes nothing.
47
+ Use `codex`, `claude` (Claude Code) or `generic` instead of `cursor` for those agents. The command prints JSON. Exit 0 means ready, exit 2 means the agent should take the next action and run it again, and exit 1 is a fault. `grum doctor --agent cursor --json` reports the same checks and changes nothing.
48
48
 
49
49
  The menu and the commands above stay as they are. `--agent` is an extra way in, not a replacement.
50
50
 
@@ -97,7 +97,21 @@ Without step 2 the tools still work and the agent still follows the guidance, bu
97
97
  | `.codex/hooks.json` | Three hooks beside any of yours: after an edit, before a shell command, and at stop. They behave as Cursor's do, including [blocking](#fail-the-check). |
98
98
  | `AGENTS.md` | A marked block that tells the agent to read the contract, check before it stops, and ask before keeping an off-contract style. |
99
99
 
100
- `grum init codex --remove` takes out exactly these. A repository set up for both Cursor and Codex keeps the `.gitignore` line and the pre-commit check until both are removed.
100
+ `grum init codex --remove` takes out exactly these. A repository set up for more than one agent keeps the `.gitignore` line and the pre-commit check until the last one is removed.
101
+
102
+ ## Claude Code
103
+
104
+ `grum init claude` (or `grum setup`, when the repository has a `.claude` folder) puts the same contract inside Claude Code: the CLI, the desktop app and the IDE extensions, on this computer. The agent reads the contract before it writes UI, checks before it finishes, and asks you once when nothing in the contract fits, exactly as Cursor's does.
105
+
106
+ Claude Code runs a project's tools and hooks only in a folder you trust, so one step is yours: start a new Claude Code session in the repository and trust the folder when it asks. If it asks about the **grum** MCP server, approve it. A session that was already open keeps its old hooks and tools until you start a new one.
107
+
108
+ | File | What it does |
109
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
110
+ | `.mcp.json` | Adds the same four tools. Other servers in the file are left as they are. |
111
+ | `.claude/settings.json` | Three hooks beside any of yours: after an edit, before a shell command, and at stop. They behave as Cursor's do, including [blocking](#fail-the-check). Also approves the **grum** server. |
112
+ | `CLAUDE.md` | A marked block that tells the agent to read the contract, check before it stops, and ask before keeping an off-contract style. |
113
+
114
+ `grum init claude --remove` takes out exactly these; the rest of each file stays.
101
115
 
102
116
  ## What a check shows
103
117
 
@@ -145,7 +159,9 @@ grum request "color:raw:#3C3C3C" \
145
159
  --url http://localhost:3000
146
160
  ```
147
161
 
148
- `--url` is the page where the element renders, or an HTML file in the repo (`./index.html`) when there is no dev server. A page behind a login is captured through the Grum Chrome extension, in your own browser session. `--browser chrome` or `--browser safari` picks the browser. `--no-capture` sends the request with no picture.
162
+ Captures default to the local app. Use `grum request <key> [<key>...] --live` to capture the configured live site after a release. Grum uses the route identified by the finding's source file when it can, otherwise the site's configured URL. This leaves the saved local-app URL unchanged and adds no confirmation prompt. The target URL is printed before capture.
163
+
164
+ `--url` is the page where the element renders, or an HTML file in the repo (`./index.html`) when there is no dev server. An explicit `--url` takes priority over `--live`, including when a shared component needs a specific page. A page behind a login is captured through the Grum Chrome extension, in your own browser session. `--browser chrome` or `--browser safari` picks the browser. `--no-capture` sends the request with no picture.
149
165
 
150
166
  ```sh
151
167
  grum capture reset
@@ -182,12 +198,12 @@ The same rule can live in `.grum/config.json`:
182
198
  }
183
199
  ```
184
200
 
185
- | Field | Meaning |
186
- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
187
- | `root` | Directory to scan when the app is not at the repository root. `grum check --root` does the same for one run. |
188
- | `block` | `true` makes `grum check` fail on open or rejected drift, and makes Cursor and Codex refuse the git commands below while that drift is in what they would send. |
189
- | `denyGit` | `commit`, `push`, or both. With `block` and no `denyGit`, both are refused. |
190
- | `maxFollowups` | How many times the Cursor or Codex stop hook sends the agent back in one conversation. Default is 2. |
201
+ | Field | Meaning |
202
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
203
+ | `root` | Directory to scan when the app is not at the repository root. `grum check --root` does the same for one run. |
204
+ | `block` | `true` makes `grum check` fail on open or rejected drift, and makes Cursor, Codex and Claude Code refuse the git commands below while that drift is in what they would send. |
205
+ | `denyGit` | `commit`, `push`, or both. With `block` and no `denyGit`, both are refused. |
206
+ | `maxFollowups` | How many times the Cursor, Codex or Claude Code stop hook sends the agent back in one conversation. Default is 2. |
191
207
 
192
208
  `block` does not fail a check that is still waiting on review. Use `--strict` for that.
193
209
 
@@ -217,17 +233,19 @@ Store it as a secret. Do not commit it. The token acts as you, in every workspac
217
233
 
218
234
  The menu covers check, setup, and sign-in. These are the same actions as flags, for scripts and CI.
219
235
 
220
- | Command | What it does |
221
- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
222
- | `grum` | The menu. Check, setup (including Cursor), or sign in. |
223
- | `grum login` / `grum logout` | Sign this computer in to Grum, or out. |
224
- | `grum setup [--root <dir>]` | Sign in, link this repository, and ask about Cursor and the pre-commit check. |
225
- | `grum check [flags]` | Check the working tree. See the flags below. |
226
- | `grum request <key> [<key>...] [--reason "..."] [--url <page>] [--browser chrome | safari] [--no-capture]` | Ask the owners to allow drift items; items on one page capture together. |
227
- | `grum capture reset` | Clear this repository's saved capture-browser sign-ins. |
228
- | `grum contract` | Print the contract packet. |
229
- | `grum init cursor [--remove] [--force] [--local-only] [--pre-commit]` | Write or remove the Cursor files without the menu. `--pre-commit` adds the commit check. `--no-pre-commit` removes it. |
230
- | `grum init codex [--remove] [--force] [--local-only] [--pre-commit]` | The same for Codex: `.codex/config.toml`, `.codex/hooks.json` and the `AGENTS.md` block. |
236
+ | Command | What it does |
237
+ | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
238
+ | `grum` | The menu. Check, setup (including Cursor), or sign in. |
239
+ | `grum login` / `grum logout` | Sign this computer in to Grum, or out. |
240
+ | `grum setup [--root <dir>]` | Sign in, link this repository, and ask about Cursor and the pre-commit check. |
241
+ | `grum check [flags]` | Check the working tree. See the flags below. |
242
+ | `grum request <key> [<key>...] [--reason "..."] [--url <page>] [--live] [--browser chrome | safari] [--no-capture]` | Ask the owners to allow drift items; items on one page capture together. |
243
+ | `grum uninstall [--yes]` | Remove Grum from this repository and this computer. See [Uninstall](#uninstall). |
244
+ | `grum capture reset` | Clear this repository's saved capture-browser sign-ins. |
245
+ | `grum contract` | Print the contract packet. |
246
+ | `grum init cursor [--remove] [--force] [--local-only] [--pre-commit]` | Write or remove the Cursor files without the menu. `--pre-commit` adds the commit check. `--no-pre-commit` removes it. |
247
+ | `grum init codex [--remove] [--force] [--local-only] [--pre-commit]` | The same for Codex: `.codex/config.toml`, `.codex/hooks.json` and the `AGENTS.md` block. |
248
+ | `grum init claude [--remove] [--force] [--local-only] [--pre-commit]` | The same for Claude Code: `.mcp.json`, `.claude/settings.json` and the `CLAUDE.md` block. |
231
249
 
232
250
  ```sh
233
251
  grum check --staged # drift in the blocks staged for commit
@@ -244,7 +262,22 @@ grum check --strict # like --ci, and also fail while a review is
244
262
 
245
263
  `--ci` and `--report` show up on the Drift page under Recent checks, one latest run per branch. CI, JSON, staged, and agent runs never open the menu and never prompt.
246
264
 
247
- `grum hook` and `grum mcp` are the entry points Cursor runs. You do not call them yourself.
265
+ `grum hook` and `grum mcp` are the entry points Cursor, Codex and Claude Code run. You do not call them yourself.
266
+
267
+ ## Uninstall
268
+
269
+ ```sh
270
+ npx @grum-os/cli uninstall
271
+ ```
272
+
273
+ Run it in the repository. It asks first (Enter means no), then removes:
274
+
275
+ - **From this repository:** Grum's Cursor, Codex and Claude Code entries (only Grum's; the rest of each file stays), the pre-commit check, the `.gitignore` line, and `.grum/`.
276
+ - **From this computer:** every sign-in, ended in Grum too so the token stops working, and `~/.config/grum` (sign-ins, capture browser data, the log).
277
+
278
+ Your workspace, contract and reviews stay in Grum. Other repositories you set up keep their files: run it in each. `--yes` skips the question, for scripts and agents.
279
+
280
+ If you installed the CLI globally, also run `npm uninstall -g @grum-os/cli`.
248
281
 
249
282
  ## Environment
250
283
 
package/content.md5 CHANGED
@@ -1 +1 @@
1
- 7dd72edbaa90ccb6621c5df3d474f9e8
1
+ 9614fc1e9b7efa072f3d6c940bafa171