@grum-os/cli 0.3.11 → 0.3.12

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 +36 -16
  2. package/content.md5 +1 -1
  3. package/grum.mjs +200 -194
  4. package/package.json +2 -2
package/README.md CHANGED
@@ -66,6 +66,25 @@ These are the files setup writes. They merge into what is already there, and a s
66
66
 
67
67
  `grum check --cursor` opens the findings in Cursor instead of walking through them in the terminal.
68
68
 
69
+ ## Codex
70
+
71
+ `grum init codex` (or `grum setup`, when the repository has a `.codex` folder) puts the same contract inside Codex: the CLI, the desktop app and the IDE extension, 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.
72
+
73
+ Codex keeps a project's tools and hooks off until you allow them, so two steps are yours:
74
+
75
+ 1. Trust the folder when Codex asks, so it loads the repository's `.codex` files and the **grum** tools.
76
+ 2. Open Codex **Settings, Hooks**, open the project, and allow Grum's 3 hooks (they show as "need review"). In the terminal app, run `/hooks`.
77
+
78
+ Without step 2 the tools still work and the agent still follows the guidance, but nothing checks when Codex stops and `git commit` and `git push` are not refused. Until a hook has run, the agent reminds you.
79
+
80
+ | File | What it does |
81
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
82
+ | `.codex/config.toml` | Adds the same four tools. Only Grum's own block is written; the rest of the file is left as it is, and a file that is not valid TOML stops setup. |
83
+ | `.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). |
84
+ | `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. |
85
+
86
+ `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.
87
+
69
88
  ## What a check shows
70
89
 
71
90
  Choosing **check** in the menu prints the same report as `grum check`.
@@ -149,12 +168,12 @@ The same rule can live in `.grum/config.json`:
149
168
  }
150
169
  ```
151
170
 
152
- | Field | Meaning |
153
- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
154
- | `root` | Directory to scan when the app is not at the repository root. `grum check --root` does the same for one run. |
155
- | `block` | `true` makes `grum check` fail on open or rejected drift, and makes Cursor refuse the git commands below while that drift is in what they would send. |
156
- | `denyGit` | `commit`, `push`, or both. With `block` and no `denyGit`, both are refused. |
157
- | `maxFollowups` | How many times the Cursor stop hook sends the agent back in one conversation. Default is 2. |
171
+ | Field | Meaning |
172
+ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
173
+ | `root` | Directory to scan when the app is not at the repository root. `grum check --root` does the same for one run. |
174
+ | `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. |
175
+ | `denyGit` | `commit`, `push`, or both. With `block` and no `denyGit`, both are refused. |
176
+ | `maxFollowups` | How many times the Cursor or Codex stop hook sends the agent back in one conversation. Default is 2. |
158
177
 
159
178
  `block` does not fail a check that is still waiting on review. Use `--strict` for that.
160
179
 
@@ -184,16 +203,17 @@ Store it as a secret. Do not commit it. The token acts as you, in every workspac
184
203
 
185
204
  The menu covers check, setup, and sign-in. These are the same actions as flags, for scripts and CI.
186
205
 
187
- | Command | What it does |
188
- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
189
- | `grum` | The menu. Check, setup (including Cursor), or sign in. |
190
- | `grum login` / `grum logout` | Sign this computer in to Grum, or out. |
191
- | `grum setup [--root <dir>]` | Sign in, link this repository, and ask about Cursor and the pre-commit check. |
192
- | `grum check [flags]` | Check the working tree. See the flags below. |
193
- | `grum request <key> [--reason "..."] [--url <page>] [--browser chrome | safari] [--no-capture]` | Ask the owners to allow one drift item. |
194
- | `grum capture reset` | Clear this repository's saved capture-browser sign-ins. |
195
- | `grum contract` | Print the contract packet. |
196
- | `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. |
206
+ | Command | What it does |
207
+ | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
208
+ | `grum` | The menu. Check, setup (including Cursor), or sign in. |
209
+ | `grum login` / `grum logout` | Sign this computer in to Grum, or out. |
210
+ | `grum setup [--root <dir>]` | Sign in, link this repository, and ask about Cursor and the pre-commit check. |
211
+ | `grum check [flags]` | Check the working tree. See the flags below. |
212
+ | `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. |
213
+ | `grum capture reset` | Clear this repository's saved capture-browser sign-ins. |
214
+ | `grum contract` | Print the contract packet. |
215
+ | `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. |
216
+ | `grum init codex [--remove] [--force] [--local-only] [--pre-commit]` | The same for Codex: `.codex/config.toml`, `.codex/hooks.json` and the `AGENTS.md` block. |
197
217
 
198
218
  ```sh
199
219
  grum check --staged # drift in the blocks staged for commit
package/content.md5 CHANGED
@@ -1 +1 @@
1
- 71bc33673e6eb4f9b0dab838dc1aad58
1
+ 91072ef44363e75d825b32a6e9dedb31