Skip to main content

flowsh-cli

flowsh-cli turns workflow YAML into executable shell scripts.

Use it when you want a small, reproducible way to encode a workflow once and rerun it locally or in CI.

Quick Start

uvx flowsh-cli path/to/workflows.yml

That reads the workflow YAML at the path you provide and writes harness scripts to the current working directory.

In this repository, the example workflow file lives at workflows.yml.

Useful flags:

uvx flowsh-cli path/to/workflows.yml --dry-run
uvx flowsh-cli path/to/workflows.yml --workflow wf_example
uvx flowsh-cli path/to/workflows.yml --force
uvx flowsh-cli path/to/workflows.yml --schema
uvx flowsh-cli --examples
uvx flowsh-cli --example simple

You can also run it locally with uv run flowsh-cli.

Workflow Shape

The input file is a single mapping with a workflows list:

workflows:
  - id: wf_example
    name: Example
    params:
      - name: ISSUE_NUMBER
        description: Issue to inspect
        required: true
    steps:
      - type: vars
        values:
          TODAY: date -u +%F
      - type: bash
        run: printf 'today=%s\n' "$TODAY"
      - type: agent
        agent: general
        model: openai/gpt-5
        command: review
        expandPrompt: true
        prompt: |
          Review issue ${ISSUE_NUMBER} and summarize the repository state.
       - type: parallel
         steps:
           - type: bash
             run: echo "worker A"
           - type: bash
             run: echo "worker B"
       - type: for
         in: ITEMS
         item: ITEM
         steps:
           - type: bash
             run: echo "$ITEM"
       - type: while
         condition: '[ -n "$(ls doc/plan/steps/planned/ 2>/dev/null)" ]'
         steps:
           - type: bash
             run: echo "keep looping until the queue is empty"

Harness paths are derived from workflow ids. wf_example becomes example.sh in the current working directory.

Step Types

Type Purpose Notes
vars Execute shell commands and export their stdout into shell variables Variable names must be uppercase shell identifiers.
bash Run shell commands Runs with bash -euo pipefail.
agent Call the agent runtime Supports agent, model, command, capture, expandPrompt, and dangerouslySkipPermissions.
for Iterate over newline-delimited values from a previous vars step Flat iteration only; nested for steps are not supported.
while Re-evaluate a Bash condition before each iteration Use for dynamic queues or other stateful loops that must keep discovering new work.
parallel Run child steps concurrently Children run as separate branches and the parent waits for all of them.

Agent Behavior

agent prompts are literal by default. Use expandPrompt: true only when you want $VAR or ${VAR} tokens from earlier vars steps substituted at runtime.

expandPrompt: true does plain text replacement only. It does not evaluate shell expressions like $(...), backticks, or globs.

Set capture: VARIABLE_NAME on an agent step when you want the full agent output stored in a shell variable for later vars or bash steps.

Set dangerouslySkipPermissions: true only when you want the generated harness to pass --dangerously-skip-permissions to the agent runtime. The YAML alias dangerously-skip-permissions is also accepted.

Validation And Safety

The parser is strict:

  • workflow YAML must be UTF-8, non-empty, and under 1 MiB
  • the root must be a mapping with a workflows key
  • duplicate mapping keys and YAML aliases are rejected
  • workflow ids must match wf_[A-Za-z0-9_-]+
  • workflow and step names must be non-empty single-line labels
  • unsafe control characters are rejected in executable fields
  • agent names may contain only letters, digits, _, and -

Generated harnesses are non-interactive, owner-executable, and refuse to overwrite existing outputs unless --force is set.

Logs go to .flowsh/logs by default. Set FLOWSH_LOG_DIR to use another relative log directory.

Development

uv sync
make install
make qa
make clean

make qa runs linting, tests, and a local build.

Release

make bump-patch

That bumps the patch version, runs QA, and publishes the package.

Limits

This repository intentionally stays focused on the Python CLI blueprint. It does not include the old TypeScript implementation, workflow templates, DSL explorer, plugin registry, or extra workflow node types.

Metadata

Release files for flowsh-cli 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowsh-cli 0.9.0
File Size Uploaded Provenance Actions
flowsh_cli-0.9.0.tar.gz 15.7 kB Without provenance Details for flowsh_cli-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flowsh-cli 0.9.0
File Interpreter ABI Platform Actions
flowsh_cli-0.9.0-py3-none-any.whl Python 3 none any Details for flowsh_cli-0.9.0-py3-none-any.whl

Total release size: 34.4 kB

Release files / flowsh_cli-0.9.0.tar.gz

Download URL flowsh_cli-0.9.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5b269798811f28ee6f6f46904e87568e099cda32a260f9056afd026fee22973a
BLAKE2b-256 checksum
How to use checksums
83284003df530f678278f453e85eb7e56a56995c2f377ed840b3ebf5920d8ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / flowsh_cli-0.9.0-py3-none-any.whl

Download URL flowsh_cli-0.9.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae13605282f9702ceb370f3357d842e90e42b2525e82f5d5a8f8f7da2fcf8c77
BLAKE2b-256 checksum
How to use checksums
3057bdbe87a0edc184b9dc05d67820b6241140a1701b211cd8b71ee38d66f84f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for flowsh-cli 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page