Skip to content

CLI reference

The following output was captured from target/debug/leaf after cargo build -p leaf. It includes top-level help and help for every command and nested subcommand. Output is preserved as printed by the CLI.

Every successful --json response uses schema 1. List commands, including leaf deploys --json, emit newline-delimited objects with type and data; see the JSON output reference for examples.

For API requests, leaf sends its version, operating system, and CPU architecture in the User-Agent header (for example, leaf/0.1.0 (linux; x86_64)). LeafCloud uses these three values to understand which platforms need support and to tell you when an update is available. It sends no other device details for this purpose.

$ leaf --help
Usage: leaf [OPTIONS] [COMMAND]
Commands:
login Sign in through your browser
logout Sign out and remove the saved token
whoami Show the signed-in account
invite Redeem an invite code to activate your account
sites Manage static sites
sessions List or revoke CLI sessions
keys Manage API keys
deploy Build and deploy a static site
deploys List deploy history for a site
rollback Roll back a site to a kept deploy
usage Show account usage
help Print this message or the help of the given subcommand(s)
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf login --help
Sign in through your browser
Usage: leaf login [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf logout --help
Sign out and remove the saved token
Usage: leaf logout [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf whoami --help
Show the signed-in account
Usage: leaf whoami [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf invite --help
Redeem an invite code to activate your account
Usage: leaf invite [OPTIONS] <CODE>
Arguments:
<CODE>
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sites --help
Manage static sites
Usage: leaf sites [OPTIONS] <COMMAND>
Commands:
create Create a site, suggesting names if none is supplied
list List your sites
delete Delete a site
help Print this message or the help of the given subcommand(s)
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sites create --help
Create a site, suggesting names if none is supplied
Usage: leaf sites create [OPTIONS] [NAME]
Arguments:
[NAME]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sites list --help
List your sites
Usage: leaf sites list [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sites delete --help
Delete a site
Usage: leaf sites delete [OPTIONS] <NAME>
Arguments:
<NAME>
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf deploy --help
Build and deploy a static site
Usage: leaf deploy [OPTIONS] [PATH]
Arguments:
[PATH] Directory containing the project or built output
Options:
--dir <DIR> Explicit project or output directory
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--no-build Skip the detected build command
--dry-run Build and inspect the site without authenticating or uploading
--allow-secrets Publish files that look like private keys or credentials. Only use this if you are sure they are meant to be public.
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf deploys --help
List deploy history for a site
Usage: leaf deploys [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--site <SITE>
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf rollback --help
Roll back a site to a kept deploy
Usage: leaf rollback [OPTIONS] [DEPLOY_ID]
Arguments:
[DEPLOY_ID]
Options:
--json Print machine-readable newline-delimited JSON
--site <SITE>
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sessions --help
List or revoke CLI sessions
Usage: leaf sessions [OPTIONS] [COMMAND]
Commands:
revoke Revoke a session by ID
help Print this message or the help of the given subcommand(s)
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf sessions revoke --help
Revoke a session by ID
Usage: leaf sessions revoke [OPTIONS] <ID>
Arguments:
<ID>
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf keys --help
Manage API keys
Usage: leaf keys [OPTIONS] <COMMAND>
Commands:
create Create an API key. The secret is shown once
list List API keys without their secrets
revoke Revoke an API key by ID
help Print this message or the help of the given subcommand(s)
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf keys create --help
Create an API key. The secret is shown once
Usage: leaf keys create [OPTIONS] --name <NAME> --can <CAN>
Options:
--json Print machine-readable newline-delimited JSON
--name <NAME>
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--can <CAN> [possible values: deploy, read]
--site <SITE>
--yes Skip interactive confirmations
--expires <EXPIRES> [default: 90d]
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf keys list --help
List API keys without their secrets
Usage: leaf keys list [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf keys revoke --help
Revoke an API key by ID
Usage: leaf keys revoke [OPTIONS] <ID>
Arguments:
<ID>
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help
$ leaf usage --help
Show account usage
Usage: leaf usage [OPTIONS]
Options:
--json Print machine-readable newline-delimited JSON
--api <API> Use an alternate LeafCloud API base URL [env: LEAF_API=] [default: https://api.leafcloud.in]
--yes Skip interactive confirmations
--quiet Suppress non-essential output
--no-color Disable ANSI color output
--version Print the CLI version
-h, --help Print help