prufy
Skip to the page

Command linePrufy CLI

Command line

Prufy CLI

Prove you own a domain from the terminal. The CLI does everything the website does, in the same words, and it's built for people, scripts and AI agents alike.

On this page

prufy is a client of the same API these docs describe. It prints the one DNS record to add, in the words your DNS provider uses for its own fields. Then it waits and checks. When something isn't right it says what it saw, why, and the one thing to change. This page describes version 0.1.0.

Installation

npx @prufy/cli verify yourcompany.com

With Node 20 or newer there's nothing to install: npx or bunx runs it. To keep it around, install it once with npm, and the command is then just prufy, which is how the rest of this page writes it.

No Node? The installer script downloads one standalone binary for macOS or Linux, on arm64 or x64. It checks the download against the release's SHA-256 before unpacking it and puts it in ~/.local/bin. It never uses sudo and never asks for a password. To update, run it again.

Your first domain

One command. There's no account to make first: this run starts a session for this terminal, the same way a first claim does for a browser.

From nothing to verifiedexit 0, done
$ prufy verify yourcompany.com

  yourcompany.com is managed by Namecheap.

  Add this record:
    Type   TXT
    Host   _prufy-challenge
    Value  prufy-domain-verification=xwqyp4hnsmgqxceo2xd6orgeay
    TTL    300, or the lowest your provider offers

    Namecheap adds your domain to the Host automatically. Enter only the part
    shown, without your domain.

  Where to add it
    1. Sign in to Namecheap and open Domain List.
    2. Click Manage next to your domain, then open the Advanced DNS tab.
    3. Click Add New Record and choose TXT Record.
    https://ap.www.namecheap.com/Domains/DomainControlPanel/yourcompany.com/advancedns

  Most records appear within a few minutes. Your code works until 2026-11-17.

  ✓ yourcompany.com is verified
    We last saw your record on 2026-11-10.
    Keep the record in place. We re-check it daily so ownership stays current.

  Get an email if the record ever goes missing: prufy alerts email you@example.com

Add the record at your DNS provider and leave the command running. It checks on its own, a little less often each time, and stops when the domain is verified. If you close the terminal nothing is lost: Prufy keeps checking, and prufy status yourcompany.com picks up where you left off.

The session

Prufy has no sign-up and no API key to create. The first prufy verify is answered with a session, and the CLI keeps its token in a file instead of a cookie jar. That token is the whole credential, so the file is readable only by you and no command ever prints it.

The CLI looks for a session in this order:

PrioritySourceHow to set
1 (highest)PRUFY_TOKEN in the environmentexport PRUFY_TOKEN=…
2The saved sessionprufy verify saves it, the first time

With neither, this terminal simply has no domains yet. A command that needs one says so and points at prufy verify, while prufy list and prufy dns work as they are.

~/.config/prufy/session.json
{
  "version": 1,
  "sessions": {
    "https://www.prufy.dev": {
      "token": "…",
      "savedAt": "2026-11-10T09:30:00.000Z"
    }
  }
}

Sessions are kept per address, so a local server and https://www.prufy.dev never share one, and a token is only ever sent to the address that issued it. prufy whoami shows which one is in use, and prufy logout ends it, on Prufy as well as here.

Start here

prufy verify <domain>

Get the one record to add, then wait while we check it.

Creates a claim for the domain, or picks up the one this terminal already has, and prints the one TXT record to add. The field names are the ones that domain's DNS provider uses.

Then it waits. It asks for a check, says what changed, and waits a little longer each time: 15 seconds at first, up to a minute, for 10 minutes in all. Press Enter to check at once, or Ctrl+C to leave. Leaving loses nothing, because Prufy keeps checking on its own.

The first verify is also what starts this terminal's session.

With --json it doesn't wait. It prints the claim and exits, so a script or an agent has the record straight away. Add --wait to wait anyway.

OptionWhat it does
--no-waitPrint the record and stop. The default with --json
--waitWait for the record even with --json
--timeout <minutes>How long to wait. 10 by default
Examples
prufy verify example.com
prufy verify example.com --json

With --json: The claim, as Retrieve a claim returns it, plus existing and warning from Create a claim. See every field.

prufy status [domain]

