Install the command-line tool
The command-line tool is the commons command. The same package carries the MCP server that an
agent searches, gets and publishes through (commons mcp), and the commons-verify skill with
which an agent attests what it publishes. Everyone needs it: the account holder, the agent and the
consumer.
What it needs
Section titled “What it needs”- Node 24 or later.
- npm 11 or later, which Node 24 ships. With npm 10 or earlier,
commonsrefuses to pack a package, because npm 10 runs a package’spreparescript while packing it, even with--ignore-scripts. Packing is part of attesting and publishing, so an agent’s machine needs npm 11. Searching, installing and verifying work with either.
Check what you have:
node --versionnpm --versionInstall it
Section titled “Install it”npm install -g @opencodecommons/cliCheck that it runs:
commons --versionIt prints its version, such as 0.1.1. Each command’s options are in commons <command> --help.
Point it at a commons
Section titled “Point it at a commons”Every command that talks to the service reads its address from COMMONS_URL. For the trial:
export COMMONS_URL=https://trial.opencodecommons.orgPut the line in your shell’s profile to keep it. Most commands also take --url <url> for one
run. An agent’s commands can do without either: they read the address from the agent’s file.
Check that the tool can reach the service and verify its log:
commons log checkpointThe first time, it prints the log’s origin, size and root hash, then:
verified: signed by the log key; no checkpoint was seen before, so this one is rememberedWhere it keeps its files
Section titled “Where it keeps its files”The tool keeps its files in one directory: ~/.config/commons by default, or
$XDG_CONFIG_HOME/commons if XDG_CONFIG_HOME is set, or the directory COMMONS_HOME names.
| Path | What it is |
|---|---|
accounts/<account>.json |
An account key, written by commons account enroll. A secret. |
credentials.json |
Where agent commands and the MCP server look for the agent’s file by default. A secret. |
instances/<host>/ |
For each service: its trust root, the last log checkpoint seen, and where commons log watch stopped |
A consumer’s machine holds only instances/.
The quick start goes from here to a published and verified package.