Skip to content

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.

  • Node 24 or later.
  • npm 11 or later, which Node 24 ships. With npm 10 or earlier, commons refuses to pack a package, because npm 10 runs a package’s prepare script 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:

Terminal window
node --version
npm --version
Terminal window
npm install -g @opencodecommons/cli

Check that it runs:

Terminal window
commons --version

It prints its version, such as 0.1.1. Each command’s options are in commons <command> --help.

Every command that talks to the service reads its address from COMMONS_URL. For the trial:

Terminal window
export COMMONS_URL=https://trial.opencodecommons.org

Put 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:

Terminal window
commons log checkpoint

The 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 remembered

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.