Skip to main content

CLI Reference

The enclava CLI deploys and operates your apps on Enclava. Run enclava <command> --help for the current flags.

Account and context​

enclava login [--no-browser] [--org ORG] [--approve-logs]
enclava whoami
enclava logout

login opens the console in your browser to approve the session. Use --no-browser to approve from another device, --org to scope the session to one organization, and --approve-logs to let the session read app logs. See Console and CLI login.

App lifecycle​

enclava init [--app-name NAME] [--port PORT]  # generate enclava.toml (prompts when interactive)
enclava prepare [--yes] # write enclava.toml + CI signing workflow
enclava create [--image IMAGE] --signer-subject SUBJECT [--signer-issuer URL]
enclava deploy --image IMAGE@DIGEST [--set KEY=VALUE] [--set-file KEY=PATH] [--storage-password-file PATH]
enclava status [--app APP]
enclava logs [--app APP] [-f] [--log-private-key-file PATH]
enclava rollback [--to DEPLOYMENT_ID]
enclava destroy [--app APP] [--force] [--abandon-teardown]

deploy requires a digest-pinned image and local enclava.toml. --storage-password-file claims ownership on the first deploy (password mode) and unlocks on redeploys. The first claim requires a terminal on stdin — the file flags replace the password prompt, not the attended-session rule (see Storage, unlock and recovery). --set-file delivers a secret from a file without exposing it in process arguments. logs requires a tenant-held log key created with enclava log-key generate --app <app> --key-id <id>. destroy verifies the confidential workload teardown completed; --abandon-teardown finishes the destroy anyway when it cannot (records a waiver — same-name recreation is then refused stale_owner_seed until an operator erases the stale seed and clears the waiver).

Config and secrets​

enclava config set FEATURE_FLAG=enabled  # local enclava.toml only; no --app
enclava config get [--app APP] # lists names, never plaintext values
enclava config unset KEY [--app APP]

Inline config set values may appear in process listings and shell history. Use deploy --set-file KEY=PATH for sensitive values. Template apps currently have no config set path.

Templates​

enclava template list
enclava template deploy debian-ssh-frp --name shell --ssh-public-key-file ~/.ssh/id_ed25519.pub
enclava template ssh-command --name shell --wait [--json]

--json prints machine-readable deployment and endpoint details. See Deploy a template.

Ownership and recovery​

enclava claim [--app APP] [--password-file PATH]
enclava unlock [--app APP] [--password-file PATH]
enclava recover [--app APP] [--mnemonic-file PATH] [--new-password-file PATH]
enclava change-password [--app APP] [--current-password-file PATH] [--new-password-file PATH]
enclava auto-unlock enable --image IMAGE@DIGEST [--password-file PATH] # needs local enclava.toml
enclava auto-unlock disable --image IMAGE@DIGEST [--password-file PATH] # needs local enclava.toml
enclava key status
enclava key setup --backup-out "$HOME/.enclava/org-signing-backup.json" [--passphrase-file PATH] [--new-passphrase-file PATH] # create the org signing authority; required before a fresh org's first create
enclava key backup --out "$HOME/.enclava/my-app-recovery.json" [--new-passphrase-file PATH]
enclava key restore <backup-file> [--force] [--passphrase-file PATH]

Password-mode workloads protect state with owner-controlled material. claim and unlock run automatically when deploy is given --storage-password-file. Run the standalone commands to enter the password interactively, or pass their --*-file flags to skip the prompts. A first claim — with or without a file flag — still requires a terminal on stdin, because the one-time recovery mnemonic is delivered to that session; unlock, recover, and change-password run unattended with their file flags. Password prompts are written to stderr, so if you capture output with 2>&1 | tee, use the file flag instead of the prompt. Back up recovery material right after the first deploy. See Storage, unlock and recovery.

Which commands need a terminal​

CommandInteractive by defaultUnattended path
initprompts for app name and port--app-name/--port, or a non-interactive session (deterministic defaults)
prepareconfirms before overwriting existing files--yes
loginbrowser approval of the device flow--no-browser prints the URL and code; the approval itself stays a human step
key setuppassphrase prompt--passphrase-file/--new-passphrase-file (the --backup-out file is owner material — a person should choose where it goes)
first deploy / claimalways (terminal stdin; one-time recovery mnemonic)none — hand the exact command to a person
unlock / recover / change-passwordpassword prompts--password-file; recover --mnemonic-file --new-password-file; change-password --current-password-file --new-password-file
destroyconfirmation--force

Organizations and signer identity​

enclava org
enclava signer set SUBJECT [--issuer URL] [--app APP]
enclava signer rotate SUBJECT [--confirmation-token TOKEN] [--issuer URL]

Enclava uses your organization keyring and the pinned signer identity to decide whether the local CLI key can deploy and whether an image was produced by an authorized identity. The signer subject is typically a GitHub Actions workflow reference or an email.