Where a domain stands. With no domain, lists them all.

Where one domain stands: its status in a word, what that means, the record if one is still needed, what each DNS server answered last time, and when the next check is.

With no domain it's the same as prufy list.

Examples
prufy status
prufy status example.com
Three domainsexit 0, done
$ prufy status

  Domain                Status        What's happening
  yourcompany.com       ✓ Verified    yourcompany.com is verified
  shop.yourcompany.com  ! Fix needed  One character looks right but isn't the…
  oldbrand.io           ! At risk     We can't see your record anymore

With --json: The claim, as Retrieve a claim returns it. See every field.

prufy list

Every domain this terminal has claimed.

One row per domain: the name, its status, and one line on what's happening. A terminal with no session has no domains yet, which isn't an error.

Also spelled prufy ls.

Examples
prufy list
prufy list --json

With --json: The same body as List claims. See every field.

prufy check <domain>

Check right now, and say what each DNS server answered.

Asks Prufy to look at DNS right now, from its own servers, then prints the claim with what each server answered.

Prufy allows one check per claim every 10 seconds. When a check is asked for too soon the CLI waits it out, so you never have to count.

The exit status is the answer: 0 when the domain is verified, 3 when it was checked and isn't yet.

OptionWhat it does
--waitKeep checking until it's verified
--timeout <minutes>How long to wait with --wait. 10 by default
Examples
prufy check example.com
prufy check example.com --wait
A record with a typoexit 3, not yet
$ prufy check yourcompany.com

  yourcompany.com  ! Fix needed

  ! One character looks right but isn't the same
    Character 35 is “5” where the code has “s”. Those are easy to mix up when
    a value is retyped.
    In Namecheap, replace the Value with the one from the Copy button.

  The record
    Type   TXT
    Host   _prufy-challenge
    Value  prufy-domain-verification=xwqyp4hnsmgqxceo2xd6orgeay
    TTL    300, or the lowest your provider offers

    Namecheap adds your domain to the Host automatically. Enter only the part
    shown, without your domain.

  What each server answered
    dns1.registrar-servers.com  prufy-domain-verification=xwqyp4hn5mgqxceo2xd6orgeay
    dns2.registrar-servers.com  prufy-domain-verification=xwqyp4hn5mgqxceo2xd6orgeay
    Google Public DNS           prufy-domain-verification=xwqyp4hn5mgqxceo2xd6orgeay
    Cloudflare DNS              prufy-domain-verification=xwqyp4hn5mgqxceo2xd6orgeay

  Last checked      just now
  Next check        in 22 seconds
  Code works until  2026-11-17
  DNS               Namecheap
  Nameservers       dns1.registrar-servers.com, dns2.registrar-servers.com

  The exact value, ready to paste: prufy record yourcompany.com --value
  After the change: prufy check yourcompany.com

With --json: The claim, as Run a check returns it. See every field.

The record

prufy record <domain>

The record again. --value and --host print just that part.

The record again, with where to add it. This is for when the first screen has scrolled away.

--value, --host and --zone-file print that one string and nothing else, so they're safe to pipe. Pick one at a time.

OptionWhat it does
--valueOnly the value, to pipe into a clipboard or a script
--hostOnly the name, as your provider wants it typed
--zone-fileOne line for a BIND zone file
Examples
prufy record example.com
prufy record example.com --value | pbcopy
Just the valueexit 0, done
$ prufy record yourcompany.com --value

prufy-domain-verification=xwqyp4hnsmgqxceo2xd6orgeay

With --json: { record, instructions }, the two parts of the claim's view that say what to add and where.

prufy rotate <domain>

Get a new code. The old one stops working.

Replaces the claim's code with a new one that works for 7 days. The old one stops counting at once, so the record in DNS has to be replaced too.

It works on a claim that's pending, expired or lapsed. A verified domain keeps its code.

Example
prufy rotate example.com

With --json: The claim, as Get a new code returns it. See every field.

prufy dns <domain>

What each DNS server answers right now, asked from this machine.

Asks each of the domain's nameservers and two public resolvers what they hold right now. The questions go out from your machine, not from Prufy's servers, so it shows what your network sees.

It needs no session and works on a domain nobody has claimed. When this terminal does have a claim for the domain, the answers are compared with its code and explained in the same words a check uses.

Examples
prufy dns example.com
prufy dns example.com --json

With --json: { domain, recordName, expected, zone, observations, outcome, explanation }. outcome and explanation are null without a claim to compare against.

Hand it to someone else

prufy share <domain>

Make a setup link for a teammate or an agent.

Makes a setup link for whoever can change the domain's DNS: a teammate, an agency, or an agent. The link shows this one record and can ask for a check. It can't get a new code, stop the claim or see anything else.

It works for 30 days. With --email Prufy sends it too, and --note adds a line from you to that email. A note is words only: one with a link in it is refused, because the setup link is added for you.

OptionWhat it does
--email <address>Email the link to them as well
--note <text>A line from you, included in that email
Examples
prufy share example.com
prufy share example.com --email dana@example.com --note "Could you add this today?"

With --json: The same body as Create a setup link. See every field.

prufy setup <link>

Open a setup link someone sent you.

Opens a setup link someone sent you, and shows the record and the steps. Give it the whole link or just the token at the end.

The link is the whole credential. This terminal's own session is never sent with it.

A link decides which record gets added to someone's DNS, so where it points matters. A link to another address is refused unless you name that address with --api-url.

OptionWhat it does
--checkAsk for a check now, once the record is added
--waitKeep checking until it's verified
--timeout <minutes>How long to wait with --wait. 10 by default
Examples
prufy setup https://prufy.dev/setup/… --json
prufy setup https://prufy.dev/setup/… --check

With --json: The claim, as Retrieve a claim by setup link returns it. See every field.

prufy connect <domain>

One-click setup, where the DNS provider supports it.

One-click setup, for providers that support it. It opens the provider's own page in your browser, where you sign in and approve the one record. Prufy never sees that password.

Most providers don't take part yet. When this domain's doesn't, the command says so and points at prufy record instead.

OptionWhat it does
--no-openPrint the link without opening a browser
Example
prufy connect example.com

With --json: { url, opened }. With --json nothing is opened.

Keeping watch

prufy stop <domain>

Stop verifying a domain.

Stops verifying a domain. Prufy stops checking it, and the record can come out of DNS. It asks first, because it can't be undone: to try again, start a new claim with prufy verify.

With nobody at the keyboard there's no one to ask, so a script has to pass --yes.

OptionWhat it does
-y, --yesDon't ask first
Example
prufy stop example.com

With --json: The claim, as Abandon a claim returns it. See every field.

prufy history <domain>

What happened to a claim, newest first.

What happened to a claim, newest first, in the same words as the activity strip on the website. A run of the same event is folded into one line with a count.

Example
prufy history example.com

With --json: { events }, the claim's event list. See every field.

prufy alerts [email|test]

Where alerts go: turn email on or off, or send a test.

With nothing after it, shows where alerts go. alerts email <address> sends a confirmation link to that address, and alerts start once it's opened. alerts email --remove turns email off. alerts test sends a sample to everything that's set up.

Push notifications need a browser to subscribe, so the terminal can report them and the website turns them on.

OptionWhat it does
--removeWith alerts email: stop emailing alerts
Examples
prufy alerts
prufy alerts email you@example.com
prufy alerts email --remove
prufy alerts test

With --json: The alert settings, as Retrieve alert settings returns them. alerts test prints { delivered }. See every field.

This terminal

prufy login <email>

Sign this terminal in to the account your alert email belongs to.

Signs this terminal in to the account whose confirmed alert address you give, so it sees the same domains as your browser. Prufy emails a link; open it on any device and press Get a code, then type the code into the terminal.

The terminal keeps a secret and sends only its hash with the request, so the code alone is no use to anyone else, and the session token never appears in a URL or on the page. With nobody at the keyboard it stops after sending and says how to finish: prufy login --code <code>.

A terminal with domains of its own asks before switching, because it won't see them afterwards. They stay verified on their own account.

OptionWhat it does
--code <code>Finish signing in with the code the page showed
-y, --yesDon't ask before switching away from this terminal's own domains
Examples
prufy login you@yourcompany.com
prufy login --code K7QM-4TZP

With --json: { requested, next } after sending, then { signedIn, domains }.

