@grum-os/cli 0.3.11 → 0.3.13
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 +50 -16
- package/content.md5 +1 -1
- package/grum.mjs +233 -219
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,6 +34,20 @@ Then choose **check**. New drift is listed with a one-line fix, and Grum offers
|
|
|
34
34
|
|
|
35
35
|
Once you are signed in, the third row is **logout**. Run `grum` again and choose **setup** to change the link or turn Cursor off. Enter keeps each current setting.
|
|
36
36
|
|
|
37
|
+
## Set up with your agent
|
|
38
|
+
|
|
39
|
+
A coding agent can do this setup. You paste one prompt into the chat and approve a code in the browser. You do not need to open a terminal.
|
|
40
|
+
|
|
41
|
+
The page you open is [app.grum.so/agent/human](https://app.grum.so/agent/human). The prompt there points the agent at [app.grum.so/agent](https://app.grum.so/agent), which is the instructions in markdown. The agent runs:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx --yes @grum-os/cli setup --agent cursor --json
|
|
45
|
+
```
|
|
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.
|
|
48
|
+
|
|
49
|
+
The menu and the commands above stay as they are. `--agent` is an extra way in, not a replacement.
|
|
50
|
+
|
|
37
51
|
## Cursor
|
|
38
52
|
|
|
39
53
|
Accepting Cursor in the menu puts Grum inside the agent. The agent follows the same contract a person sees in Grum, and it can ask the owners to allow something the contract does not have.
|
|
@@ -66,6 +80,25 @@ These are the files setup writes. They merge into what is already there, and a s
|
|
|
66
80
|
|
|
67
81
|
`grum check --cursor` opens the findings in Cursor instead of walking through them in the terminal.
|
|
68
82
|
|
|
83
|
+
## Codex
|
|
84
|
+
|
|
85
|
+
`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.
|
|
86
|
+
|
|
87
|
+
Codex keeps a project's tools and hooks off until you allow them, so two steps are yours:
|
|
88
|
+
|
|
89
|
+
1. Trust the folder when Codex asks, so it loads the repository's `.codex` files and the **grum** tools.
|
|
90
|
+
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`.
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
| File | What it does |
|
|
95
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| `.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. |
|
|
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
|
+
| `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
|
+
|
|
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.
|
|
101
|
+
|
|
69
102
|
## What a check shows
|
|
70
103
|
|
|
71
104
|
Choosing **check** in the menu prints the same report as `grum check`.
|
|
@@ -149,12 +182,12 @@ The same rule can live in `.grum/config.json`:
|
|
|
149
182
|
}
|
|
150
183
|
```
|
|
151
184
|
|
|
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.
|
|
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. |
|
|
158
191
|
|
|
159
192
|
`block` does not fail a check that is still waiting on review. Use `--strict` for that.
|
|
160
193
|
|
|
@@ -184,16 +217,17 @@ Store it as a secret. Do not commit it. The token acts as you, in every workspac
|
|
|
184
217
|
|
|
185
218
|
The menu covers check, setup, and sign-in. These are the same actions as flags, for scripts and CI.
|
|
186
219
|
|
|
187
|
-
| Command
|
|
188
|
-
|
|
|
189
|
-
| `grum`
|
|
190
|
-
| `grum login` / `grum logout`
|
|
191
|
-
| `grum setup [--root <dir>]`
|
|
192
|
-
| `grum check [flags]`
|
|
193
|
-
| `grum request <key> [--reason "..."] [--url <page>] [--browser chrome | safari] [--no-capture]` | Ask the owners to allow one
|
|
194
|
-
| `grum capture reset`
|
|
195
|
-
| `grum contract`
|
|
196
|
-
| `grum init cursor [--remove] [--force] [--local-only] [--pre-commit]`
|
|
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. |
|
|
197
231
|
|
|
198
232
|
```sh
|
|
199
233
|
grum check --staged # drift in the blocks staged for commit
|
package/content.md5
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7dd72edbaa90ccb6621c5df3d474f9e8
|