verg
Desired-state infrastructure convergence engine. A fast, stateless alternative to Ansible, built in Rust.
Pre-1.0: verg is under active development. Expect breaking changes between minor versions.
Features
- Fast — pushes a single static binary to targets over SSH, executes locally. No Python, no per-task SSH round-trips.
- Predictable — stateless convergence. Every run checks reality and converges. No state files.
- Simple — TOML declarations with Jinja2 templating where needed. No variable precedence maze.
- Agent-friendly —
--jsonoutput,schemacommand, structured exit codes. Built for both humans and AI agents.
Quick Start
# Install
# Initialize a project
# Edit hosts and state
# Preview changes
# Apply
How It Works
- Declare desired state in TOML files under
verg/state/ - Define hosts in
verg/hosts.tomlwith group assignments - Run
verg apply— the tool pushes a binary to each target over SSH, which checks current state and converges
Resource Types
| Type | Description |
|---|---|
pkg |
System packages (apt, dnf, pacman — auto-detected) |
file |
Files and directories (content, permissions, ownership) |
service |
Systemd services (running/stopped, enabled/disabled) |
cmd |
Run a command (requires idempotency guard) |
user |
System users (create/remove) |
Example
# verg/hosts.toml
[]
= "192.168.1.10"
= "root"
= ["web"]
# verg/state/web.toml
= ["web"]
[]
= "nginx"
= "present"
[]
= "/etc/nginx/nginx.conf"
= "server { listen {{ http_port }}; }"
= ["pkg.nginx"]
[]
= "nginx"
= "running"
= true
= ["file.nginx-conf"]
Commands
| Command | Description |
|---|---|
verg apply -t <targets> |
Converge targets to desired state |
verg diff -t <targets> |
Show what would change (dry-run) |
verg check -t <targets> |
Verify targets match desired state |
verg schema |
Print resource type schemas as JSON |
verg init |
Scaffold a new project |
verg completions <shell> |
Generate shell completions |
License
MIT