WRKFLW (CLI and Library)
This crate provides the wrkflw command-line interface and a thin library surface that ties together all WRKFLW subcrates. It lets you validate and execute GitHub Actions workflows and GitLab CI pipelines locally, with a built-in TUI for an interactive experience.
- Validate: Lints structure and common mistakes in workflow/pipeline files
- Run: Executes jobs locally using Docker, Podman, emulation, or secure emulation, with optional diff-aware trigger filtering
- Watch: Reruns workflows on file changes with trigger-aware filtering
- TUI: Interactive terminal UI for browsing workflows, running, and viewing logs
- Trigger: Manually trigger remote runs on GitHub/GitLab
- List: Detect workflow and pipeline files in the repo
Installation
Quick start
# Launch the TUI (auto-loads .github/workflows)
# Validate all workflows in the default directory
# Validate a specific file or directory
# Validate multiple files and/or directories
# Run a workflow (Docker by default)
# Use Podman, emulation, or sandboxed secure emulation instead of Docker
# Diff-aware filtering (skip workflows whose on: block doesn't match)
# Watch for changes and rerun affected workflows
# Open the TUI explicitly
Commands
-
validate: Validate workflow/pipeline files and/or directories
- GitHub (default):
.github/workflows/*.yml - GitLab:
.gitlab-ci.ymlor files ending withgitlab-ci.yml - Accepts multiple paths in a single invocation
- Exit code behavior (by default):
1when any validation failure is detected - Flags:
--gitlab,--exit-code,--no-exit-code,--verbose
- GitHub (default):
-
run: Execute a workflow or pipeline locally
- Runtimes:
docker(default),podman,emulation,secure-emulation - Flags:
--runtime,--job,--jobs,--preserve-containers-on-failure,--gitlab,--verbose - Trigger filter flags:
--event,--diff,--changed-files,--diff-base,--diff-head,--base-branch,--activity-type,--strict-filter(default on),--no-strict-filter
- Runtimes:
-
watch: Watch a directory and rerun affected workflows on change
- Flags:
--runtime,--debounce,--event,--max-concurrency,--base-branch,--activity-type,--max-pending-events,--ignore-dir,--strict-filter/--no-strict-filter
- Flags:
-
tui: Interactive terminal interface
- Browse workflows, execute, and inspect logs and job details
-
trigger: Trigger a GitHub workflow (requires
GITHUB_TOKEN) -
trigger-gitlab: Trigger a GitLab pipeline (requires
GITLAB_TOKEN) -
list: Show detected workflows and pipelines in the repo
Environment variables
- GITHUB_TOKEN: Required for
triggerwhen calling GitHub - GITLAB_TOKEN: Required for
trigger-gitlab(api scope)
Exit codes
validate:0if all pass;1if any fail (unless--no-exit-code)run:0on success,1if execution fails
Library usage
This crate re-exports subcrates for convenience if you want to embed functionality:
use Path;
use ;
# block_on?;
You can also run the TUI programmatically:
use PathBuf;
use RuntimeType;
use run_wrkflw_tui;
# block_on?;
Notes
- See the repository root README for feature details, limitations, and a full walkthrough.
- Service containers and advanced Actions features are best supported in Docker/Podman modes.
- Emulation mode skips containerized steps and runs commands on the host.