@lyhna/cli
v0.1.0
Published
CLI for Lyhna execution authority — bind actions and verify receipts
Readme
@lyhna/cli
Command-line interface for Lyhna execution authority. Thin wrapper around @lyhna/bind.
Install
npm install -g @lyhna/cliAuthenticate
export LYHNA_API_KEY="lyhna_..."Bind an action
lyhna bind \
--action-type deploy_service \
--action-payload '{"service":"web","version":"1.4.2"}' \
--intent release_v3 \
--intent-version 1Or load the payload from a file:
lyhna bind \
--action-type deploy_service \
--action-payload @./payload.json \
--intent release_v3 \
--intent-version 1The full receipt is printed to stdout as JSON. Pretty-printed when stdout is a TTY.
Verify a receipt
lyhna verify ./receipt.jsonVerification is offline. No network access. No API key required. The receipt's cryptographic signature and canonical hash are checked locally using the public key embedded in the receipt.
Environment variables
| Variable | Purpose |
|---|---|
| LYHNA_API_KEY | API key for bind. Required unless --api-key is passed. |
| LYHNA_BASE_URL | Override the API base URL. Optional. If unset, the SDK uses its default. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | bind returned APPROVED, or verify returned valid |
| 1 | bind returned REFUSED, or verify returned invalid |
| 2 | bind returned ESCALATED |
| 3 | Transport / network error (bind only) |
| 4 | Auth error — 401/403 (bind only) |
| 5 | Usage error — missing flag, unknown subcommand, malformed JSON |
Documentation
https://docs.lyhna.com
