Skip to content

fnox lease create ​

  • Usage: fnox lease create [FLAGS] [BACKEND_NAME]

Create short-lived credentials from a lease backend

Creates a lease from BACKEND_NAME, or from every configured backend when you omit it, records it in the project's lease ledger, and prints the credentials. The default shell format shows a summary with masked values; json and env print the real credentials, so keep that output out of logs.

The lease lasts for --duration, else the backend's duration setting, else 15 minutes, and cannot exceed the backend's maximum.

Arguments ​

  • [BACKEND_NAME] — Lease backend from [leases.<name>] (default: every configured backend)

Flags ​

  • -a --all — Create leases for every configured backend

  • -d --duration <DURATION> — Lease length, such as 15m, 1h, or 2h30m; overrides the backend's duration

  • -f --format <FORMAT> — Output format

    Choices: shell, json, env

    Default: shell

  • -i --interactive — Prompt for backend credentials that are missing from the environment

  • -l --label <LABEL> — Label recorded with the lease, such as its purpose

    Default: fnox-lease

  • -h --help — Print help

Examples ​

Create a 30-minute lease

sh
fnox lease create aws --duration 30m

Export the credentials into the current shell

sh
eval "$(fnox lease create aws --format env)"

Prompt for missing backend credentials

sh
fnox lease create aws --interactive

See also ​

MIT LicenseCopyright © 2026jdx.dev