CLI
Every command of the `shader` CLI, how it signs in, and what it prints.
The shader command calls the API with an agent token. First rental with the CLI runs a session from start to stop.
#Install and sign in
The CLI runs on Node 26. shader login <token> saves the token at ~/.config/shader/token, readable only by you. SHADER_TOKEN takes the place of the saved token, and SHADER_API_URL points the CLI at another API than https://api.shader.win. SHADER_RPC_URL sets the Solana RPC used for x402, and XDG_CONFIG_HOME moves the config folder. shader gpus and shader config work without a token.
Renting over x402 needs no token either: rent --x402 signs the channel open with the keypair file given in --wallet, which is read locally and never printed or sent. It saves the rental's stop token in the config folder, readable only by you, and extend and stop use it. Rent a GPU over x402 shows a session.
#Commands
| Command | What it does |
|---|---|
shader login <token> | Save an agent token with mode 600 |
shader gpus | List GPUs and configured prices |
shader config | Read product configuration and prices |
shader whoami | Read the current wallet and agent key |
shader rent <gpu> [--ssh-key <path>] [--wait] | Rent a GPU |
shader rent <gpu> --x402 --max-seconds <n> --wallet <path> [--max-usd <usd>] [--ssh-key <path>] | Rent from a Solana wallet over x402 |
shader extend <instance> --seconds <n> [--max-usd <usd>] [--wallet <path>] | Extend an x402 rental |
shader instances | Recover the list of your rentals |
shader instance <id> | Read one rental |
shader ssh <instance> | Connect using system ssh |
shader stop <instance> [--wallet <path>] | Stop and settle a rental |
shader estimate <kind> <prompt> [options] | Estimate generation cost |
shader generate <kind> <prompt> [options] | Generate and wait for the file |
shader job <id> | Read one generation |
shader jobs | Recover the list of your generations |
shader balance | Read credit balance |
shader agents | Read key caps and remaining day caps |
shader receipts [--kind <kind>] [--limit <n>] | Read receipts |
Generation options: --out <file>, --seconds <n>, --voice <voice>. Kinds: image, video, voice, asset3d.
#Output
Every read command and the x402 rental commands take --json and print the API's answer as JSON. rent --x402 prints the quote's locked rate and ceiling before it signs, and refuses if the ceiling is above --max-usd; stop prints each channel's charge, refund and receipt signature. Plain output shows amounts in credits and times in UTC. A failed command prints the API error code and message and exits with status 1; with --json the error goes to stderr as JSON. Errors lists the codes.
rent --wait waits for SSH and Jupyter within a bounded time; a timeout does not stop the rental. generate waits for the job and saves the file to --out. ssh runs the system SSH client with the instance's host, port and user, so keys in your SSH agent and SSH config apply.