Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vayu

Vayu — AI-powered coding assistant for the terminal. Built in Rust.

Features

  • Multi-provider: Anthropic (Claude), OpenAI, Azure, Ollama, MLX (Apple Silicon)
  • Interactive TUI: Rich terminal UI with markdown rendering, tables, code blocks
  • Tool calling: bash, read_file, write_file, edit_file, glob, grep
  • Inline diffs: File edits show colored diff snippets with context
  • Conversation history: JSONL storage with SQLite index, resume/continue sessions
  • Image support: /image <path>, Ctrl+V clipboard paste, drag-and-drop
  • Streaming: Live token streaming in both TUI and exec modes
  • Mouse scroll + copy: Scroll wheel works alongside native text selection
  • Tool approval: Per-call approval, approve-all ([a]), or --yolo mode
  • Context tracking: Live context size and peak usage in status bar

Install

Prerequisites

  • macOS (primary target)
  • Rust (stable, edition 2024)
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

Download prebuilt binary (no Rust needed)

Download the latest release for your platform from GitHub Releases:

# macOS Apple Silicon (M1/M2/M3/M4)
curl -L https://github.com/Sravani2201/Vayu/releases/latest/download/vayu-aarch64-apple-darwin.tar.gz | tar xz
sudo mv vayu /usr/local/bin/

# macOS Intel
curl -L https://github.com/Sravani2201/Vayu/releases/latest/download/vayu-x86_64-apple-darwin.tar.gz | tar xz
sudo mv vayu /usr/local/bin/

# Linux x86_64
curl -L https://github.com/Sravani2201/Vayu/releases/latest/download/vayu-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv vayu /usr/local/bin/

Install from source (requires Rust)

git clone https://github.com/Sravani2201/Vayu.git
cd Vayu
cargo install --path crates/vayu-cli

Install from GitHub directly

cargo install --git https://github.com/Sravani2201/Vayu.git vayu-cli

Build without installing

cargo build --release
./target/release/vayu --help

Quick Start

# Interactive TUI (current directory as workspace)
vayu

# One-shot prompt
vayu "explain this code"

# Auto-approve all tools
vayu --yolo

# Continue last conversation
vayu --continue    # or vayu -c

# Pick a past conversation
vayu --resume      # or vayu -r

# Verbose logging (writes to ~/.vayu/logs/)
vayu -v

Usage

CLI Flags

Flag Short Description
--continue -c Resume the most recent conversation
--resume -r Pick a past conversation interactively
--session <ID> Resume a specific session by UUID
--yolo Auto-approve all tool calls
--model <M> -m Override model (e.g. ollama:llama3.2:8b)
--autonomy <A> -a Override autonomy: ask, auto-read, auto-all
--verbose -v Debug logging to ~/.vayu/logs/
--format <F> Output format: human (default), json

Subcommands

vayu exec "prompt"          # One-shot execution
vayu history [--limit N]    # List past conversations
vayu config                 # Print resolved configuration
vayu version                # Show version info

TUI Keyboard Shortcuts

Key Action
Enter Send message
Shift+Enter Newline
Ctrl+C Quit / Cancel
Ctrl+L Clear screen
Ctrl+U / Ctrl+K Kill line
PgUp / PgDn Scroll chat
Up / Down Scroll (empty input) or history (with text)
Ctrl+V Paste image from clipboard
Ctrl+O Expand/collapse tool output

TUI Slash Commands

Command Description
/help Show help
/clear Clear conversation
/cost Show token usage and context size
/history List past conversations
/image <path> Attach an image
/model <name> Switch model
/quit Exit

Tool Approval

When a tool needs approval, you'll see:

  • [y] — approve this call
  • [a] — approve all for the rest of the session
  • [n] — deny

Or start with vayu --yolo to skip all prompts.

Configuration

Config files are loaded in order (later overrides earlier):

  1. Built-in defaults
  2. ~/.vayu/config.toml (user-level)
  3. .vayu/config.toml (project-level)
  4. Environment variables (VAYU_MODEL, VAYU_AUTONOMY)
  5. CLI flags

Example: Anthropic

[model]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
max_tokens = 16384

[providers.anthropic]
api_key = "sk-..."  # or set ANTHROPIC_API_KEY

Example: Azure OpenAI

[model]
provider = "azure"
model = "gpt-4o"
max_tokens = 32768

[providers.azure]
chat_url = "https://your-resource.openai.azure.com/openai/v1/chat/completions"
deployment = "gpt-4o"
api_key = "..."  # or set AZURE_OPENAI_API_KEY

Example: MLX (Apple Silicon local)

[model]
provider = "mlx"
model = "mlx-community/Qwen3.5-9B-MLX-4bit"
max_tokens = 32768

[providers.mlx]
auto_start = true
default_model = "mlx-community/Qwen3.5-9B-MLX-4bit"
server_command = "mlx_vlm.server"
python_path = "/path/to/venv/bin/python3"
port = 8080

Example: Ollama

[model]
provider = "ollama"
model = "llama3.2:8b"

[providers.ollama]
base_url = "http://localhost:11434"
default_model = "llama3.2:8b"
auto_pull = false

Tool Configuration

[tools]
autonomy = "ask"  # ask | auto-read | auto-all
shell_auto_approve = ["git status", "git diff", "ls"]
file_edit_auto_approve = false

Data Storage

Path Purpose
~/.vayu/config.toml User configuration
~/.vayu/sessions/*.jsonl Conversation data (JSONL, source of truth)
~/.vayu/index.db SQLite index for listing/search
~/.vayu/logs/vayu-*.log Verbose debug logs (one per session)

Architecture

Vayu is a Rust workspace with these crates:

Crate Purpose
vayu-cli CLI entry point, argument parsing
vayu-tui Terminal UI (ratatui), markdown rendering
vayu-exec Headless/non-interactive runner
vayu-core Agent loop, session management, events
vayu-provider LLM providers (Anthropic, OpenAI, Azure, MLX, Ollama)
vayu-tools Built-in tools (bash, file ops, glob, grep)
vayu-context Conversation history, JSONL+SQLite store
vayu-config Configuration loading and merging
vayu-sandbox Tool approval policies
vayu-mcp Model Context Protocol support

Development

cargo test          # Run all tests
cargo build         # Debug build
cargo build --release  # Optimized build

License

MIT

About

Vayu

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages