Skip to content
Français

Your first YAML recipe

Run two local commands in an ephemeral workspace, without Git, Docker or an agent account.

Create a file, then read it in a second task. You need Node.js 24+ and the Outpost package. This first run needs no Git repository, Docker image or agent account.

In a new directory, install Outpost. Save both YAML files below in that directory.

npm install @elie-laloum/outpost

recipe.yaml lists the tasks. after: [write] makes the second command wait for the first; both use the same working directory.

# yaml-language-server: $schema=https://elie-laloum.github.io/outpost/schemas/recipe.schema.json
version: 3
name: hello-files
tasks:
  - key: write
    command:
      executable: node
      arguments:
        - -e
        - "require('node:fs').writeFileSync('hello.txt', 'Hello from Outpost!')"
  - key: read
    after: [write]
    command:
      executable: node
      arguments: [-p, "require('node:fs').readFileSync('hello.txt', 'utf8')"]

outpost.yaml selects an empty temporary workspace and local execution. Commands run on your machine with your permissions; local provides no isolation. ephemeral describes the working files, not a security boundary.

# yaml-language-server: $schema=https://elie-laloum.github.io/outpost/schemas/recipe-configuration.schema.json
version: 3
workspace:
  kind: ephemeral
sandbox:
  provider: local

Use version 3 in both files for these guides. Their versions describe separate YAML formats, not the installed package version. The schema comments enable completion in editors with a YAML language server.

Validate the files, then execute the recipe with a final JSON report. Validation does not run commands or allocate a sandbox.

Each task declares one operation. If you put both agent and command in a format-3 task, validation names the conflicting operations and reports the task’s line and column. Split them into separate tasks and connect them with after.

npx outpost recipe validate --file recipe.yaml --config outpost.yaml
npx outpost recipe run --file recipe.yaml --config outpost.yaml --json

In the report, outputs.read.stdout contains Hello from Outpost!. The workspace is temporary: hello.txt is not created beside your YAML files. Without --json or configured reports, a successful run is silent.

You want to…Continue with…
Keep generated files, copy a directory or use a Git branchChoose a workspace
Add an agent or switch to DockerConfigure execution
Pass inputs and results between tasksCompose steps
See progress and final resultsFollow a run
Pause for approval and resumeSave progress

The recipe CLI reference lists commands and flags.