Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Landing

<title>Vibe Action</title>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Vibe Action" />
<meta
  property="og:description"
  content="AI-native command router — YAML pipelines for shell and LLM automation"
/>

<link rel="icon" href="assets/images/favicon.png" />
Vibe
Action
v0.0.1
AI-native command router
Execute shell commands and LLM prompts via simple YAML actions. Just say what you want — it figures out the rest. Define workflows in YAML, connect steps via tags, run batch LLM across your cluster.
Get Started

# Quick Start

## 1. Install Ollama (or DeepSeek)

## 2. Install Vibe Action cargo install vibe-action

## 3. AI-powered commit vibe-action action commit -p .

## 4. Translate files vibe-action action translate -f README.md -l Russian

## 5. Extract errors from logs vibe-action action extract -f app.log -q ‘find all errors’

## 6. Direct prompt to cluster vibe-action prompt ‘Explain Rust lifetimes’

Introduction

Vibe Action is a command router that executes shell commands and LLM prompts via simple YAML pipelines. Just say what you want — it figures out the rest.

Why Vibe Action

  • One command = complex pipeline — chain shell scripts and LLM calls into a single action
  • 🔗 Tag system — connect steps via {tag} references with automatic dependency graph
  • 🤖 Batch LLM — parallel execution across all cluster nodes
  • Type-safe — validate outputs with types and regex
  • 🔐 Confirmations — ask before executing dangerous commands
  • 🎯 CLI-first — no browser, no context switching. Everything in the terminal
  • 🔒 Secure — runs locally on your hardware
  • 🆓 Free — open source, local models via Ollama. No subscriptions
  • 📦 Modular — share YAML files like Homebrew formulas
  • 🦀 Fast — built in Rust

Key Concepts

YAML Pipelines

Describe your workflow in YAML, not code:

name: extract
about: Extract matching lines from text and logs
check: null
clipboard: false
args:
  - name: file
    short: f
    expect: string
    help: Path to the log or text file
    default: null
  - name: query
    short: q
    expect: string
    help: Extraction criteria (e.g., 'find all errors')
    default: null
actions:
  - tag: tag_lines
    type: cmd
    expect: list<string>
    check: null
    confirm: false
    action: cat {file}
  - tag: tag_content
    type: llm
    expect: string
    check: null
    confirm: false
    action: |
      [Task]
      If the line matches the query — output the EXACT line unchanged.
      If it does not match — output only a single dash: "-"
      Do NOT skip lines. Process every line.

      [Query]
      {query}

      [Line]
      {tag_lines}
  - tag: tag_clean
    type: value
    expect: string
    check: null
    confirm: false
    action: '{tag_content|trim:-}'
  - tag: tag_extract
    type: value
    expect: string
    check: null
    confirm: false
    action: '{tag_clean|join:uniq}'

How It Works

  1. You write a YAML file describing your workflow — steps, types, dependencies
  2. The engine parses it and builds a dependency graph from {tag} references
  3. Steps execute in order — shell commands run locally, LLM prompts go to your cluster
  4. Results are validated against expected types and optional regex patterns
  5. Final output is displayed on screen and copied to clipboard if enabled

Getting Started

Prerequisites

  • Ollama (recommended), DeepSeek API key, or Qwen — for LLM inference
  • Rust (if building from source)

Install Ollama

# macOS / Linux
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model
ollama pull qwen2.5-coder:14b-instruct

Install Vibe Action

cargo install vibe-action

Build from source

git clone https://gitcode.com/keygenqt_vz/vibe-action.git
cd vibe-action
cargo build --release

First Run

On first run, Vibe Action creates the config and default actions:

$ vibe-action action --help

This creates:

  • ~/.vibe-action/config.yaml — cluster configuration
  • ~/.vibe-action/actions/ — 10 built-in actions

Configure Cluster

Edit ~/.vibe-action/config.yaml to point to your Ollama instance:

version: 0.0.1

cluster:
  - provider: ollama
    host: http://localhost:11434
    model: qwen2.5-coder:14b-instruct
    timeout_secs: 60
    temperature: 0.1
    seed: 42
    num_ctx: 4096
    num_predict: 2048
    parallel: 1

