Install & tutorial

About five minutes from nothing to your first approval from your phone.

  1. Let your agent set it up
  2. Install
  3. Link your inbox
  4. Your account dashboard
  5. Your first request
  6. Teach your agent
  7. What agents can ask
  8. Purchases (developer preview)
  9. Exit codes
  10. CI and cloud agents
  11. Local mode
  12. Security
  13. Uninstall

The fastest way: let your agent set it up

Paste this into Claude Code, Codex, Cursor, Gemini CLI, or any agent that can run shell commands and read a URL:

Read https://sudothat.com/skill.md and follow its "Get set up" section. Then ask for my approval through sudo-that before deploying, spending money, or sending anything. For supported paid resources, use sudo-that fetch or MCP request_purchase directly: the service's MPP payment challenge creates the purchase approval, so do not send a separate generic approval request first.

The agent reads the skill, installs the CLI and the skill if they're missing, and uses the email you supplied (or asks once). Then it connects to your existing account, or shows one verification email for a new account. The first account setup includes a test request. The rest of this page is the same thing done by hand.

1. Install

You need Node.js 20 or newer. Check with node -v. Then:

curl -fsSL https://sudothat.com/install.sh | sh

This installs the sudo-that command globally with npm. It also saves the agent skill for every coding agent it finds on your machine: Claude Code, Codex, Cursor, Gemini CLI, Copilot, Windsurf and more. To install only the CLI, by hand:

npm install -g https://sudothat.com/sudo-that.tgz

To upgrade both the CLI and installed agent instructions, rerun the installer. It copies the complete skill and its HTTP helper from the same CLI package. Your saved account, agent identity and request history stay in place; no new signup is needed. Updating with npm alone does not refresh skills already installed in agents.

Check that it worked:

sudo-that --help

If you get EACCES, your npm global folder needs root. Use a Node version manager such as nvm, or set npm config set prefix ~/.npm-global and add ~/.npm-global/bin to your PATH.

Install into isolated directories

For a test or a custom installation, choose absolute paths for the CLI and skill. This does not change your npm configuration or other agents' skill folders.

curl -fsSL https://sudothat.com/install.sh | SUDO_THAT_INSTALL_PREFIX="/absolute/path/cli" SUDO_THAT_SKILL_DIR="/absolute/path/skill" sh

Add the CLI directory's bin folder to PATH, or use the printed full command path.

2. Set up your inbox once

Give your agent the email that should receive approvals. It chooses an available permission address for you.

sudo-that setup --email you@example.com --agent "My agent" --json

Returning after an interruption? Run sudo-that whoami --json. If it reports setup_required, run sudo-that setup --status --json, then resume with sudo-that setup --json when instructed. Keep the saved profile; you do not need a new agent identity.

For a new account, open the returned mailto link and send approve from your main inbox. Then run sudo-that setup --json again. Setup saves its progress, so rerunning resumes the same identity.

Your next agent needs only your public permission address:

Set up sudo-that using you-permissions@sudothat.com; follow https://sudothat.com/skill.md.

New agents connect automatically by default. You can require approval and manage addresses from your owner CLI:

sudo-that settings set auto-connect-agents off
sudo-that agents list
sudo-that agents approve <id>
sudo-that agents disable <id>
sudo-that aliases add work-approvals
sudo-that setup --prompt

Owner access is saved during first account setup. On another computer, use sudo-that account login --email you@example.com, approve the returned mailto, then run sudo-that account login --status. An agent awaiting approval shows a mailto or can be approved by its owner. Poll with sudo-that setup --status --json.

Explicitly approved agents keep working when automatic connection is off. Disabled agents cannot read or send. Permission aliases accept permission requests through our API; arbitrary SMTP forwarding is not supported.

HTTP-only agents can use the standalone example without installing a CLI or creating a Primitive account.

Your account dashboard

Open your account dashboard to see recent requests, replies, and payment results; pause agent connections; manage permission addresses; or revoke old CLI credentials. Enter your approval email, then send the displayed verification email from that inbox. We do not send you a login link. The page continues automatically; if you are new, it creates your account and gives you a setup prompt for your agent. Returning owners use the same sign-in flow.

