The Argon CLI
One binary, argon, creates MongoDB sandboxes for AI agents and reviews what they wrote. It is published as the argonctl package on npm and Homebrew.
This is Argon from Argon Labs, the open-source MongoDB tool. It is not the Argon2 password-hashing utility or Argo CD. Current version: 2.3.0.
Install
npm install -g argonctl@2.3.0 --allow-scripts=argonctlInstalls the argon CLI with npm 11.16+ and a supported Node.js version. Allows only argonctl's binary installer.
argon --versionArgon needs MongoDB running as a replica set; one node is enough. Set MONGODB_URI and run argon doctor to check that it can capture changes. The quickstart starts a local database and runs a full review.
Commands by task
Most commands take -p for the project and -b for the branch, which defaults to main. Commands that print results accept --output json and write one JSON value to standard output.
Sandboxes
A sandbox is a branch forked from a parent, checked out into its own MongoDB database and given a time to live. Hand its connection string to an agent.
argon sandbox create -p <project> --ttl 1h
argon sandbox create -p <project> --ttl 1h --watch --actor agent:run-1
argon sandbox list -p <project>
argon sandbox keep -p <project> -b <sandbox>
argon sandbox discard -p <project> -b <sandbox>
argon sandbox sweep -p <project>--watch (2.3.0 and newer) captures the sandbox's writes in the foreground until you stop it. keep removes the TTL; sweep discards every expired sandbox. A collection the agent creates needs argon collections prepare before its first update or delete.
Review and merge
See what a sandbox or branch changed, save that as a plan, then apply exactly that plan.
argon diff -p <project> -b <branch>
argon merge preview -p <project> -b <branch>
argon merge apply <plan-id>
argon merge list -p <project>A plan applies once and is refused if the parent has moved since the preview. Conflicts stop the merge unless you pass --strategy theirs or --strategy ours.
Pins
A pin names a captured state so every evaluation run can start from the same data.
argon pin create -p <project> --name eval-v1
argon pin sandbox -p <project> --name eval-v1 --ttl 1h
argon pin branch -p <project> --name eval-v1 --as <new-branch>
argon pin list -p <project>
argon pin delete -p <project> --name eval-v1A pin protects the history it references while it exists. It is not a backup.
Projects, branches and real databases
Bring data in, branch it, and check a branch out as an ordinary MongoDB database.
argon import database --uri <mongodb-uri> --database <db> --project <project> --source-quiesced
argon projects create <project>
argon branches create <branch> -p <project>
argon checkout -p <project> -b <branch>
argon collections prepare <collection> -p <project> -b <branch>
argon watch -p <project> -b <branch> --actor <label>
argon release -p <project> -b <branch>Creating a branch writes metadata only. checkout materializes the data and prints a connection string; watch records writes made through it.
Time travel, undo and restore
Read an earlier state, revert a range of changes, or rewind a branch.
argon time-travel info -p <project> -b <branch>
argon time-travel query -p <project> -b <branch> --lsn <lsn>
argon undo -p <project> -b <branch> --from-lsn <lsn> --actor <label> --dry-run
argon restore preview -p <project> -b <branch> --time <rfc3339>
argon restore reset -p <project> -b <branch> --time <rfc3339> --backup <name>
argon restore branch -p <project> -b <branch> --lsn <lsn> --as <new-branch>History is available within the retention window and where capture was complete. Undo appends new entries; it never rewrites history.
Agents, console and health
Run the MCP server for Claude or Cursor, the local console and REST API, or check that MongoDB is ready.
argon mcp
argon mcp --disable-tools argon_merge_apply
argon mcp --read-only
argon console --no-browser
argon proxy
argon doctor
argon statusThe MCP server and the console manage capture and sandbox expiry for the sandboxes they create. The console and the proxy listen on the local machine by default.
Every flag
The complete reference, including import cleanup, snapshots, garbage collection and migration, lives with the source so it always matches the release. argon <command> --help prints the same information for the version you have installed.