vibe-action 0.0.4

Command router — execute shell commands and LLM prompts via simple YAML actions.
name: spellcheck
about: Check and fix spelling in text or files
clipboard: true
notify: true
args:
  - name: text
    short: 't'
    expect: string
    help: Text to check
    default: '{system_clipboard}'
  - name: file
    short: 'f'
    expect: string
    help: File to check
    default: ''
actions:
  # Read input from file or text argument
  - tag: tag_content
    run: cmd
    expect: string
    check: .+
    action:
      - when: '{file|empty}'
        then: echo "{text}"
      - when: '{file|empty:not}'
        then: cat "{file|resolve}"
  # LLM checks if text contains any errors
  - tag: tag_check_errors
    run: llm_small
    expect: string
    action: |
      [Task]
      Analyze the text below for typos, spelling mistakes, and grammar errors.
      If errors exist, reply strictly with "DIRTY". If no errors exist, reply strictly with "CLEAR"

      [Text]
      {tag_content}
  # If errors found, pass text through; otherwise return "No errors found."
  - tag: tag_check_errors_filter
    run: cmd
    expect: string
    action:
      - when: '{tag_check_errors|contains:DIRTY}'
        then: echo "{tag_content}"
      - when: '{tag_check_errors|contains:CLEAR}'
        then: echo "No errors found."
  # LLM fixes all errors while preserving formatting
  - tag: tag_checked
    run: llm_small
    expect: string
    action: |
      [Task]
      Fix all spelling mistakes, typos, and grammar errors in the text below.
      Strict rules: Preserve all code syntax, markdown tags, and formatting exactly as-is.

      [Text]
      {tag_check_errors_filter}