Run Your First Actions

# AI-powered commit
vibe-action action commit -p .

# Translate a file
vibe-action action translate -f README.md -l Russian

# Extract errors from logs
vibe-action action extract -f app.log -q "find all errors"

# Direct prompt to cluster
vibe-action prompt "Explain Rust lifetimes"

# See all available actions
vibe-action action --help

Debug Mode

Use --debug to see what’s happening under the hood:

vibe-action --debug action commit -p .

Shows each pipeline step: original command, resolved template, and result.

Next Steps

Action Structure

Each action is a YAML file in ~/.vibe-action/actions/. The engine loads all .yaml files recursively and builds a CLI command for each one.

Minimal Action

name: hello
about: Say hello
check: null
clipboard: false
args: []
actions:
  - tag: tag_hello
    type: value
    expect: string
    check: null
    confirm: false
    action: Hello, World!
$ vibe-action action hello
info: completed in 0.01s
── success ──
Hello, World!
─────────────

Full Structure

name: my-action # CLI subcommand name
about: Description # Help text
check: '^[a-z]+$' # Optional: regex validation for final output
clipboard: true # Optional: copy result to clipboard
args: # Optional: CLI arguments
  - name: input
    short: i
    expect: string
    help: Input text
    default: 'default' # Optional: makes argument non-required
actions: # Pipeline steps (executed in order of dependencies)
  - tag: tag_step1
    type: cmd # cmd | llm | value
    expect: string # void | bool | number | string | list<T>
    check: '^.+$' # Optional: regex validation for this step
    confirm: true # Optional: ask before executing
    action: echo "Hello {input}!"

Action Types

TypeDescription
cmdShell command executed in terminal
llmPrompt sent to LLM cluster
valueStatic string, no execution

Expect Types

TypeDescription
voidNo output
booltrue/false, yes/no, да/нет, 是/否
numberInteger or float
stringText (default)
list<string>List of strings, triggers loop

Execution Order

Actions are sorted by their {tag} dependencies, not by their order in the file. The engine builds a dependency graph and executes in topological order.

actions:
  - tag: tag_files # 1st — no dependencies
    type: cmd
    action: find . -name '*.rs'

  - tag: tag_summary # 2nd — depends on tag_files
    type: llm
    action: Summarize - {tag_files}

Check (Regex Validation)

check validates output against a regex pattern. If the output doesn’t match — the step fails with an error.

- tag: tag_files
  type: cmd
  check: '.+' # Must be non-empty
  action: git diff --name-only

Confirm

confirm: true asks the user for approval before executing. Useful for dangerous commands.

- tag: tag_commit
  type: cmd
  confirm: true
  action: git commit -m "feat: something"

Tag System

Tags connect pipeline steps. When you write {tag_name} in an action, the engine replaces it with the output of the step that has tag: tag_name.

Basic Example

actions:
  - tag: tag_files
    type: cmd
    expect: list<string>
    action: ls *.rs

  - tag: tag_summary
    type: llm
    expect: string
    action: Summarize these files - {tag_files|join}

Step tag_summary depends on tag_files. The engine runs tag_files first, then passes its output to tag_summary. The |join modifier collapses the list<string> result into a single string — without it, tag_summary would execute once for each file in the list.

Automatic Dependency Ordering

You don’t need to write steps in execution order. The engine:

  1. Scans all actions for {tag} references
  2. Builds a directed acyclic graph (DAG)
  3. Sorts topologically using Kahn’s algorithm
  4. Detects circular dependencies and reports errors
actions:
  # These can be in any order — the engine sorts them:
  - tag: tag_commit
    type: cmd
    action: git commit -m '{tag_message}'

  - tag: tag_files
    type: cmd
    action: git diff --name-only

  - tag: tag_message
    type: llm
    action: Write a commit message for: {tag_files}

Execution order: tag_filestag_messagetag_commit

List Expansion

When a step expects list<string> and receives a list from a tag, the engine runs the action for each element:

