vibe-action 0.2.2

Command router — execute shell commands and LLM prompts via simple YAML actions.
version: 0.0.1

name: regex
about: Generate a regular expression pattern based on your description

args:
  - name: example
    short: 'e'
    input: string
    help: Optional example string to test the pattern against
    default: ''

# IDE plugin integration: maps argument names to IDE contexts
api:
  # Target for the final result (replace | clipboard | dialog)
  output: dialog
  # Source for the {query} tag
  input: query|prompt

actions:
  # LLM generates regex pattern, optionally testing against example
  - tag: tag_regex
    run: small
    expect: string
    action: |
      [Task]
      Generate a valid regular expression pattern based on the user's [Query].
      If an [Example] string is provided, ensure the generated regex matches it correctly.

      [Rules]
      1. Output ONLY the raw regex pattern.
      2. Do NOT wrap it in backticks, slashes (/ /), or markdown code blocks.
      3. Output exactly 1 line.

      [Query]
      {query|prompt}

      [Example]
      {example}

  # Copy result to clipboard and output
  - tag: tag_clipboard
    run: value
    expect: string
    action: '{tag_regex|clipboard}'