Skip to main content

Installation

The CLI is the npm package xenarch (version 1.4.0). It needs Node.js 18 or later.
Or install it globally:
The CLI keeps its settings, wallet and session in ~/.xenarch/config.json, written with owner-only permissions (0600). The default API base is https://api.xenarch.dev.

Global options

Commands that change money or access ask for confirmation. Pass --confirm to run them in scripts.

Sign in

Most commands use a wallet session (Sign-In with Ethereum on Base). Create or connect a wallet, then sign in:
xenarch wallet balance shows the wallet’s USDC and ETH balance. xenarch wallet disconnect drops a WalletConnect pairing.

Pay for content

Check a URL

Shows the gate id, price, network, seller wallet, the facilitator list and expiry, plus the site’s pay.json if it has one.

Pay

xenarch pay refuses to pay until XENARCH_API_TOKEN holds an agent key, so the platform can check your spend caps before each payment. Create the key once:
Then pay:
The CLI checks the gate, signs an EIP-3009 USDC authorization to the seller’s wallet, settles it through a third-party x402 facilitator (which pays the gas), and fetches the content with X-Xenarch-Gate-Id and X-Xenarch-Tx-Hash. It also pays standard x402 402 responses from servers that do not use Xenarch. --max-price defaults to 1.00 USD. A hosted checkout URL is paid as a pay link. To pay one by id:

History

Lists recent payments from the local cache in ~/.xenarch/token-cache.json.

Agent control plane

Manage the spend controls that apply to your agent keys.
xenarch agent webhook get|set|rotate|test|deliveries|retry manages the agent’s webhook. Pass none to a cap to remove it.

Publish and gate a site

Run a site or gating command without set flags to show the current values. xenarch bots lists the bot catalog.

Publisher API key

These commands use a publisher API key (xk_pub_...) instead of a wallet session:
register creates a passwordless publisher account and saves the key to ~/.xenarch/config.json. site add prints the site id and the site token once.
An account created with register has no receiving wallet, so gate requests for its sites fail until a wallet is linked to the account and chosen as the receiving wallet. Signing in with a wallet at dash.xenarch.dev avoids this, because that wallet receives payments from the start.
In a terminal, xenarch links create prompts for each field, and flags pre-fill fields. In scripts, pass the whole field set with --params '<json>' and add --confirm to sign. Signing uses the CLI wallet. See Pay links.

Account

keys manages merchant API keys (xm_live_...) for your backend. invite lets another wallet join your account as a viewer, operator or full co-owner.