CLI Reference

The xe binary — unified CLI for node operation and client interaction.


The xe binary is a unified CLI for both node operation and client interaction. xe node runs the daemon; every other subcommand is a client that talks to a node's HTTP API (XE_NODE, default https://ldn.core.test.network). ./xe --help prints the same list.

xe-testnet

Commands

Node:
  node [flags]              Start a node daemon (flags below)

Wallet:
  wallet create [--passphrase] Create a new wallet and show 24 BIP39 words
  wallet restore [--account N] [--passphrase]
                            Restore 12, 15, 18, 21 or 24 words from stdin
                            (prompt or pipe, never an argument); refuses to overwrite
  wallet phrase             Show the recovery phrase of the current wallet
  wallet balance            Show wallet balance

Transactions:
  send <addr> <amount> [--asset XE|XCU] [--memo "text"]
                            Send funds; --memo attaches up to 64 bytes of UTF-8
  receive                   Receive all pending sends
  faucet                    Request testnet XE from the faucet service (1 XE, up to
                            5 per account per 15 min; arrives pending — run receive)
  mint <amount>             Top up XCU — authorized sys.minter wallet only (ops/bootstrap)
  burn <amount> [--yes] [--memo "text"]
                            Permanently destroy XE from your wallet (irreversible)

Compute:
  providers                 List compute providers
  lease [--vcpus N] [--memory MB] [--disk GB] [--duration SECS] [--provider ADDR]
                            Create a lease (defaults 1 vCPU, 1024 MB, 1 GB, 300 s)
  lease status <hash>       Check lease status
  lease renew <hash> <additional-seconds>
                            Operator only: renew from the node's wallet (XE_API_ADMIN_TOKEN)
  vm <hash>                 Get VM info
  ssh <hash>                SSH into a leased VM through the gateway

Messaging (off-chain, funds-free):
  directory register [--watch]
                            Register this wallet's account against the node so others
                            can message it; --watch stays resident and re-registers
                            every 20 minutes (entries expire at 30)
  chat send <addr> <message>
                            Send a signed, PoW-solved chat message; prints its id
  chat read [--since <unix-ns>] [--follow] [--json]
                            Read this wallet's messages (ownership-proofed); --follow
                            polls for new ones, --json prints one envelope per line

Reputation:
  reputation <addr>         Show reputation aggregate for an account

Tools:
  keygen                    Generate an ed25519 SSH keypair for lease access
  verify-genesis [flags]    Print the network_id and genesis hashes this binary runs
                            with; --genesis-dir/--genesis/--statechain-genesis verify a
                            supplied bundle instead; --json; --expect-network-id,
                            --expect-ledger-hash, --expect-statechain-hash exit non-zero
                            on mismatch
  sign-block                Sign a block from stdin; seed from XE_SEED
  version                   Print version
  help                      Print usage