actions:
  - tag: tag_files
    type: cmd
    expect: list<string>
    action: git diff --name-only
    # Returns: ["main.rs", "lib.rs"]

  - tag: tag_diff
    type: cmd
    expect: list<string>
    action: git diff {tag_files}
    # Runs twice: git diff main.rs, git diff lib.rs
    # Returns: ["diff for main", "diff for lib"]

Multiple Dependencies

A step can reference multiple tags:

- tag: tag_report
  type: llm
  expect: string
  action: |
    Compare these two files:
    File A: {tag_file_a}
    File B: {tag_file_b}

The engine waits for both tag_file_a and tag_file_b before running tag_report.

Circular Dependencies

Circular references are detected at startup and reported as errors:

# ❌ This will fail validation:
- tag: tag_a
  action: echo {tag_b}
- tag: tag_b
  action: echo {tag_a}
Error: Circular dependency detected involving tag: 'tag_a'

Modifiers

Modifiers transform tag values inline using the pipe syntax: {tag|modifier}. Some modifiers accept arguments: {tag|modifier:argument}.

join

Collapses a list into a single string with newline separator.

SyntaxDescription
{tag|join}Join list elements with \n
{tag|join:uniq}Join with \n, remove duplicates
Input{tag|join}{tag|join:uniq}
["a", "b"]"a\nb""a\nb"
["a", "b", "a"]"a\nb\na""a\nb"

trim

Strips characters from ends of strings, or filters list elements.

SyntaxDescription
{tag|trim}Strip whitespace from ends of string, empty list elements
{tag|trim:<>}Strip <> and whitespace from ends of string, list elements equal to <>
Input{tag|trim}{tag|trim:<>}
" hello ""hello""hello"
"<path>""<path>""path"
"<->""<->""-"
["", "a", ""]["a"]["a"]

upper

Transforms text to UPPERCASE.

InputOutput
"hello""HELLO"

lower

Transforms text to lowercase.

InputOutput
"HELLO""hello"

Chaining

Modifiers are applied once per tag reference. For multiple transformations, chain through separate steps:

- tag: tag_cleaned
  type: value
  action: '{tag_raw|trim:<>}'

- tag: tag_final
  type: value
  action: '{tag_cleaned|join:uniq}'

Built-in Actions

Vibe Action ships with 10 ready-to-use actions. They are written to ~/.vibe-action/actions/ on first run and can be customized.

commit

AI-generated git commit message with conventional commit format.

vibe-action action commit                # current directory
vibe-action action commit -p ./src       # specific path

How it works: gets changed files → diffs each file → LLM summarizes → combines into one commit message → commits (with confirmation).

extract

Extract matching lines from log files or text using semantic search.

vibe-action action extract -f app.log -q "find all errors"
vibe-action action extract -f app.log -q "покажи проблемы с безопасностью"

How it works: reads file line by line → LLM filters matching lines → returns only relevant entries.

find

Semantic file finder — finds files by meaning, not just by name.

vibe-action action find -q "где авторизация?"
vibe-action action find -p ./src/engine -q "topological sort"

How it works: lists all text files → reads content → LLM checks each file against the query → returns matching file paths.

mock

Generate realistic mock data in any format.

vibe-action action mock -f json -q "5 users with id, name, email"
vibe-action action mock -f yaml -q "3 products with price and color"
vibe-action action mock -f csv -q "10 transactions with date and amount"

How it works: sends description to LLM → returns structured data in requested format.

naming

Generate code naming suggestions based on a description.

vibe-action action naming -q "функция сортировки данных для Rust"
vibe-action action naming -q "boolean variable that checks if token exists"

How it works: LLM generates 5-10 naming options in snake_case or camelCase based on context.

regex

Generate regular expression patterns.

vibe-action action regex -q "IPv4 address" -e "192.168.1.1"
vibe-action action regex -q "extract Bearer token from HTTP header"
vibe-action action regex -q "регулярка для валидации email"

How it works: LLM generates a regex pattern. Optional example string for validation.

spellcheck

Check and fix spelling in text or files.

vibe-action action spellcheck -f README.md
vibe-action action spellcheck -t "Helo, wrld!"

