@grum-os/cli 0.3.13 → 0.3.14

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 +40 -9
  2. package/content.md5 +1 -1
  3. package/grum.mjs +243 -224
  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
 
@@ -182,12 +196,12 @@ The same rule can live in `.grum/config.json`:
182
196
  }
183
197
  ```
184
198
 
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. |
199
+ | Field | Meaning |
200
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
201
+ | `root` | Directory to scan when the app is not at the repository root. `grum check --root` does the same for one run. |
202
+ | `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. |
203
+ | `denyGit` | `commit`, `push`, or both. With `block` and no `denyGit`, both are refused. |
204
+ | `maxFollowups` | How many times the Cursor, Codex or Claude Code stop hook sends the agent back in one conversation. Default is 2. |
191
205
 
192
206
  `block` does not fail a check that is still waiting on review. Use `--strict` for that.
193
207
 
@@ -224,10 +238,12 @@ The menu covers check, setup, and sign-in. These are the same actions as flags,
224
238
  | `grum setup [--root <dir>]` | Sign in, link this repository, and ask about Cursor and the pre-commit check. |
225
239
  | `grum check [flags]` | Check the working tree. See the flags below. |
226
240
  | `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. |
241
+ | `grum uninstall [--yes]` | Remove Grum from this repository and this computer. See [Uninstall](#uninstall). |
227
242
  | `grum capture reset` | Clear this repository's saved capture-browser sign-ins. |
228
243
  | `grum contract` | Print the contract packet. |
229
244
  | `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
245
  | `grum init codex [--remove] [--force] [--local-only] [--pre-commit]` | The same for Codex: `.codex/config.toml`, `.codex/hooks.json` and the `AGENTS.md` block. |
246
+ | `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
247
 
232
248
  ```sh
233
249
  grum check --staged # drift in the blocks staged for commit
@@ -244,7 +260,22 @@ grum check --strict # like --ci, and also fail while a review is
244
260
 
245
261
  `--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
262
 
247
- `grum hook` and `grum mcp` are the entry points Cursor runs. You do not call them yourself.
263
+ `grum hook` and `grum mcp` are the entry points Cursor, Codex and Claude Code run. You do not call them yourself.
264
+
265
+ ## Uninstall
266
+
267
+ ```sh
268
+ npx @grum-os/cli uninstall
269
+ ```
270
+
271
+ Run it in the repository. It asks first (Enter means no), then removes:
272
+
273
+ - **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/`.
274
+ - **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).
275
+
276
+ 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.
277
+
278
+ If you installed the CLI globally, also run `npm uninstall -g @grum-os/cli`.
248
279
 
249
280
  ## Environment
250
281
 
package/content.md5 CHANGED
@@ -1 +1 @@
1
- 7dd72edbaa90ccb6621c5df3d474f9e8
1
+ b71376996348e1a5fdbf69d852b16fc5