xe faucet talks to the standalone faucet service (XE_FAUCET, default https://faucet.test.network). It sends 1 testnet XE a grant from a pre-funded wallet: at most 5 grants to one account, and 5 to one IP address, in any 15 minutes. A refused request says how many minutes to wait. Claims from VPN, proxy and hosting networks are refused, so claim from a home or mobile connection. The grant lands as a pending send, so claim it with xe receive.

xe sign-block takes no seed argument — the binary rejects one because a positional seed leaks via ps, /proc, and shell history. Set XE_SEED instead. wallet restore reads the phrase from stdin for the same reason.

Environment Variables

VariableDefaultDescription
XE_NODEhttps://ldn.core.test.networkNode API URL for every client command
XE_WALLET~/.xe/wallet.seedWallet seed file
XE_SEED(none)Hex seed for sign-block (required — the command takes no seed argument)
XE_FAUCEThttps://faucet.test.networkFaucet service URL
XE_API_ADMIN_TOKEN(none)Node: enables the operator-only API endpoints when set. Client: sent as the bearer token by lease renew
XE_SSH_HOSTldn.test.networkSSH gateway hostname
XE_SSH_PORT2222SSH gateway port
XE_VM_MOCK(unset)Node: use the mock VM manager instead of Lima/QEMU (development only)

Node Flags

Flags accept either -name or --name.

Network and genesis

FlagDefaultDescription
--port9000libp2p TCP port
--dial(none)Comma-separated bootstrap peer multiaddrs
--data./dataData directory (bound to one network)
--genesis-dir(embedded)Directory holding ledger-genesis.json and statechain-genesis.json; joins that network without a rebuild
--genesis / --statechain-genesis(embedded)The two genesis files individually; must be used together
--max-conns-per-ip8Max inbound connections per source IP
--max-inbound-conns0 (= 256)Max simultaneous inbound connections; negative = no split
--no-discoveryfalseDisable ambient DHT peer discovery; peer only with the --dial list
--discovery-peers0 (= 24)Peer count at which ambient discovery stops dialling
--disable-mdnsfalseDisable mDNS LAN discovery

API, UI and operator listeners

FlagDefaultDescription
--apitrueEnable/disable HTTP API server
--api-port8080HTTP API port
--api-bind127.0.0.1API bind address
--cors-origin(none)Allowed CORS origin
--uifalseEnable embedded web UI (requires --api)
--ui-port8000Web UI port
--ui-bind127.0.0.1Web UI bind address
--ui-dir(embedded)Dev override: serve UI from filesystem
--ui-faucet(none)Base URL of a faucet service; the UI proxies /faucet/* to it (empty = faucet button hidden)
--wallettrueExpose /wallet/ in the embedded UI; --wallet=false serves 404
--metrics-addr127.0.0.1:9095Operator listener for /metrics, /health, /ready; empty disables it
--ready-min-peers1Connected-peer floor below which /ready reports not ready (0 declares a standalone node)
--ready-finality-stall90sHow long the final-height watermark may stay flat, with a backlog, before /ready fails

Provider mode

FlagDefaultDescription
--providefalseEnable provider mode (requires KVM; auto-accepts matching leases)
--vcpus2vCPUs to offer
--memory2048Memory in MB
--disk20Disk in GB
--price-multiplier1000Provider price multiplier ×1000 (1000 = baseline); non-default values are flagged as simulation-only pending anti-cheat gates
--ssh-port0SSH gateway port (0 = disabled)
--limactl-path(PATH)Path to limactl
--min-lease-duration(none)Policy: minimum lease duration as a Go duration (e.g. 1h); empty = no limit
--max-lease-duration(none)Policy: maximum lease duration (e.g. 720h); empty = no limit
--min-lease-cost0Policy: minimum cost in whole XCU (0 = no min)
--max-lease-cost0Policy: maximum cost in whole XCU (0 = no max)
--max-concurrent-leases0Policy: max active leases (0 = capacity-bound only)

The lease-duration flags are duration strings, not numbers — passing 0 fails validation and stops the node at startup. Leave them unset for no limit.

Logging

FlagDefaultDescription
--log-levelinfodebug, info, warn or error
--log-file(stderr)Write to a size-bounded rotating file instead of stderr
--log-max-size / --log-max-files(see --help)Rotation size in MB and number of rotated files kept
--log-jsonfalseEmit logs as JSON

Recovery phrase v2

xe wallet create                     # 24 BIP39 words, account 0
xe wallet create --passphrase        # two hidden BIP39 passphrase prompts
xe wallet restore --account 1        # words read from stdin, never argv
xe wallet restore --account 1 --passphrase
xe wallet phrase                     # reveal stored words

Restore accepts 12, 15, 18, 21 or 24 English BIP39 words and refuses to overwrite an existing wallet. Terminal input is hidden; end a phrase shorter than 24 words with a blank line. A pipe can end with EOF. --passphrase requires a terminal and prompts there; its value is never an argument and is never stored. A wrong passphrase opens a different, empty account. Keep it separately from the words. Check the printed address after restore. Creation asks twice and requires identical entries. A mismatch restores terminal echo, exits non-zero and writes no files:

BIP39 passphrases do not match; wallet was not created

Restore keeps a single passphrase prompt; the printed address is the check.

XE derives SLIP-0010 ed25519 at m/44'/22597'/account', all hardened. The coin type is 22597. Account indices range from 0 through 2147483647. The default is 0. The phrase is your only backup unless you separately save the hex signing seed.

wallet.seed stays 64 hex and mode 0600. The additional wallet.phrase, also 0600, contains words, account: N and address: <64 hex> on separate lines. XE_WALLET selects the seed file; its .seed suffix becomes .phrase (or .phrase is appended without a suffix). wallet phrase compares the recorded address with the address derived from wallet.seed, without needing the BIP39 passphrase. If the address is missing or does not match, it exits non-zero, prints no words and says:

the phrase file does not belong to this wallet; its backup is wallet.seed

This detects a leftover phrase file after copying an older seed into place. Create and restore also refuse a stray phrase file when the seed is missing, before requesting input. They name the file and leave it untouched:

recovery phrase file already exists at <path>; refusing to overwrite it

Wallets made before v2 restore from their hex seed. Old words are valid BIP39 but derive a different account. For a hex-only wallet, wallet phrase fails:

this wallet was created from a hex seed and has no recovery phrase; its backup is wallet.seed