Command reference
everycli miner <command> [options]Version 0.1.0. Requires Node.js 22.13+ (22.x). Global options apply to every command.
#Commands
| Command | What it does | Flags |
|---|---|---|
init | Import a signed invitation and your private credentials into local state | --invitation FILE, --secrets-file FILE |
doctor | Run the readiness checklist (credentials, permissions, invitation, coordinator access, cloud binding, TEE admission, availability) | — |
status | Local phase + exact cloud workload status + signed coordinator status | — |
providers | Which provider keys are configured and permitted by your release; no key values printed | — |
earnings | Serving fees by state: review-held, approved, disputed. Not payouts | — |
deploy | Create the one approved Phala confidential VM | --max-hourly-usd N (required, 0 < N ≤ 100) |
activate | After accepted admission, encrypt and release your provider key into the enclave | — |
resume | Clear your own drain flag after fresh post-restart admission | — |
update | Install an operator-signed release after draining | --release FILE |
stop | Drain, then request graceful shutdown of the saved VM (never deletes) | --drain-only |
start | Restart the same stopped VM | --max-hourly-usd N |
reconcile | Read-only check of an interrupted operation; never blindly resubmits | — |
There is no delete command. Deleting a VM is a manual, deliberate action in the Phala console after the operator confirms there is no outstanding work.
#Global options
| Option | Meaning |
|---|---|
--state-dir DIR | Use another private profile (mode 700). Also EVERYCLI_DIR. Default ~/.config/everycli. |
--json | Machine-readable output on read commands |
--yes | Skip the confirmation on mutating commands — only after you have read the cost/mutation warning |
--help, -h | Help for the command |
--version | Print the CLI version |
Unknown flags fail closed. A flag on the wrong command returns invalid_option; an unknown command returns unknown_command.
#Exit codes
| Code | Meaning |
|---|---|
0 | Success |
2 | doctor not ready · status with a coordinator or cloud error · reconcile unresolved |
1 | Any other error |
Errors print a code and a message. Provider request/response bodies, keys and stack traces are deliberately omitted.
#Environment rules
The CLI refuses to run if any of these are set: NODE_OPTIONS, NODE_EXTRA_CA_CERTS, NODE_TLS_REJECT_UNAUTHORIZED, DEBUG, PHALA_CLOUD_API_PREFIX. There is no --coordinator, --insecure, policy override or simulation flag; the coordinator origin and verification key are pinned in the package.
#Files
| Path | Contents |
|---|---|
~/.config/everycli/ | Profile directory, mode 700 |
…/operation.lock | Exclusive lock while a mutating command runs; inspect its PID before removing it after a crash |
…/journal | Owner-only, fsync'd intents and outcomes for deploy, update, activation, start and stop |
Credentials are stored with mode 600, unencrypted. Symlinked paths are rejected.
#Coordinator routes the CLI uses
| Route | Method | Notes |
|---|---|---|
/v1/miner/status?nonce=… | GET | Bearer-scoped, coordinator-signed, bound to nonce/time/miner |
/v1/miner/drain | POST | { "nonce": "48_HEX" }, 1 KB body limit |
/v1/miner/resume | POST | Same shape; requires enabled miner, fresh attestation, matching compose |
The worker image itself speaks /v1/challenge, /v1/attest and /v1/action; see How it works.