Manual. One worker, one append-only log, the rules read again at every step.
Linux, macOS and Windows, x64 or arm64. On Linux and macOS, one command, once per machine. It downloads the latest release, checks its sha256 and size, unpacks into ~/.gmnew/current, then runs the installed binary's gm install subcommand, which registers gm for Claude Code at user level.
curl -fsSL https://raw.githubusercontent.com/AnEntrypoint/gm/main/scripts/install.sh | sh
Needs curl, tar, and sha256sum or shasum. Node is not needed to run gm.
The archive holds gm and gm-core (gm.exe and gm-core.exe on Windows) and the leaves, skills and defaults directories. Both installers check the two binaries, retry downloads, and write .gmnew-update.json when it is missing.
To register gm with a playwriter config:
curl -fsSL https://raw.githubusercontent.com/AnEntrypoint/gm/main/scripts/install.sh | sh -s -- --mcp-config <path>
Windows x64 and arm64 build and test in CI and are published as .zip. Run scripts/install.ps1 with PowerShell; it unpacks into %USERPROFILE%\.gmnew\current and runs gm.exe install. Its -McpConfig argument forwards the config to gm.exe install.
The installer runs ~/.gmnew/current/gm install (on Windows, %USERPROFILE%\.gmnew\current\gm.exe install). The binary writes mcpServers.gm in ~/.claude.json (on Windows, %USERPROFILE%\.claude.json) at user scope, with command set to its own path and args starting with serve. Every other key is kept; running it again replaces the gm entry.
~/.gmnew/current/gm install [--mcp-config <path>]
With --mcp-config <path>, those two arguments are appended to args. With GMNEW_SKIP_REGISTER=1, the installer leaves the files in place and skips this step; run the command above later to register.
Check mcpServers.gm in ~/.claude.json for the command path. Remove the same key to disconnect. A project .mcp.json with its own gm entry overrides this one in that project. Keep such a file out of the gm checkout.
Start a Claude Code session in a project. The session calls gm's three tools, and gm works in the session's folder unless told otherwise. Every run writes an append-only log under runs/ in the workspace.
next_context at the start of a run, after a compaction, and when a reply reports pending events. A full reply carries the rules, the task, and the events since the last step; a call with nothing new answers in one line and takes no step.run_code call. Its body is JavaScript with a gm object whose methods are the verbs.finish with a witness: one string quoting the output it actually saw. A finish without a witness is refused.After finish, the first next_context opens a successor run that inherits the ended run's task. A different task on that call needs owner: true; one call, next_context({ task: '<new task>', owner: true }), opens the successor and sets its task.
| Tool | Purpose |
|---|---|
| next_context | Begin a step. Returns the rules, the task, the pending events, and the step count. |
| run_code | Run a JavaScript body against the project. Verbs are functions on gm. |
| finish | End the run. Needs a witness. Refused while a background run or an open row remains. |
The server serves these three tools.
Each verb is a function on gm, awaited with one object argument:
const [a, b] = await Promise.all([
gm.read_file({ path: 'a.txt' }),
gm.read_file({ path: 'b.txt' }),
]);
return { a: a.output.length, b: b.output.length };
A failed verb returns { ok: false, error } and does not stop the body. Wrap a risky step in gm.try to isolate it.
read_file, write_file, edit_file, stat_file, list_dir, run_shell.
search (BM25 over tracked files), grep, wiki_search, wiki_write, callers, impact.
job_start, job_status, job_stop. A body that runs past its budget (180 seconds by default, at most 3600000) becomes a background run; job_status with waitMs waits for it.
git_status, git_add, git_rm, git_commit, git_push, git_log, git_diff, git_show, git_fetch, git_pull, git_checkout, git_branch, ci_status.
prd_add, prd_list, prd_park, prd_reopen, prd_resolve, prd_delete, unknown_add, unknown_list, unknown_resolve, review_packet, review_record, review_join.
fetch, query_log (reads the run's own log), and any MCP server configured for the project as gm.<server>_<tool>.
Call gm.verbs() inside run_code to get each verb's schema as data. Wrap a call that may throw in gm.try(fn) so one failure does not hide the rest of a batch; both helpers are named in run_code's description.
Work that splits into independent units is shaped by skill://gm/WORKFLOWS.md, a served skill file read on demand with gm.read_file({ path: 'skill://gm/WORKFLOWS.md' }). It holds the work order (search and insight, just-in-time execution, elimination waves, validation by running code), the graph shapes (scout then fan out, pipeline over barrier, adversarial refuters, loop until dry, a completeness critic, no silent caps, a budget guard), the map to gm verbs, and the witness counts. The seven rules and the connect-time instructions stay short; a single-file edit stays in one body. Re-read it after a compaction before the next fan-out. When stepsLeft reaches 0, call finish with a witness and then next_context to open a successor run; do not call next_context first.
The server checks the latest release when it starts and then every 15 minutes. Each check is a conditional request, so an unchanged release costs one small response. It downloads a build only when that target's archive has changed, and only one check runs at a time across processes. Each build is published under its own file names, the manifest is uploaded last, and the last three builds stay on the release.
A development build never updates itself. Set GMNEW_AUTO_UPDATE=0 to turn updates off.
To check now:
~/.gmnew/current/gm update
| Command | What it does |
|---|---|
gm serve | Serve the MCP tools on stdio. This is what Claude Code runs. |
gm install | Write the user-scope Claude Code entry; --mcp-config adds its two arguments to serve. |
gm worker | Run one worker directly. Used by the supervisor. |
gm doctor | Check the install’s runtime. |
gm update | Check for a newer release and install it if one exists. |
| Variable | Effect |
|---|---|
| GMNEW_AUTO_UPDATE=0 | Turn off the background update check. |
| GMNEW_UPDATE_URL | Read the manifest from this URL instead of the default release. |
| GMNEW_RELEASE_BASE | Installer only: the release directory to download from. |
| GMNEW_SKIP_REGISTER=1 | Installer only: unpack the files and skip the gm install registration. |
The manifest and archive disagree. Run the install again. Each archive is versioned as gmnew-<version>-<target>.tar.gz on Linux and macOS or .zip on Windows, so a mismatch should no longer occur on a fresh release.
An update lock is held. The lock records its owner's process id. If that process has exited, the next check takes the lock over. Otherwise wait for the running check to finish.
Check mcpServers.gm in ~/.claude.json (on Windows, %USERPROFILE%\.claude.json): command should name the installed gm and args should start with serve. Run the installed gm install again to replace a stale path, then gm doctor. If a project .mcp.json defines its own gm entry, that entry is the one Claude Code uses in that project.
Windows x64 and arm64 build and test jobs pass in CI and are published as .zip. Use scripts/install.ps1; -McpConfig forwards a worker config.
Delete mcpServers.gm from ~/.claude.json (on Windows, %USERPROFILE%\.claude.json), then remove the install:
rm -rf ~/.gmnew
On Windows, remove %USERPROFILE%\.gmnew instead.