CLI/ Exit codes
Exit codes
Categories map to exit codes via EXIT_CODES in src/core/output.ts. Use these to script pipelines.
| Category | Code | Meaning |
|---|---|---|
cancelled | 0 | User aborted a confirmation. Deliberately exits 0 so shell pipelines treat it as a successful no-op; the reason still surfaces on stderr. |
unknown | 1 | Unclassified failure. File a bug. |
auth | 2 | cws-api rejected the API key, JWT, or signature. Re-provision the key or re-onboard. |
config | 3 | Profile or runtime config is missing or invalid. |
io | 4 | Filesystem error — reading a key file, writing the keystore, etc. |
network | 5 | Transport-level error reaching cws-api. Retry with backoff. |
safety | 6 | Mainnet confirmation failed (typed-token mismatch, or refused after seeing the prepared hash). |
signing | 7 | Keystore unlock failed, the curve does not support the requested signature, or the prepared hash did not verify. |
validation | 8 | Input failed schema or business-rule validation. |