Skip to main content
Define Automations as YAML files and manage them with the Ona CLI.

Why define Automations as code

  • Version control. Track changes in Git. Review diffs, revert mistakes, use branches.
  • Reproducibility. The YAML file is the source of truth. No UI clicks to reconstruct a lost Automation.
  • Distribution. Commit Automation files to any repository. Team members run gitpod ai automation create to instantiate them.

Prerequisites

  • Ona CLI installed and authenticated (gitpod login)

Discover the YAML syntax

Generate a reference file covering the full syntax:
gitpod ai automation create --example > automation.yaml

Create an Automation from a file

gitpod ai automation create automation.yaml
On success, the CLI prints the new Automation ID:
Successfully created ai automation a1b2c3d4-5e6f-7890-abcd-ef1234567890
Stdin is also supported:
cat automation.yaml | gitpod ai automation create -

Update an existing Automation

Find the Automation ID:
gitpod ai automation list
Apply the updated file:
gitpod ai automation update <automation-id> automation.yaml
Provided fields replace existing values. Fields not in the YAML remain unchanged. Complex fields like triggers and action are replaced entirely, not merged.

Real-world example

ona-samples/github-security contains two Automation files that pick the highest-severity open security alert, fix it, run tests, and open a PR:
gitpod ai automation create .ona/fix-dependabot-alert.yaml
gitpod ai automation create .ona/fix-codescan-alert.yaml

Next steps