Start browser sign-in yourself. Never approve a browser sign-in code supplied by an agent or another person. If you entered the wrong address, choose “Use another email or restart”; the old code is cancelled. Sign out when finished on a shared computer.

The dashboard does not approve purchases. Reply to the original request email to approve, deny, or clarify it. Connecting an agent gives it permission to ask, not permission to spend.

3. Your first request

Ask something yourself, so you can see what your agent will send:

sudo-that ask "sudo-that is set up. Reply approve to confirm." --risk low --agent "Me, testing"

An email arrives from sudo-that <approvals@sudothat.com>, with Reply-To st-xxxxxxxx.<repo>@sudothat.com. It holds the question, the repo and machine it came from, the risk, and how to answer. The command blocks while it waits. Reply approve from any mail app, and the terminal prints:

{
  "id": "st-1a2b3c4d",
  "status": "approved",
  "message": "approve",
  "approver": "you-permissions@sudothat.com",
  "decided_by": "human",
  "decided_at": "2026-10-18T09:12:44.000Z"
}

Try again and reply deny — take a backup first. You get "status": "denied" with your note in message, and exit code 10.

4. Teach your agent

Verified with Codex CLI 0.157.1 and Claude Code 2.1.302 using both the CLI and HTTP MCP. Other agents need shell/HTTP tools or an MCP client that supports our scoped bearer credential; compatibility is not the same as intercepting all their actions.

Meta Muse Code and Grok's coding agent document compatible MCP transports. Manus supports custom MCP connectors, but its authentication setup has not been verified with this service. These are integration options, not tested sudo-that integrations.

The skill file (sudothat.com/skill.md) is the agent's instructions. It says when to ask: destructive actions, spending, choices that are yours to make, and secrets only you have. It covers how to read your answer, and how to install and link sudo-that if it's missing. It instructs the agent to send those moments through sudo-that; it does not enforce permission checks on unrelated tools.

install.sh already saved it for the agents it found. To add it later, or for an agent you installed afterwards:

npx -y skills add https://sudothat.com/skill.md -g -y

This detects the agents on your machine and saves the skill to the shared ~/.agents/skills/ folder, linking it into each agent's own folder. Add -a claude-code (or codex, cursor, …) to pick one, or drop -g to install it for the current project only.

AgentSetup
Claude CodeSaved to ~/.claude/skills/sudo-that/. Run /skills to see it.
Codex, Cursor, Gemini CLI, Copilot, Windsurf, Cline, Goose, OpenHands…Saved by npx skills add above, through ~/.agents/skills/ and each agent's own folder.
An agent that only reads a rules fileAdd one line to its AGENTS.md, CLAUDE.md, GEMINI.md or rules file: “Before any risky action, follow https://sudothat.com/skill.md.”
Cloud agents, CI, personal assistantsPaste the setup prompt. The skill tells the agent how to install in a sandbox and how to log in (see CI and cloud agents).

Agents can use the CLI from a terminal or, in the developer preview, call the HTTP MCP endpoint. Chat-only assistants without either capability can't call sudo-that yet.

MCP developer preview

After sudo-that setup, connect a local MCP host with your saved mailbox profile—no private token to copy. Choose the command for your host:

codex mcp add sudo-that -- sudo-that mcp
claude mcp add --transport stdio sudo-that -- sudo-that mcp

These commands configure the selected host. The bridge itself never edits host settings. Use an absolute executable path if needed; allow 45 seconds for startup and tool timeouts. Keep each request's UUID and exact arguments for retries, and poll the same request ID. Cancelling a call does not undo work already accepted by the service.

The hosted HTTP MCP endpoint is https://sudothat.com/mcp, with six tools: get_profile, request_decision, request_purchase, get_decision, list_decisions, and recover_purchase. It authenticates with a scoped mailbox developer bearer token (stmb_…), not OAuth. The local bridge forwards these same tools to the saved API. Cloud-only hosts still need compatible secure token provisioning; this is not OAuth onboarding. Do not put a token in a prompt or shared source/configuration.

MCP can request decisions and supported purchases, but it does not intercept other agent tools or network traffic. For an action to require approval, the agent must route it through the sudo-that CLI, HTTP example, or MCP tool.

Prompts that put it to work

Hand your agent a task, say how you want to be asked, and walk away:

