atmos auth env
Quickly generate temporary cloud credentials as environment variables so you can run tools like Terraform, AWS CLI, or SDKs without manually copying and pasting access keys. This makes it seamless to switch between identities, integrate with scripts, and keep your sessions secure and short-lived.
Usage​
atmos auth env [--identity <name>] [--format bash|json|dotenv]
Formats​
bash(default)Prints
export KEY='value'lines.jsonPrints a JSON object of environment variables.
dotenvPrints
KEY='value'lines.
Examples​
# Export for the default identity (bash format)
atmos auth env
# Interactively select identity
atmos auth env --identity
# JSON format for a specific identity
atmos auth env --identity prod-admin --format json
# Dotenv format
atmos auth env --format dotenv
Flags​
--identity(alias-i)Specify the identity to use. This flag has three modes:
- With value (
--identity admin): Use the specified identity - Without value (
--identity): Show interactive selector to choose identity - Omitted: Use the default identity configured in
atmos.yaml
- With value (
--format(alias-f)- Output format. Supported:
bash,json,dotenv. Default:bash.
Environment variables​
ATMOS_IDENTITY- Default identity when
--identityis not provided. ATMOS_AUTH_ENV_FORMAT- Sets the default output style for exported credentials. Supported values:
bash,json,dotenv.