How it works: reads text → detects errors → LLM fixes and returns corrected text.

synonyms

Find programming/technical synonyms for a word.

vibe-action action synonyms -q "middleware"
vibe-action action synonyms -q "event emitter"

How it works: LLM returns 5-10 technical alternatives in English.

tone

Rewrite text with professional, calm tone. Supports Russian, English, Chinese.

vibe-action action tone -q "Какого хрена ты до сих пор не на работе?"
vibe-action action tone -q "How fucking long do I have to wait?"
vibe-action action tone -q "你写代码写得像个该死的老外!"

How it works: LLM rewrites text preserving meaning but removing aggression and rudeness.

translate

Translate text or files to another language.

vibe-action action translate -f README.md -l Russian
vibe-action action translate -t "Hello world" -l Chinese

How it works: reads text → LLM translates to target language → preserves formatting and code blocks.

Custom Actions

Create your own actions by adding .yaml files to ~/.vibe-action/actions/. Any subdirectory works — the engine loads all files recursively.

Hello World

# ~/.vibe-action/actions/hello.yaml
name: hello
about: Say hello
check: null
clipboard: false
args: []
actions:
  - tag: tag_hello
    type: value
    expect: string
    check: null
    confirm: false
    action: Hello, World!
$ vibe-action action hello
progress: hello (val)... 100% (1/1)
info: completed in 8.58ms
── success ──
Hello, World!
───────────────

Shell Command

# ~/.vibe-action/actions/disk.yaml
name: disk
about: Show disk usage
check: null
clipboard: false
args: []
actions:
  - tag: tag_disk
    type: cmd
    expect: string
    check: null
    confirm: false
    action: df -h /
$ vibe-action action disk
progress: disk (cmd)... 100% (1/1)
info: completed in 21.13ms
── success ───────────────────────────────────────────────────────────────────
Filesystem        Size    Used   Avail Capacity iused ifree %iused  Mounted on
/dev/disk3s1s1   460Gi    12Gi    72Gi    14%    455k  760M    0%   /
──────────────────────────────────────────────────────────────────────────────

With Arguments

# ~/.vibe-action/actions/greet.yaml
name: greet
about: Greet someone
check: null
clipboard: false
args:
  - name: name
    short: n
    expect: string
    help: Name to greet
    default: World
actions:
  - tag: tag_greeting
    type: value
    expect: string
    check: null
    confirm: false
    action: Hello, {name}!
$ vibe-action action greet -n Alice
progress: greeting (val)... 100% (1/1)
info: completed in 8.45ms
── success ──
Hello, Alice!
─────────────

LLM Call

# ~/.vibe-action/actions/explain.yaml
name: explain
about: Explain a concept
check: null
clipboard: false
args:
  - name: query
    short: q
    expect: string
    help: What to explain
actions:
  - tag: tag_answer
    type: llm
    expect: string
    check: null
    confirm: false
    action: |
      Explain this concept in simple terms. Keep it under 3 sentences.
      {query}
$ vibe-action action explain -q "Rust borrow checker"
progress: answer (llm)... 100% (1/1)
info: completed in 6.63s
── success ──────────────────────────────────────────────────────────────────────────────────────────────────────────
The Rust borrow checker is a part of the Rust programming language that ensures memory safety and prevents common
programming errors like null pointer dereferencing or data races. It works by analyzing how variables are borrowed
(accessed) and mutably borrowed (modified) throughout your code, ensuring that these accesses are always valid and do
not conflict with each other. This allows Rust to avoid the need for a garbage collector while still providing safety
guarantees similar to those found in languages with automatic memory management.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Multi-Step Pipeline

# ~/.vibe-action/actions/summarize-file.yaml
name: summarize-file
about: Read a file and summarize it
check: null
clipboard: false
args:
  - name: file
    short: f
    expect: string
    help: File to summarize
actions:
  - tag: tag_content
    type: cmd
    expect: string
    check: null
    confirm: false
    action: cat {file}

  - tag: tag_summary
    type: llm
    expect: string
    check: null
    confirm: false
    action: |
      Summarize this file in 2-3 sentences:
      {tag_content}