Clean up the users table: drop legacy_avatar_url. Ask me through sudo-that before touching prod.
Build two layouts for the settings page and let me pick one through sudo-that, with screenshots attached.
Finish the staging deploy. If you need a secret or cert, ask me for it through sudo-that instead of stopping.
Work through the backlog overnight. Anything destructive or that costs money goes through sudo-that first.

5. What agents can ask

Yes or no

sudo-that ask "Force-push main to drop the leaked .env commit?" --risk critical --details-file plan.md

Pick one

Each --option becomes A, B, C. You reply with the letter. The agent gets choice and choice_label.

sudo-that ask "Which settings layout should ship?" --option "Sidebar" --option "Top tabs"

Something only you have

Files you attach to your reply are saved on the agent's machine under ~/.sudo-that/attachments/<id>/, and their paths come back in attachments.

sudo-that ask "I need the staging TLS cert to finish the deploy" --kind provide

Waiting longer, and follow-ups

ask waits up to 9 minutes by default (--timeout, in seconds), which fits most agents' tool limits. If you haven't answered by then, it exits 3, and the agent keeps waiting on the same request. Waiting never sends another email:

sudo-that wait st-1a2b3c4d

If your reply was ambiguous, the initial mailbox ask or buy returns unclear (exit 11) promptly. Reply again to the same email, then have the agent explicitly run sudo-that wait <id>. That wait continues on the same request until it gets the correction or times out; it never sends another email. Automated clarification requires an explicitly selected legacy login:

sudo-that reply --hosted st-1a2b3c4d "Do you mean drop it on staging only?"

To include a prepared diff, screenshot, or document for review, use ask --attach after ordinary setup. Up to three regular files totaling 1 MiB are supported, with unique filenames. The owner opens them in the original approval email; the dashboard lists their names separately from reply downloads.

sudo-that ask "Approve this prepared change?" --attach review.diff --risk medium

Direct HTTP decision requests and MCP request_decision accept an optional attachments array with filename, content_base64, and optional content_type, under the same limits. Use canonical base64, not local paths or file URLs. Keep the same UUID and bytes on retries. CLI retries reuse their saved files even after source changes; use a fresh --message-id for intentionally revised evidence. The standalone HTTP example remains text-only, and purchase requests do not accept attachments.

6. Purchases (developer preview)

Purchases must be requested explicitly through sudo-that buy, the HTTP example, or MCP's request_purchase. sudo-that does not watch or intercept every agent action or arbitrary network request. It supports configured MPP merchants/payment methods and still sends each purchase for authenticated human approval.

The public demo store sells simulated sneakers (USD 50.00), a hoodie (USD 100.00), and socks (USD 5.00). Each product page has a buying prompt, spending-limit field and exact GET resource URL. These are Stripe SPT sandbox orders: no real money or shipments. Neither Link nor a Tempo wallet is needed. Try sneakers with a USD 51 limit:

sudo-that buy https://sudothat.com/demo/shop/everyday-sneakers --reason "Buy the white sneakers" --max 51.00

The USD 50 price fits your cap, but still needs email approval. A USD 100 hoodie with the same cap is rejected before emailing or paying. The cap limits one request, not total account spending. Each item is one fixed size/color with no shipping fee or tax; your agent receives a simulated order confirmation. The earlier digital demo resources remain supported.

A remote agent uses the same public URLs with its own sudo-that connection and CLI, HTTP, or MCP tools. Give a new agent your public permission address, not a token or card number. The address routes approval emails; it is not a payment method. Ask for the purchase directly, without a separate generic approval request. A chat-only host without tool or network access cannot complete a purchase. Agents can discover the items through the JSON catalog.

The CLI saves the purchase before sending it. If interrupted, repeat the identical command with the same profile to resume the original request. Use a fresh --idempotency-key only for an intentional new purchase; never create a new purchase to resolve an uncertain payment. Keep your local sudo-that profile for recovery.

The older Tempo testnet MPP shop is a separate payment path, with demo resources such as api-credits and staging-cert. Legacy hosted CLI users can inspect or fund their testnet wallet with sudo-that wallet --hosted and sudo-that wallet --hosted --fund. This is not required for the Stripe sandbox report.

