Hello World Workflow
This guide builds the smallest end-to-end workflow:
- You create a commit with
dwp-state: build - AYNIG runs
.dwp/command/build - The command emits a new commit advancing the state
1) Initialize the repo
aynig init2) Create a command
cat > .dwp/command/build <<'EOF'#!/usr/bin/env bashset -euo pipefail
echo "Build requested: ${AYNIG_BODY}" > build.out
git add build.outgit commit -m "build: done" -m $'Build completed.\n\ndwp-state: done'EOF
chmod +x .dwp/command/build3) Request a build (commit protocol)
Create a commit with a trailer:
chore: request build
Build this project.
dwp-state: build4) Run
aynig run5) Verify
dwp-stateshould now bedonebuild.outshould exist
Notes
- AYNIG does not decide the next state — the command does.
- Use
COMMANDS.mdin your repo to document which states exist.