Harthelm Docs
Concepts

Landscapes

harthelm.yml describes a landscape; Sync changes it, Run starts it, and the stages prepare, test and run.

Last updated 2026-10-19

A workspace's landscape is the app around its code: the steps that prepare and test the code, and the services that run it. You describe it in harthelm.yml in /data/app; Harthelm builds it from that file.

harthelm.yml
schema: harthelm/v1

prepare:
  - name: Install dependencies
    run: npm ci

test:
  - run: npm test

services:
  web:
    type: steps
    steps:
      - name: Serve
        run: npm start
    ports:
      - port: 3000
        routes:
          - path: /

Every key is in the harthelm.yml reference.

Sync, Run, Stop and Teardown

Four actions change a landscape. They are buttons at the top of the Run panel and hart commands.

ActionWhat it doeshart
SyncReads harthelm.yml, shows what changes, and then creates, changes and removes services. Starts nothinghart sync
RunStarts the run stage: every steps service runs its steps. Sleeping services wakehart run
StopStops the steps; the pods stayhart stop
TeardownRemoves every service's pods and routes and pauses managed services. Code, env vars and secrets stay; the next Sync builds it again

A Sync always shows a review first: the services to add, change and remove, their plan and size, the team's quota after the Sync, warnings, and anything that blocks it. It also asks for secret values the file references but the vault does not have yet.

A changed harthelm.yml, env var or secret reaches the services only at the next Sync. The Run panel says so: "harthelm.yml changed since the last Sync".

The three stages

StageRunsSeesStart it
preparein the workspace, steps one after the other; the first failing step fails the stagethe workspace env vars, no secretsRun all in the Run panel, hart prepare
testlike preparelike prepareMore stages → Run test stage, hart test
runin every replica of every steps service, the services in parallelthe workspace env vars, the service's env and its secretsRun, hart run

Each step runs as bash -lc '<run>' in /data/app, with mise and Nix on the path. Prepare and test read the file as it is when they start, not as last synced.

In the run stage, all steps of a service but the last run once; the last step is the server. When it exits, Harthelm starts it again after a growing pause (1 s up to 60 s), and marks the service Failed after 5 exits within 2 minutes. A last step that exits with 0 counts as finished. The steps run again on every pod start while the landscape is started, also after a wake.

Profiles

A profile is a variant of the whole file in harthelm.<profile>.yml, for example harthelm.prod.yml. Sync, prepare and test take a profile; Run uses the profile of the last Sync. See Profiles.

Where you edit it

  • In the IDE: the editor knows the schema, completes keys and underlines mistakes.
  • In Landscape config on the rail: the same file as a form, as YAML, or both side by side. The YAML stays the source; the form edits it.
  • From anywhere: hart validate checks a file with the same rules as the platform.

Next steps

On this page