You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-2Lines changed: 52 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ workflows:
34
34
35
35
Supported step types are only `vars`, `bash`, and `agent`.
36
36
37
+
The input path must be a regular file no larger than 1 MiB. The input file must be valid UTF-8, non-empty YAML with a mapping root, no duplicate mapping keys, and no YAML aliases. Workflow and step names are single-line labels. Executable fields reject unsafe control bytes while allowing normal newlines and tabs. `vars` keys must be uppercase shell variable names, and `agent` names may contain only letters, digits, `_`, and `-`.
38
+
37
39
Harness paths are derived from workflow ids. `wf_example` writes `.harness/example.sh`.
38
40
39
41
## Commands
@@ -50,18 +52,66 @@ uv run flowsh .made/workflows.yml --dry-run
50
52
51
53
# Overwrite existing harness files
52
54
uv run flowsh .made/workflows.yml --force
55
+
56
+
# Show version
57
+
uv run flowsh --version
53
58
```
54
59
55
-
Generated harness logs go to `.flowsh/logs` by default. Set `FLOWSH_LOG_DIR` when running a harness to use another local log directory.
60
+
## CLI Contract
61
+
62
+
`flowsh`is non-interactive. It never prompts for missing information.
63
+
64
+
Current help output is plain text and deterministic across repeated runs:
65
+
66
+
```text
67
+
Usage: flowsh [OPTIONS] WORKFLOW_YAML
68
+
69
+
Generate reproducible OpenCode Bash harness scripts from MADE workflow YAML.
70
+
71
+
Arguments:
72
+
WORKFLOW_YAML Path to .made/workflows.yml \[required]
73
+
74
+
Options:
75
+
--workflow TEXT Optional workflow id to generate. Defaults to all workflows.
76
+
--dry-run Print planned output paths without writing scripts.
77
+
--force Overwrite existing files. Without this, existing files cause a failure.
78
+
--version Show the flowsh version and exit.
79
+
--help Show this message and exit.
80
+
```
81
+
82
+
The CLI pins its help formatter width so this contract does not vary with the
83
+
caller terminal size or `COLUMNS` environment value.
Generated harnesses are also non-interactive. `harness.sh --dry-run` exits `0` after logging planned steps to stderr and creating no log directory. A real harness run exits `0` only after every step succeeds. Failed `bash`, `vars`, or `agent` steps return the failing command status, log `Step failed: <step> (exit=<code>)` to stderr, and stop before later steps run. If an `agent` step runs without `opencode` on `PATH`, the harness exits `127` and prints `opencode CLI not found in PATH` to stderr.
100
+
101
+
Generated harnesses are written with owner-only executable permissions and refuse to overwrite existing paths unless `--force` is passed. Multi-workflow generation preflights overwrite conflicts before writing any harness. The `.harness` output directory must be a real directory, not a symlink or file. Harness dry runs do not create log files or directories. Real harness logs go to `.flowsh/logs` by default with owner-private directory and file permissions. Set `FLOWSH_LOG_DIR` when running a harness to use another local relative log directory; absolute paths, `..` path segments, symlinked path components, and non-directory log paths are refused. Logging setup and write failures fail the harness instead of being silently ignored.
102
+
103
+
Generated `bash` and `vars` bodies run with `bash -euo pipefail`, so command failures stop the workflow instead of being masked by later successful commands. Captured `vars` values are exported for later `bash` steps. `agent` steps invoke only `opencode run --format json` and fail with a clear error if `opencode` is not on `PATH`.
56
104
57
105
## Development
58
106
59
107
```bash
60
108
uv sync
61
109
make install
110
+
make build
62
111
make qa
63
112
```
64
113
65
114
`make install`installs `flowsh` into the user PATH with `uv tool install --force .`.
115
+
`make build`creates reproducible source and wheel distributions under ignored `dist/`.
66
116
67
-
`make qa`runs Ruff, Python compile checks, and pytest. There is no TypeScript compiler, template system, DSL explorer, or legacy node registry.
117
+
`make qa`runs Ruff, Python compile checks, pytest, and package builds locally and in CI. There is no TypeScript compiler, template system, DSL explorer, legacy node registry, or archived legacy workflow spec in this repository.
0 commit comments