For the complete documentation index, see llms.txt. This page is also available as Markdown.

Applying a Scaffold Config

Background

stoobly-agent scaffold apply requires stoobly-agent v2.5.0 or later.

scaffold apply runs a declarative config file, so the whole setup can be reviewed, version-controlled, and reproduced by teammates with one command — this is the recommended way to scaffold an app and its services. The previous pages also show how to run the same steps as individual commands: scaffold app create, then scaffold service create per service. That's still fully supported and useful for one-off scaffolds or quick experiments, but typing out each command by hand doesn't leave you with anything to check into version control.

For the full command reference and config schema:

Apply

Steps to Apply a Scaffold Config

1

Write .stoobly/scaffold.yml

Create a .stoobly/ directory in your app's root if it doesn't already exist, and write a config describing your app and its services:

# .stoobly/scaffold.yml
version: 1
commands:
  - resource: app
    action: create
    options:
      app_name: <APP-NAME>
      # For E2E testing, add plugin: [playwright] or plugin: [cypress]
      plugin: [playwright]

  - resource: service
    action: create
    options:
      service_name: <SERVICE-NAME>
      hostname: <SERVICE-HOSTNAME>
      scheme: <SERVICE-SCHEME>
      port: <SERVICE-PORT>

  # Add one service block per service. Repeat as needed.
2

Validate with --dry-run

stoobly-agent scaffold apply .stoobly/scaffold.yml --dry-run

This checks the config's schema and each step's options without creating anything. Fix any reported errors before continuing.

3

Apply for real

stoobly-agent scaffold apply .stoobly/scaffold.yml

Each step logs as it runs. If a step fails, scaffold apply stops there — earlier steps' side effects stay in place, and later steps don't run. Fix the error and re-run the same command.

4

Commit .stoobly/scaffold.yml to version control

Check the config into the same repository as your app. Any teammate can now reproduce the exact same scaffold setup with the same two commands.

Next Steps

Now that your app and services are scaffolded, you can run workflows:

How to Run a Workflow

To regenerate scaffold files after upgrading stoobly-agent, or to add more steps to your config later:

How to Update a Scaffold

Last updated