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.
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
STOREThe name of the configured store backend to read from.
KEYThe 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--formatThe output format. Choices are
text,json, orenv. The default istext.--raw(alias-r)Print the raw value with no trailing newline. This flag works only with the
textformat. 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=jsonor--format=env.
See Also
- atmos store — Overview of the store command group
!storeYAML function — Read a value in stack configuration!store.getYAML function — Read a value directly by key in stack configuration