Skip to content

EnsuraScriptProgramming by guarantees, not instructions

An intent-first, truth maintenance language for declaring and enforcing system guarantees

The Problem

Infrastructure drifts. Configuration files change. Permissions get modified. Security policies break. Traditional automation runs once and forgets. You're left manually checking, fixing, and re-running scripts.

There's a better way.

Declare Guarantees, Not Steps

ens
# Traditional approach: imperative, fragile, runs once
# touch secrets.db
# chmod 0600 secrets.db
# encrypt secrets.db --key=$SECRET_KEY

# EnsuraScript: declarative, self-healing, continuous
on file "secrets.db" {
  ensure exists
  ensure encrypted with AES:256 key "env:SECRET_KEY"
  ensure permissions with posix mode "0600"
}

on violation {
  retry 2
  notify "ops"
}

What happens?

  • File doesn't exist → Created automatically
  • Wrong permissions → Fixed immediately
  • Encryption removed → Re-encrypted
  • Continuous enforcement → Violations detected and repaired in real-time

Stop Babysitting Your Infrastructure

bash
# Run once, enforce forever
ensura run config.ens

# See exactly what will happen before it does
ensura plan config.ens

# Validate your configuration
ensura compile config.ens

# Check without enforcing (dry run)
ensura check config.ens

Truth Maintenance, Not Task Automation

Traditional scripts tell the computer how to do something. EnsuraScript tells it what must be true. The runtime maintains those truths automatically, forever.

Released under the MIT License.