Skip to main content

atmos store get

Retrieve a value from a configured store backend. Scope the value with --stack and --component, the same way store set writes it. If you omit --stack and --component, Atmos reads back a value that was set without them.

atmos store get --help
 

Usage

atmos store get STORE KEY [flags]

Examples

# Retrieve a value scoped to a stack and component
atmos store get app-metadata image_tag --stack=prod --component=ecs-service

# Retrieve a store-global value (no --stack/--component)
atmos store get app-metadata shared_config

# Output as JSON
atmos store get app-metadata image_tag --stack=prod --component=ecs-service --format=json

# Output as a shell-sourceable env assignment
atmos store get app-metadata image_tag --stack=prod --component=ecs-service --format=env

# Redirect the raw value to a file with no trailing newline
atmos store get app-metadata image_tag --stack=prod --component=ecs-service --raw > image_tag.txt

# macOS: copy the raw value to the clipboard with no trailing newline
atmos store get app-metadata image_tag --stack=prod --component=ecs-service --raw | pbcopy

Arguments

STORE

The name of the configured store backend to read from.

KEY

The key to retrieve.

Flags

--stack (alias -s)

The Atmos stack used to scope the key when set. This flag is optional. It must match the value used with set.

Environment variable: ATMOS_STACK

--component (alias -c)

The Atmos component used to scope the key when set. This flag is optional. It must match the value used with set.

Environment variable: ATMOS_COMPONENT

--identity (alias -i)

The identity Atmos uses to access the store backend.

Environment variable: ATMOS_IDENTITY

--format

The output format. Choices are text, json, or env. The default is text.

--raw (alias -r)

Print the raw value with no trailing newline. This flag works only with the text format. Use it to pipe the value into another command. You can also redirect it to a file, for example --raw > image_tag.txt. On macOS, you can pipe it to the clipboard with --raw | pbcopy. You cannot combine this flag with --format=json or --format=env.

See Also