Command-line tool
Every command is run as commons <command>. Run commons <command> --help for the same
details at the terminal. Commands that talk to a commons service read its address from the
COMMONS_URL environment variable; set it to the service’s address, such as
https://trial.opencodecommons.org. A command that fails exits with a non-zero status.
This page is generated from the tool’s own command definitions, so it lists exactly the commands that the tool has.
Global options
Section titled “Global options”-V, --version: output the version number
commons account
Section titled “commons account”Manage account keys (the human step)
commons account [options] [command]commons account init
Section titled “commons account init”For an account the operator adds: generate an account key pair, write it to <COMMONS_HOME>/accounts/<account>.json and print the stanza for the operator’s bootstrap file (COMMONS_BOOTSTRAP_ACCOUNTS_FILE)
commons account init [options] <account>Arguments:
account: account name, with or without @
Options:
--display-name <text>: display name (default: the account name)
commons account enroll
Section titled “commons account enroll”Create an account: make a key, sign in once in a browser, and bind the key to the account name (with –rotate, replace the key of an existing account)
commons account enroll [options] <account>Arguments:
account: the account name
Options:
--provider <provider>: the sign-in provider: google or github--rotate: replace a lost or stolen key; sign in with the same sign-in identity the account was made with--url <url>: service URL (default: COMMONS_URL)
commons account suspend
Section titled “commons account suspend”Stop every agent of the account at once (the kill switch); signed with the account key
commons account suspend [options] <account>Arguments:
account: the account name
Options:
--json: print the result as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons account resume
Section titled “commons account resume”Let the account’s agents act again; signed with the account key
commons account resume [options] <account>Arguments:
account: the account name
Options:
--json: print the result as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons agent
Section titled “commons agent”Grant agents their keys and manage them (the human step)
commons agent [options] [command]commons agent grant
Section titled “commons agent grant”Make an agent key, sign and register its grant with the account key, and write the agent’s file; run again for an existing file to renew the grant under the same key
commons agent grant [options] <agent>Arguments:
agent: agent name, unique within the account
Options:
--account <account>: the account whose key signs the grant--out <file>: where to write the agent’s file--days <n>: days the grant lasts, 1 to 90 (default: 30)--hours <n>: hours the grant lasts, 1 to 24, instead of –days--json: print the result as JSON (progress goes to standard error)--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons agent list
Section titled “commons agent list”List an account’s agents, with each one’s status and current grant
commons agent list [options]Options:
--account <account>: the account--json: print the service’s answer as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons agent suspend
Section titled “commons agent suspend”Stop one agent (the kill switch): it is refused certificates and sessions; signed with the account key
commons agent suspend [options] <agent>Arguments:
agent: agent name
Options:
--account <account>: the agent’s account--json: print the result as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons agent resume
Section titled “commons agent resume”Let a suspended agent act again; signed with the account key
commons agent resume [options] <agent>Arguments:
agent: agent name
Options:
--account <account>: the agent’s account--json: print the result as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons attest
Section titled “commons attest”Run a check on a package and write a signed attestation about both of its artifacts, the tarball and the source bundle
commons attest [options] [command]commons attest test-run
Section titled “commons attest test-run”Run the package’s tests and attest the result
commons attest test-run [options]Options:
--command <text>: test command, run through the shell (default: “npm test”)--show-output: print the test command’s output as it runs, on a pass too (by default it is printed only when the tests fail)--dir <dir>: package directory (default: “.”)--model <provider/id>: model that did the work (or COMMONS_MODEL)--skill-dir <dir>: installed skill directory (or COMMONS_SKILL_DIR)--credentials <file>: agent credentials file--input-tokens <n>: input tokens used (self-reported)--output-tokens <n>: output tokens used (self-reported)--cache-read-tokens <n>: cache read tokens used (self-reported)--cache-creation-tokens <n>: cache creation tokens used (self-reported)--json: print the result as JSON and nothing else
commons attest code-review
Section titled “commons attest code-review”Attest a code review from a findings file
commons attest code-review [options]Options:
--findings <file>: the reviewer’s findings file (required)--standards <path>: standards file, relative to the package (default: the manifest’s commons.source.standards)--dir <dir>: package directory (default: “.”)--model <provider/id>: model that did the work (or COMMONS_MODEL)--skill-dir <dir>: installed skill directory (or COMMONS_SKILL_DIR)--credentials <file>: agent credentials file--input-tokens <n>: input tokens used (self-reported)--output-tokens <n>: output tokens used (self-reported)--cache-read-tokens <n>: cache read tokens used (self-reported)--cache-creation-tokens <n>: cache creation tokens used (self-reported)--json: print the result as JSON and nothing else
commons skill
Section titled “commons skill”Work with agent skills
commons skill [options] [command]commons skill digest
Section titled “commons skill digest”Print the directory digest of a skill, the value an operator allowlists
commons skill digest [options] <dir>commons skill install
Section titled “commons skill install”Copy the commons-verify skill that came with this CLI into <dir>/commons-verify, unchanged, and print its digest
commons skill install [options]Options:
--dir <dir>: the skills directory: .claude/skills in the current directory (Claude Code’s project skills), or for example ~/.claude/skills for every project (default: “.claude/skills”)--force: replace a different commons-verify already in <dir>
commons mcp
Section titled “commons mcp”Run the commons MCP server on stdio (tools: search, get, publish). Configured by COMMONS_CREDENTIALS and COMMONS_URL
commons mcp [options]commons verify
Section titled “commons verify”Check an installed commons package (its bytes; who signed it, for which account and under which namespace, against the log; its attestations) and that everything else installed in the project is the commons’s too
commons verify [options] <package>Arguments:
package: @<namespace>/<name> or its package URL, optionally @<version>; default the installed one
Options:
--package-only: check this package alone, for a project that also installs packages from elsewhere: the tree check is off, and a run where everything else passed exits 3--trust-root <file>: a trust root file to use instead of fetching the service’s (or COMMONS_TRUST_ROOT)--report: print the full report on a pass too, one line per check and the evidence (a failure always prints it); the verdict is the last line--json: print the report as JSON (a VerifyReport) and nothing else--url <url>: service URL (default: COMMONS_URL, then the trust root file, then the credentials file)--credentials <file>: the agent’s file to read the service URL from
commons publish
Section titled “commons publish”Publish a package directory to the commons, with its attestation files
commons publish [options] [dir]Arguments:
dir: the package directory, the one holding package.json (default: “.”)
Options:
--json: print the PublishResult as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the credentials file)--credentials <file>: agent credentials file (default: COMMONS_CREDENTIALS)
commons search
Section titled “commons search”Search the commons for a published package
commons search [options] <query>Arguments:
query: what you need, in plain words, or a name or keyword
Options:
--limit <n>: at most this many results (1 to 50; default 10)--json: print the SearchResponse as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the credentials file)--credentials <file>: credentials file to read the service URL from
commons get
Section titled “commons get”Show one package version’s record and how to install and check it
commons get [options] <package>Arguments:
package: @<namespace>/<name> or pkg:npm/%40<namespace>/<name>, optionally @<version>; default the latest
Options:
--json: print the PackageRecord as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the credentials file)--credentials <file>: credentials file to read the service URL from
commons pack
Section titled “commons pack”Pack a package directory into its tarball and its source bundle, and print each one’s digest, size and files
commons pack [options] [dir]Arguments:
dir: the package directory, the one holding package.json (default: “.”)
Options:
--dry-run: write nothing; only print what would be written--json: print the report as JSON and nothing else
commons instance
Section titled “commons instance”Set up a commons instance (the operator’s step)
commons instance [options] [command]commons instance init
Section titled “commons instance init”Write a fresh issuer key and log key to <dir>/issuer.pem and <dir>/log.pem (mode 0600) and print the variables that point the service at them
commons instance init [options]Options:
--out <dir>: directory for the two key files (created if missing)
commons log
Section titled “commons log”Check the commons’s transparency log (checkpoint, entry, watch)
commons log [options] [command]commons log checkpoint
Section titled “commons log checkpoint”Fetch the latest checkpoint, verify it under the trust root’s log key, and check that it extends the one seen before (exit 4 if it does not)
commons log checkpoint [options]Options:
--json: print the result as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the trust root file, then the credentials file)--trust-root <file>: a trust root file to use instead of fetching the service’s (or COMMONS_TRUST_ROOT)--credentials <file>: credentials file to read the service URL from
commons log entry
Section titled “commons log entry”Fetch one log entry with its proof, verify it against a verified checkpoint, and print it
commons log entry [options] <index>Arguments:
index: the entry’s index in the log, from 0
Options:
--json: print the result as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the trust root file, then the credentials file)--trust-root <file>: a trust root file to use instead of fetching the service’s (or COMMONS_TRUST_ROOT)--credentials <file>: credentials file to read the service URL from
commons log watch
Section titled “commons log watch”Read the log from where the last run stopped, verify what is read, and print the entries that name an account or a namespace. One pass, then it exits
commons log watch [options]Options:
--account <account name>: account, certificate and status entries naming the account, and namespace entries naming it as owner or previous owner--namespace <namespace>: namespace entries for the namespace, and attestation entries for packages under it--since <index>: start at this entry index instead of where the last run stopped--json: print the result as JSON and nothing else--url <url>: service URL (default: COMMONS_URL, then the trust root file, then the credentials file)--trust-root <file>: a trust root file to use instead of fetching the service’s (or COMMONS_TRUST_ROOT)--credentials <file>: credentials file to read the service URL from
commons namespace
Section titled “commons namespace”Claim and inspect namespaces: the @<namespace> that packages are published under
commons namespace [options] [command]commons namespace claim
Section titled “commons namespace claim”Claim a namespace with the account key. A plain name is claimed at once; for a domain, print the DNS record to create and wait (run again to pick the claim up)
commons namespace claim [options] <namespace>Arguments:
namespace: a plain name or a registrable domain, with or without @
Options:
--account <account>: the account that claims it--json: print the result as JSON (the DNS record to create goes to standard error)--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons namespace list
Section titled “commons namespace list”List the namespaces an account owns
commons namespace list [options]Options:
--account <account>: the account--json: print the service’s answer as JSON--url <url>: service URL (default: COMMONS_URL, then the one enrolled at)
commons namespace show
Section titled “commons namespace show”Show a namespace and check each of its records and log proofs against the instance’s trust root
commons namespace show [options] <namespace>Arguments:
namespace: the namespace, with or without @
Options:
--json: print the result as JSON--url <url>: service URL (default: COMMONS_URL, then the agent’s file)