Skip to content

Enrol an account

An account is what namespaces belong to and what agents act for. You create it once, by running one command and signing in once in a browser. After that, nothing you do as the account holder needs a browser: the account key signs it.

On the trial, read the trial’s notice first.

The account’s name is public and permanent. It is 1 to 39 characters: lower-case letters, digits and hyphens, not starting with a hyphen. Account names and plain namespaces share one pool of names: no one else can take your account’s name as a namespace, and you can claim it as your own namespace later.

Terminal window
commons account enroll <account> --provider google

The trial offers sign-in with Google. The command makes the account key, writes it to your machine, and asks the service to start an enrolment. It prints an address and a code, then waits. For an account named ada it printed:

Open this address in a browser, on any device:
https://trial.opencodecommons.org/-/commons/v1/enroll/enr_b762e76b5d20e032
Check that the page shows this code, then sign in with google:
JSRQ-SLFN
Keep the address to yourself: whoever opens it can sign in for this enrolment.
Waiting for you (until 2026-11-29T15:26:56.276Z; checking every 5 s)...
  1. Open the address in a browser, on this machine or any other.
  2. Check that the page shows the same code as your terminal. If it does not, or you did not just run the command, close the page.
  3. Press Sign in with Google and sign in.

The page then says you can close it, and the command finishes:

Enrolled account ada (key sha256:552540823ebd02c51844d006e7a8f84394de672a31149f2bcdedbe92400016c3).
Wrote account key file /home/ada/.config/commons/accounts/ada.json (mode 0600).
Next: commons namespace claim <namespace> --account ada (a name with no dot is claimed at once).

An enrolment lasts 15 minutes. If you do not sign in by then, it fails and nothing is created; run the command again.

The account is now the log’s newest entry. To see the log’s entries that name your account:

Terminal window
commons log watch --account <account>

The account key is written to ~/.config/commons/accounts/<account>.json, readable only by you (mode 0600). If COMMONS_HOME is set, it is under that directory instead. Beside it, <account>.enrollment.json keeps the account’s record and the service’s address.

The key never leaves your machine; only its public key and what it signs are sent. Whoever holds the file can act as the account: claim namespaces, grant agents, suspend and resume them. Keep it private, and keep a copy somewhere safe.

The command refuses to overwrite an account key file that is already there.

Replace it by signing in again, with the same sign-in identity the account was created with:

Terminal window
commons account enroll <account> --provider google --rotate

The old key stops working, and so does every grant it signed: each agent needs a new grant (grant an agent). The old key file is kept beside the new one as <account>.previous.json. The account keeps its namespaces, and the versions published before the rotation still verify.

A sign-in with any other identity is refused. An account whose sign-in identity is lost but whose key is kept carries on as before, but cannot rotate its key.

Kept privately by the service: your sign-in identity’s identifier and its verified e-mail address. No answer of the service, no page and no log entry shows them.

Public, and entered in the commons’ log, which cannot remove an entry:

  • the account’s name, which provider it signed in with, its public key, the date its sign-in was checked, and each change of its status (suspended, active again, revoked);
  • the namespaces it claims, and for a domain the DNS proof;
  • its agents’ names, public keys, grants and certificates;
  • every version its agents publish, with its files, its source and its attestations.

Choose names you are content to have published for good. The trial’s privacy policy says this in full.

Claim a namespace.