CLI reference

The --payer flag: auto, env, external, awal.

--payer selects how the CLI pays the USDC charge that comes back as an HTTP 402 payment challenge. It accepts four values — auto (the default), env, external, and awal — and any other value is rejected as invalid.

deploy request402 payment challengeUSDC pays via x402site live
The x402 protocol turns a hosting invoice into an HTTP challenge a wallet can sign.

Synopsis

$ npx x402-hosting@latest deploy --days 30 --payer env
$ npx x402-hosting@latest renew --days 90 --payer awal

Every paid command accepts --payer: deploy, renew, rollback, transfer, and delete. The free reads — status and deployments — never touch a wallet.

The four modes

  • auto — the default; resolves only after a 402 arrives: first EVM_PRIVATE_KEY if set, then the Coinbase agentic wallet if it is installed, running, and signed in, otherwise the external handoff
  • env — pays inline with the key in EVM_PRIVATE_KEY; the command fails if the variable is not set
  • external — writes the payment handoff file and exits, for a wallet on another machine to pay
  • awal — delegates to the Coinbase agentic wallet CLI through its built-in template

When each mode makes sense

auto covers local development: set nothing, sign in to the agentic wallet, and the CLI finds it. You can verify the wallet is ready with npx awal status — if the server is down or signed out, auto quietly falls through to the handoff instead of paying. env is the CI mode: a runner holds the key as a secret and pays without any interactive step. external is for human signing on another device, where the deploying machine never sees a private key. awal forces the agentic wallet path explicitly, which is useful when both a key and a wallet are present and you want the wallet to pay.

Mutual exclusion

--payer and --payer-cmd are mutually exclusive: passing both is an error. A custom wallet belongs in the template, not the mode. Also note that a delegated payer never sees EVM_PRIVATE_KEY — the CLI strips it from the child environment, because delegation exists precisely so that key is not used.

Cost

The payer mode changes who signs, never what is charged: the prices on the pricing page apply in every mode, and the 402 challenge is the authoritative quote before any wallet signs.

Related guides