prufy whoami

Which Prufy this terminal talks to, and where its session lives.

Which Prufy this terminal talks to, where its session comes from, and how many domains it can see. The token itself is never printed.

Example
prufy whoami
This terminalexit 0, done
$ prufy whoami

  Prufy    https://www.prufy.dev
  Session  ~/.config/prufy/session.json
  Domains  3

  There's no sign-up. This terminal's session is what makes its domains yours here,
  the same way a cookie does in a browser.
  To see your browser's domains here: prufy login <your alert email>

With --json: { apiUrl, session: { source, path }, domains }.

prufy logout

Sign this terminal out, on Prufy and here.

Ends this terminal's session on Prufy and forgets it here. Its domains stay verified and Prufy keeps checking them, but this terminal can no longer see or manage them. So it says that first, then asks. If Prufy can't be reached, it still forgets the session here and says the token works until it expires.

A session that comes from PRUFY_TOKEN isn't the CLI's to forget. --revoke ends it on Prufy, and then the variable is yours to remove.

OptionWhat it does
-y, --yesDon't ask first
--revokeWith PRUFY_TOKEN set: end that session on the server
Examples
prufy logout
PRUFY_TOKEN=… prufy logout --revoke

With --json: { forgotten, endedOnServer }.

Global options

These mean the same thing on every command. Wherever a command takes a <domain>, a claim id that starts with clm_ works too. prufy <command> --help explains one command, and prufy --help lists them all:

OptionWhat it does
--jsonPrint the result as JSON, for scripts and agents
--api-url <url>Talk to another Prufy. Default https://www.prufy.dev, or PRUFY_API_URL
--no-colorPlain text
-h, --helpHelp, for prufy or for one command
-v, --versionWhich version this is
The whole CLI on one screenexit 0, done
$ prufy --help

  prufy: prove you own a domain, from the terminal.

  Usage
  prufy <command> [options]

  Start here
  verify <domain>      Get the one record to add, then wait while we check it
  status [domain]      Where a domain stands. With no domain, lists them all
  list                 Every domain this terminal has claimed
  check <domain>       Check right now, and say what each DNS server answered

  The record
  record <domain>      The record again. --value and --host print just that part
  rotate <domain>      Get a new code. The old one stops working
  dns <domain>         What each DNS server answers right now, asked from this machine

  Hand it to someone else
  share <domain>       Make a setup link for a teammate or an agent
  setup <link>         Open a setup link someone sent you
  connect <domain>     One-click setup, where the DNS provider supports it

  Keeping watch
  stop <domain>        Stop verifying a domain
  history <domain>     What happened to a claim, newest first
  alerts [email|test]  Where alerts go: turn email on or off, or send a test

  This terminal
  login <email>        Sign this terminal in to the account your alert email belongs to
  whoami               Which Prufy this terminal talks to, and where its session lives
  logout               Sign this terminal out, on Prufy and here

  Options
  --json           Print the result as JSON, for scripts and agents
  --api-url <url>  Talk to another Prufy. Default https://www.prufy.dev, or PRUFY_API_URL
  --no-color       Plain text
  -h, --help       Help, for prufy or for one command
  -v, --version    Which version this is

  Exit codes
  0  Done. After a check, it means verified
  1  Something went wrong
  2  The command wasn't understood
  3  Checked, and not verified yet

  More on one command: prufy <command> --help

Colour is off when the output is piped, with --no-color, or when NO_COLOR is set. Nothing is lost without it: status is always a word, never colour alone.

Scripts and agents

Add --json to any command. stdout then carries one JSON document and nothing else. It's in the same shapes the API returns, so the API reference documents the fields. Errors are JSON too, on stdout, so a script reads one stream. The exit status says which it was.

An error, as JSONexit 1, error
$ prufy check notyours.com --json

{
  "error": {
    "kind": "no_claim",
    "message": "notyours.com isn't one of this terminal's domains yet.",
    "hint": "Start with: prufy verify notyours.com"
  }
}

Two things change when nobody is at the keyboard, because a script can't be asked a question and shouldn't be kept waiting in silence:

