Skip to content

Releases: Ra77a3l3-jar/replaySh

v0.3.0

08 Jun 19:16

Choose a tag to compare

Changelog


[0.3.0] - 2026-06-08

Added

  • Rich Step data model — Step::Simple(String) and Step::Rich(RichStep) with desc, ignore_error, condition, env
  • replay step edit <name> <N> [cmd] — replace a step's command in-place
  • replay step desc <name> <N> [desc] — set, show, or clear a step's description
  • replay step condition <name> <N> [expr] — set, show, or clear a condition expression
  • replay step ignore-error <name> <N> — toggle per-step ignore_error flag
  • replay add --description <DESC> — set description when adding a step
  • replay add --ignore-error — mark the new step as error-tolerant
  • replay add --conditions <EXPR> — attach a condition expression to the new step
  • replay add --env KEY=VALUE — inject per-step environment variables
  • replay search <terms> — search across all workflow commands
  • replay info <name> — display full workflow metadata
  • Per-step env vars injected at runtime
  • Condition evaluation at runtime — non-zero exit skips the step with dimmed output
  • Per-step ignore_error checked alongside global --ignore-errors flag

Changed

  • record() wraps captured commands in Step::Simple for backward compat
  • record prompts on existing workflow — overwrite / append / cancel
  • record --filter gains e (edit command) and # (set description) keys
  • show() prints # desc dimmed, [ignore-error] yellow, [if: expr] cyan, [KEY=VAL] green
  • info() shows rich/simple breakdown with colored counts, conditions, ignore-error flags
  • list() has dynamic column width, run count column, colored time labels
  • export --format sh emits # desc comments and # [ignore-error] annotations
  • export --format sh uses the workflow's recorded shell for the shebang and file extension; errors if no shell is recorded
  • var accepts multiple KEY=VALUE assignments at once
  • Workflow name displayed in purple in show and info
  • Blue metadata accents in info (steps, runs, shell)
  • Colored KEY=VALUE in info vars section
  • Failed steps dump stdout and stderr to the terminal for debugging
  • Source code modularized into flat src/*.rs files

Fixed

  • --only no longer falls through to --from/--to loop (double-execution bug)
  • record append preserves existing variables and shell instead of resetting them
  • step condition|desc with whitespace-only input now clears instead of setting a literal space
  • --only properly handles per-step ignore_error (was silently passing failed steps)
  • record append no longer panics on double take() of existing workflow
  • Condition dry-run prints the raw template instead of crashing on undefined vars

[0.2.0] - 2026-05-08

Added

  • {{VAR}} substitution in steps — resolved at run time with --var KEY=VALUE
  • replay var <name> KEY=VALUE — set a workflow-level variable default; KEY alone unsets it
  • replay step remove <name> <N> — delete a step by index
  • replay step move <name> <from> <to> — reorder steps
  • replay step insert <name> <N> <cmd> — insert a step before position N
  • replay diff <name1> <name2> — side-by-side step comparison
  • replay export <name> --format sh — shell script export with ${VAR:-default} expansion
  • replay export <name> --format json — JSON export
  • replay import <file> — import a workflow from a JSON file
  • --ignore-errors flag on run — continue past step failures
  • --shell <SHELL> flag on record and run — override the shell used
  • Run count and last-run timestamp tracked in the workflow JSON
  • replay completions --install <SHELL> — install completions for bash, fish, or zsh; dynamic workflow name completion included
  • ~/.replay/config.toml — persistent configuration; replay --color <MODE> saves to it
  • -c / --color global flag — control color output (always, never)

Changed

  • replay list colors rows by recency — green (today), yellow (this week), dim (older/never)
  • replay show dims step indices and highlights {{VAR}} placeholders in yellow
  • replay run dims [N/M], prints on success and on failure
  • replay diff output colored — bold headers, red for removed, green for added
  • replay add prints created <name> when the workflow is new, added to <name> otherwise
  • Switched from raw ANSI codes to the colored crate throughout
  • Shell completion scripts extracted to completions/ and embedded at compile time via include_str!
  • Renamed crate to replaySh on crates.io; binary name stays replay

[0.1.0] - 2026-04-26

Added

  • replay record <name> — spawn a bash subshell and capture commands on exit
  • replay run <name> — replay steps one by one, stop on failure
  • replay list — list all saved workflows with step count
  • replay show <name> — print steps with indices
  • replay add <name> <cmd> — append a step without re-recording, no quotes needed
  • replay delete <name> — delete a workflow with a confirmation prompt
  • replay edit <name> — open workflow in $EDITOR, validates JSON on save
  • replay rename <old> <new> — rename a workflow
  • replay copy <src> <dst> — duplicate a workflow
  • --confirm flag on run — prompt y/n/s before each step (run / skip / stop)
  • --dry-run flag on run — print steps without executing anything
  • --only <N> flag on run — run a single step by index
  • --from <N> and --to <N> flags on run — run a slice of steps

Fixed

  • exit was being captured as a workflow step during record
  • Missing stdout flush caused --confirm prompt to appear after input
  • rename was checking the wrong path condition, blocking every rename attempt