
Sadame¶
Sadame describes the desired state of Linux machines in plain Ruby, shows every change as a diff before it happens, and applies it over SSH from a single binary.

A run as text
backup_hour changed from 3 to 4 in hosts.rb; the db group gets
the change, and drift confirms the server matches:
$ sadame plan site.rb -g db
[db1.example.com] ~ file[/etc/cron.d/demo-db-backup]
[db1.example.com] --- /etc/cron.d/demo-db-backup
[db1.example.com] +++ /etc/cron.d/demo-db-backup (desired)
[db1.example.com] @@ -1 +1 @@
[db1.example.com] -0 3 * * * demo-db sqlite3 /var/lib/demo-db/app.db .dump > /var/lib/demo-db/backup.sql
[db1.example.com] +0 4 * * * demo-db sqlite3 /var/lib/demo-db/app.db .dump > /var/lib/demo-db/backup.sql
[db1.example.com] Plan: 0 to create, 1 to update, 0 to remove, 0 to run, 5 unchanged.
$ sadame apply site.rb -g db
[db1.example.com] changed file[/etc/cron.d/demo-db-backup]
apply on 1 host: 1 ok. Finished in 0.21s.
$ sadame drift site.rb -g db
[db1.example.com] No drift: 6 resources match the recipe.
drift on 1 host: 1 ok. Finished in 0.21s.
$ echo $?
0
The recipe and inventory are
examples/08-multi-role-inventory. The server
runs no agent: on the first run, sadame copied itself there over SSH.
Why sadame¶
-
Plain Ruby
Recipes and the inventory are Ruby: loops, conditions and methods instead of YAML and templating rules. No Ruby to install; it is built in.
-
A diff before every change
planshows what would change, line by line, and changes nothing.applychanges only what differs. -
No agent on the servers
SSH, a shell,
tarandsha256sumare enough: sadame copies itself to each server for the run, and nothing keeps running afterwards. -
One small binary
About 1.5 MB, for Linux (x86_64, ARM64) and macOS. Nothing else to install, on your machine or on the servers.
-
Drift checks for CI
driftexits with status 1 when a machine no longer matches its recipe. Run it on a schedule and hear about hand edits. -
Tested on real systems
On every push, CI runs the examples in containers of Ubuntu, Debian, Rocky Linux, Alpine and Arch, on x86_64 and ARM64.
Where to start¶
-
New to configuration management
A free book, from a first recipe to a whole fleet, with a practice lab to follow along. Online, as a PDF and as an EPUB.
-
Users
Run sadame on servers and workstations: install it, apply a first recipe, check for drift.
-
Recipe authors
Write recipes and inventories for a team: resources, vars, templates, notifications,
hosts.rb. -
Contributors
Change sadame itself: architecture, the mruby build, the three test layers.
Install¶
curl -fsSL https://raw.githubusercontent.com/enderkus/sadame/main/install.sh | sh
The script downloads the binary for your system from the latest release,
checks its SHA-256 checksum and installs it to /usr/local/bin. Linux
(x86_64, ARM64) and macOS; Homebrew and other ways in Install.
How it compares¶
Recipes in Ruby like Itamae, push over SSH without an agent like Ansible,
one binary like mitamae, and a drift command for CI. Ten resource types
and Linux targets only, for now: the comparison lists
what the others do that sadame does not.
Follow the project¶
Sadame is young, and a star on GitHub helps other people find it. News and releases are posted on X as @sadame_rb; bugs and ideas go to GitHub issues.