CLI
CLI overview
The px402 command, its three modes and its configuration.
px402 has three modes. There is no pairing code.
| Commands | Identity | Talks to |
|---|---|---|
init, address, balance, deposit, split, pay, caps | A Solana key made on your machine. No px402 account | Solana through your Helius key, and the API you pay |
hosted ... | A revocable browser sign-in. No key on this machine | The px402 MCP connector |
identity, me, provider, admin | Your Turnkey sub-organization’s root API key, stored encrypted | The px402 platform API |
Install it first with npm, pnpm, Yarn or Bun. px402 --help prints every command. Every command accepts
--profile <name>.
Environment
| Variable | Used by | Meaning |
|---|---|---|
PX402_NETWORK | balance, deposit, split, pay | devnet. Mainnet takes no payments |
PX402_HELIUS_RPC_URL | the same | Your Helius RPC URL. It contains your key, so keep it private |
PX402_MAX_PRICE_BASE | pay | Refuse any price above this, in base units. Required |
PX402_ALLOWED_ORIGINS | pay | Comma-separated origins, one-label wildcards allowed. Unset refuses every payment |
PX402_CAP_PER_REQUEST_BASE, PX402_CAP_DAILY_BASE, PX402_CAP_TOTAL_BASE | pay | Override the stored caps |
PX402_MAX_IN_FLIGHT_PAYMENTS | pay | Transfers built at once, 1 to 64. Default 4 |
PX402_PASSPHRASE | key commands | 12 characters or more. Prompted when unset |
PX402_HOME | all | Where profiles live. Default ~/.px402 |
PX402_PROFILE | profile commands | Default default |
PX402_PLATFORM_URL | provider commands | Default https://devnet.platform.px402.tech |
PX402_TURNKEY_API_URL | provider commands | Default https://api.turnkey.com |
PX402_MCP_URL | hosted | Default https://devnet.mcp.px402.tech/mcp |
PX402_MCP_CLIENT_ID | hosted | OAuth client id for another connector |
An empty value counts as unset. The CLI sends no telemetry.
Keep safe
Do not put PX402_PASSPHRASE or an RPC URL with your key into a script you commit or a log you share.