Environment variables
The leaf CLI respects the following environment variables for configuration, authentication, and execution control.
LEAF_TOKEN
Section titled “LEAF_TOKEN”Provides a personal access token or scoped API key for authentication.
- Usage: Continuous integration (CI/CD) pipelines, scripts, and automated agents.
- Precedence: When
LEAF_TOKENis set,leafuses it directly and skips reading credentials from~/.config/leaf/credentials.json. - Example:
Terminal window export LEAF_TOKEN="leaf_pat_your_api_key_here"leaf deploy --yes
LEAF_API
Section titled “LEAF_API”Overrides the default API endpoint URL.
- Default:
https://api.leafcloud.in - CLI Flag:
--api <URL> - Example:
Terminal window export LEAF_API="https://api.leafcloud.in"
LEAF_NO_BANNER
Section titled “LEAF_NO_BANNER”Disables the LeafCloud ASCII banner when set to 1.
- Default: Unset (banner displayed on interactive version checks and first run).
- Example:
Terminal window export LEAF_NO_BANNER=1
Automatically recognized by leaf. When set in continuous integration platforms (such as GitHub Actions, GitLab CI, or CircleCI), the CLI automatically suppresses the decorative terminal banner.
System environment variables
Section titled “System environment variables”XDG_CONFIG_HOME: Overrides the base configuration directory (defaults to~/.config). Credentials are stored in$XDG_CONFIG_HOME/leaf/credentials.json.HOSTNAME: Used duringleaf loginto name the device session (e.g.,leaf on workstation). Defaults tocomputerif unset.