Skip to main content

Atmos Automation Functions

Automation functions are the helpers Atmos supplies to scripts written in the Atmos Automation Language. Use them to declare a program's command line, run Atmos and external commands, resolve component configuration, install tool dependencies, use configured identities, run work in parallel, and give users formatted progress and actionable errors.

Automation functions run when a script executes: in a standalone program, a custom command, a workflow step, or a lifecycle hook. They are separate from YAML functions and template functions, which Atmos evaluates while it loads stack manifests.

Every function and value on these pages is available without an import. Atmos predeclares the names cli, atmos, components, exec, steps, fs, json, regex, dependencies, ui, log, errors, env, and ctx, and the script's top-level output variable sets its result. The language itself, including statements, operators, and the universal built-ins, is described in the language reference.

Function categories​

CategoryFunctions
Command linecli.command, cli.arg, cli.flag
Atmos commandsatmos.run, atmos.terraform, atmos.helm, atmos.toolchain, and one wrapper for each built-in command
Componentscomponents.get, component.exec
Processesexec.run, dependencies.tools
Concurrencysteps.task, steps.parallel
Files and datafs.read_file, json.encode, json.decode, json.indent, json.encode_indent
Textregex.search, regex.findall, regex.replace
Messagesui.info, ui.success, ui.warning, log.trace, log.debug, log.info, log.warn, log.error, print
Errorserrors.build
Built-in valuesctx, env, output, load

Step library​

Call steps.input, steps.http, steps.container, and the other step functions with the same fields used in YAML. Each call returns a value, metadata, and named outputs. Use steps.run(type, **fields) when the step type is selected at runtime.

Atmos command wrappers​

Use a command wrapper such as atmos.vendor("pull") to run the matching Atmos command. See atmos.run for shared signatures, flag translation, process options, and results.

The built-in commands each have a reference page: about, ai, ansible, atlantis, auth, aws, azure, cast, ci, completion, composition, config, container, describe, devcontainer, docs, emulator, env, gcp, git, helmfile, help, init, kubernetes, list, lsp, mcp, packer, pro, profile, sbom, scaffold, secret, stack, store, support, theme, validate, vendor, version, workflow.

The module reflects the commands registered in the running Atmos, so it also includes the aliases of those commands (an, c, emu, hf, k8s, pk, and tf) and every custom command defined in atmos.yaml. A custom command named capacity is callable as atmos.capacity(...). A command name that contains a hyphen cannot be written as an attribute, so call it with atmos.run, for example atmos.run(["my-command"]).

All automation functions​