$ vibe-action action summarize-file -f README.md
progress: summary (llm)... 100% (2/2)
info: completed in 7.74s
── success ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
Vibe Action is a command router that simplifies the execution of shell commands and large language model prompts using
YAML pipelines. It allows developers to describe their workflows declaratively in YAML, automatically handling execution
order, running shell commands, calling LLMs, validating results, and providing answers, making repetitive tasks like
committing code, translating files, and extracting errors from logs more efficient and less error-prone.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Tips

  • Tag naming: use tag_ prefix for consistency with built-in actions
  • Dependencies: the engine sorts steps by {tag} references, not YAML order
  • Validation: add check: ".+" to ensure non-empty output
  • Debugging: use --debug to see each step’s input and output

Configuration

Vibe Action uses a single YAML config file at ~/.vibe-action/config.yaml. It is created automatically on first run.

Cluster

Define one or more LLM providers. The engine sends prompts to all nodes in parallel.

version: 0.0.1

cluster:
  - provider: ollama
    host: http://localhost:11434
    model: qwen2.5-coder:14b-instruct
    timeout_secs: 60
    temperature: 0.1
    seed: 42
    num_ctx: 4096
    num_predict: 2048
    parallel: 1

Cluster Node Fields

FieldTypeDescription
providerstringollama, deepseek, qwen
hoststringAPI endpoint URL
modelstringModel name
timeout_secsintegerRequest timeout in seconds
temperaturefloat0.0-2.0, lower = more deterministic
seedintegerRandom seed for reproducibility
num_ctxintegerContext window size in tokens
num_predictintegerMax tokens to generate
api_keystringAPI key for cloud providers (optional)
parallelintegerConcurrent connections (default: 1)

Multi-Node Cluster

cluster:
  - provider: ollama
    host: http://localhost:11434
    model: qwen2.5-coder:3b-instruct
    timeout_secs: 30
    temperature: 0.0
    seed: 42
    num_ctx: 4096
    num_predict: 512
    parallel: 2

  - provider: ollama
    host: http://192.168.1.10:11434
    model: qwen2.5-coder:14b-instruct
    timeout_secs: 60
    temperature: 0.1
    seed: 42
    num_ctx: 8192
    num_predict: 2048
    parallel: 1

  - provider: deepseek
    host: https://api.deepseek.com/v1
    model: deepseek-v4-flash
    timeout_secs: 120
    temperature: 0.1
    seed: 42
    num_ctx: 16384
    num_predict: 8192
    api_key: sk-...
    parallel: 2

All nodes receive prompts in parallel.

Actions Directory

Actions are stored in ~/.vibe-action/actions/. The directory is created on first run with default actions.

~/.vibe-action/
├── config.yaml
└── actions/
    ├── commit.yaml
    ├── extract.yaml
    ├── find.yaml
    ├── mock.yaml
    ├── naming.yaml
    ├── regex.yaml
    ├── spellcheck.yaml
    ├── synonyms.yaml
    ├── tone.yaml
    └── translate.yaml

Add your own .yaml files here — they will be loaded automatically.

CLI Reference

Global Flags

FlagDescription
--config <path>Path to config file (default: ~/.vibe-action/config.yaml)
--debugEnable verbose logging output

Commands

action

Execute a YAML-defined action.

vibe-action action <name> [args...]
vibe-action action commit -p .
vibe-action action translate -f README.md -l Russian
vibe-action action --help

prompt

Send a direct prompt to the LLM cluster, bypassing YAML actions.

vibe-action prompt <text...>
vibe-action prompt "Explain Rust lifetimes"
vibe-action prompt "Напиши функцию сортировки на Python"

Action Arguments

Each action defines its own arguments in YAML. Use --help to see available options:

vibe-action action commit --help
vibe-action action extract --help

Exit Codes

CodeDescription
0Success
1Error (validation failed, shell command failed, LLM error)

Debug Mode

Use --debug for detailed logs of each pipeline step:

vibe-action --debug action commit -p .

Shows:

  • Original and resolved action text
  • Shell command output
  • LLM prompts and responses