vibe-action 0.1.5

Command router — execute shell commands and LLM prompts via simple YAML actions.
name: translate-large
about: One step translation using large model
notify: true

args:
  - name: text
    short: 't'
    input: string
    default: '{system_clipboard}'
    help: Text to translate
  - name: file
    short: 'f'
    input: string
    default: ''
    help: File or URL to translate
  - name: to
    short: 'l'
    input: string
    default: 'Russian'
    help: Target language (e.g., Russian, English, Chinese)

# IDE plugin integration: maps argument names to IDE contexts
api:
  # Target for the final result (replace | clipboard | dialog)
  output: replace
  # Maps argument for JSON output (selection | clipboard)
  args:
    text: selection

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|load}"

  # Translate text using a large language model
  - tag: tag_translated
    run: large
    expect: string
    action: |
      [Task]
      Translate the entire [Text] to the language specified in [User].
      Do not translate proper names, code, or comments inside code blocks.
      Reply with the full raw translated text.

      [User]
      {to}

      [Text]
      {tag_content}

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