For supported MPP purchases, the service reads the price from the seller's 402 Payment Required challenge, emails you the exact terms, and pays only after you reply approve. It refuses a changed recipient or a price above the approved maximum. The agent never receives a wallet key or card number.

MCP also has a request_purchase tool on its developer-token endpoint. Purchases remain limited to configured merchants and payment rails; this is not a general-purpose payment agent or universal purchase interception layer.

sudo-that wallet --hosted --fund
sudo-that buy --hosted https://sudothat.com/demo/shop/api-credits --reason "Need credits for an eval" --max 0.20

On success, result.status is paid and result.receipt holds the receipt. Use --out file to save the response. The current Stripe and Tempo demo resources accept only GET without a body; arbitrary POST purchases are not enabled. The separate restricted live demo supports Stripe Climate contributions only. Exit 12 means the purchase failed after approval.

sudo-that recover <id> checks an interrupted Stripe purchase against its existing payment attempt; it never starts or retries a charge. For Tempo or any result that requires manual reconciliation, do not repeat the purchase. Use --max to set a ceiling; if the seller's price is higher, no approval email is sent.

The Stripe sandbox flow, denial, and recovery were tested against the deployed service with an isolated automated test approver. The clothing store remains simulated; it never charges a real card.

Restricted live Stripe Climate demo

For the operator’s allowlisted, email-verified accounts only: contribute USD 0.50–10.00 to Stripe Climate through MPP and a live Stripe SPT. This uses real money and is not a clothing order. There is no wallet balance to preload.

sudo-that buy https://climate.stripe.dev/api/contribute --method POST --data '{"amount":100}' --max 1.00 --reason "Contribute one real dollar to Stripe Climate"

Reply approve to the request email, then open its secure payment link. Sign in as the same owner and enter the card in Stripe’s form. The agent never receives the card or payment token. A bank verification step may be required. Refreshing an uncertain result only checks the existing payment; it must not create a second purchase.

The backend blocks other account owners, amounts over USD 10, and other live merchants. Access still depends on the configured live Stripe account; sandbox success is not proof of live settlement.

7. Exit codes

ExitstatusWhat the agent does
0approved / answeredProceeds with exactly what it asked about, using choice, message, attachments
10deniedDoesn't do it; follows your note if there is one
12failedReports result.error; reconcile an uncertain Stripe attempt with sudo-that recover <id>, and never pay by another route
11unclearDoes not act. For mailbox mode, ask for a corrected reply in the same email thread, then explicitly run sudo-that wait <id>. Legacy mode can use sudo-that reply --hosted.
3pendingRuns sudo-that wait <id>
1 / 2error / usageNothing was decided; fixes the problem and retries

8. CI and cloud agents

Give each new agent your public permission address and the skill URL. Save its mailbox profile in a private persistent directory (SUDO_THAT_HOME) between runs. A disposable job can use the HTTP example and persist SUDO_THAT_HTTP_HOME.

The HTTP example supports buy <local-name> <url> --reason "why" [--max amount], then wait <local-name> and (for an uncertain Stripe purchase) recover <local-name>. Reuse the same name and exact terms to retry a request. Tempo results that need recovery require manual reconciliation. If the human's reply is unclear, ask for a correction in the same email thread before running wait.

Keep owner credentials on the owner's machine. Existing legacy CI profiles may keep using their own credentials.json. A timeout does not mean an email failed: retry the identical saved mailbox request to reconcile it, then poll its ID.

9. Local mode

You don't have to use sudothat.com. The CLI can drive your own Primitive account directly. Requests then go out from your own *.primitive.email inbox:

npm install -g primitive
primitive agent start-agent-signup --email you@example.com
# verify the 6-digit code Primitive emails you, then:
sudo-that init --approver you@example.com
# email pair@<your-inbox>.primitive.email once, then use --local:
sudo-that ask "Deploy to prod?" --local

Review Primitive's terms yourself if signup asks for acceptance. An agent should not accept them on your behalf without your approval.

10. Security

11. Uninstall

npm uninstall -g sudo-that

This leaves your credentials, saved requests, and downloaded files in ~/.sudo-that intact. Back them up before removing that folder manually. Remove the sudo-that skill from your agent's skill manager separately. Uninstalling does not revoke a connected agent; use sudo-that agents disable <agent-id> from the owner profile first if needed.