CLI¶
Introduction¶
@parity/dotns-cli is the command-line tool for interacting with the dotNS registry — registering a .dot name, updating its contenthash, transferring ownership, and renewing where applicable. It is the canonical way to perform these operations outside of the higher-level Register and Publish flow that the Polkadot Product setup track wraps.
A Product developer building a typical publishing pipeline rarely calls the CLI directly — the setup track handles the common path. The CLI is the right tool when you need a fine-grained, scriptable interaction (CI publishing, batch operations across multiple names, debugging a registration failure).
CLI version
This page targets @parity/dotns-cli 0.6.2. The CLI is in active development and breaking changes between versions are expected. To follow this reference, install this version (or check the page's last update against the latest release on npm).
Command Families¶
The CLI exposes commands across three families that map onto the dotNS contract responsibilities:
-
Registration: Commands that create a name record:
- Register a new name with a starting
contenthash. - Check PopRules eligibility for a proposed name and account (preview the deposit / free-tier outcome before submitting).
- Register a new name with a starting
-
Records management: Commands that mutate an existing name's fields:
- Update the
contenthashto a new CID — this is what a Product owner runs when they publish a new bundle and want the.dotname to point at the new version. - Set or unset administrative fields on the record.
- Update the
-
Lifecycle: Commands that change ownership or extend the registration:
- Transfer the name to another account.
- Renew the registration where renewals apply.
Installing and Authenticating¶
The CLI is distributed as an npm package. Install it globally or run via npx. Operations that mutate state (registration, update, transfer) require an account that can sign the resulting Asset Hub transaction — the CLI accepts a key file, a connected hardware signer, or a Polkadot App session via a pairing flow, depending on the operation and the security posture the operator chooses.
For day-to-day Product publishing, the recommended account is the same paired account a developer uses with Polkadot Desktop, so PopRules tier and any reserved-name claims continue to apply consistently across the CLI and Desktop paths.
Command Surface¶
Each command — subcommand path, required flags, optional flags, and exit codes — is enumerated here.
Provisional
Per-flag details for each command are still being audited against the published surface. The table below lists the known top-level commands at 0.6.2; the per-flag reference will be filled in once it is confirmed against the live package.
| Command | Family | Required flags | Optional flags | Notes |
|---|---|---|---|---|
register domain | Registration | Pending | Pending | Pending |
register subname | Registration | Pending | Pending | Pending |
lookup | Records | Pending | Pending | Pending |
content view / content set | Records | Pending | Pending | Pending |
text view / text set | Records | Pending | Pending | Pending |
pop set / pop info | Records | Pending | Pending | Pending |
store | Records | Pending | Pending | Pending |
account | Lifecycle | Pending | Pending | Pending |
bulletin | Lifecycle | Pending | Pending | Pending |
Where to Go Next¶
-
Guide Register and Publish
The higher-level publishing flow that wraps the most common CLI operations.
-
Learn TestNet Contracts
The current TestNet contract addresses the CLI targets when operating in TestNet mode.
| Created: June 16, 2026