vibe-action 0.2.2

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

name: extract
about: Extract structured data or matching lines from text and logs
clipboard: false

args:
  - name: file
    short: 'f'
    input: string
    help: Path or URL to the log or text file

api:
  output: dialog
  input: query|prompt
  args:
    file: query|file_path

actions:
  # Read the file line by line
  - tag: tag_lines
    run: cmd
    expect: list
    action: echo {file|load|text}

  # LLM checks each line against the query, outputs matching lines or "-"
  - tag: tag_content
    run: small
    expect: string
    action: |
      [Task]
      Read the log line and the search query.
      If the line matches the query — output the EXACT line character-for-character, preserving original casing.
      If the line does not match — output only a single dash: "-"
      Do NOT skip lines. Process every line.
      Do NOT modify, normalize, or reformat the line in any way.

      [Query]
      {query|prompt}

      [Line]
      {tag_lines}

  # Remove lines that became empty after filtering
  - tag: tag_clean
    run: value
    expect: string
    action: '{tag_content|trim:-}'

  # Join remaining lines, remove duplicates
  - tag: tag_extract
    run: value
    expect: string
    action: '{tag_clean|uniq|join}'