CommandWith a personIn a script or with --json
verifyPrints the record, then waits for itWith --json, prints the claim and exits. --wait waits anyway
--waitKeeps going through a mistake, so you can fix it and watchStops at a specific mistake, so the fix can be read and acted on
stop, logoutAsk firstRefuse without --yes
connectOpens the provider's page in a browserPrints the link and opens nothing

An agent that was handed a setup link needs nothing else. The link can read one record and ask for a check, and that's all it can do:

An agent with a setup link
# Read the record. The link is the only credential this needs.
prufy setup https://prufy.dev/setup/… --json

# Once the record is added, ask for a check and wait for the answer.
prufy setup https://prufy.dev/setup/… --check --wait --json

Exit codes

A script can branch on the exit status without parsing anything. 3 is its own code because a record that isn't visible yet isn't a failure. It's the normal state for the first few minutes, and a script may want to wait and try again.

CodeMeaning
0Done. After a check, it means verified
1Something went wrong
2The command wasn't understood
3Checked, and not verified yet

Leaving a waiting command with Ctrl+C exits with 130, the shell's own convention for an interrupt.

CI/CD

Set PRUFY_TOKEN to the token from your session file and the CLI uses it instead of looking for the file. Keep it in your CI's secrets: whoever holds it can manage every domain that session claimed.

A GitHub Actions step
- name: Check the domain is still verified
  run: npx @prufy/cli check yourcompany.com --json
  env:
    PRUFY_TOKEN: ${{ secrets.PRUFY_TOKEN }}

prufy check exits 0 only when the domain is verified, so the step fails the moment it isn't. For a softer guard, treat 3 as a warning and 1 as the failure.

Configuration

There's no config file to write. Everything is a flag or one of these variables:

VariableWhat it does
PRUFY_TOKENA session token, for CI and agents. It wins over the saved session, and no command ever prints it.
PRUFY_API_URLWhich Prufy to talk to. The same as --api-url, which wins when both are given. Default https://www.prufy.dev.
PRUFY_CONFIG_DIRThe folder that holds session.json. Wins over XDG_CONFIG_HOME.
XDG_CONFIG_HOMEThe session is kept in a prufy folder inside it. Without it, ~/.config/prufy.
NO_COLORAny value turns colour off. FORCE_COLOR turns it on when the output isn't a terminal.
PRUFY_INSTALLFor the installer: where to put the binary, instead of ~/.local/bin.
PRUFY_VERSIONFor the installer: a version to install, instead of the latest.

To remove the CLI and everything it kept, delete ~/.local/bin/prufy (or npm uninstall -g @prufy/cli) and the ~/.config/prufy folder. Your domains stay verified.

Errors

An error is one line that says what happened and, when there is one, a second that says the next step. With --json it's { error: { kind, message, hint } }, plus retryAfter when waiting fixes it.

Most kinds come straight from the API, with the message unchanged. Errors lists them. These are the ones the CLI adds:

KindExitWhen
usage2The command, a flag or an argument wasn't understood. The hint says what to type.
no_claim1This terminal has no claim for that domain. Start one with prufy verify.
no_record1The claim is in a status with no record to show, like expired or stopped.
unauthorized1This terminal has no session yet, or the one it has isn't recognised.
unreachable1The request never reached Prufy. Check the connection and run it again.
unexpected_response1Something between here and Prufy answered instead, like a proxy or a sign-in page.
timed_out1Prufy didn't answer within 30 seconds. Running it again is safe: checks carry on on our side.
unknown_token1PRUFY_TOKEN is set to a session this Prufy doesn't know. Nothing was created.
contract_mismatch1Prufy answered with something this version of the CLI doesn't know. Updating fixes it.
other_origin2A setup link points at a different address from the one this terminal talks to.
moved1The address redirects to a different site. A session is never sent wherever a redirect points.
session_from_env1prufy logout or prufy login was used on a session that comes from PRUFY_TOKEN.
no_login1prufy login --code was run with no sign-in waiting. Start with prufy login <email>.
code_not_accepted1The code was wrong, more than 10 minutes old, or already used. Five wrong codes use the sign-in up.

The CLI follows a redirect only within one site, so prufy.dev and www.prufy.dev are the same Prufy to it. Anywhere else has to be named out loud with --api-url, and gets its own session.