Modules
Modules are the units of work in glidesh. Each module follows a two-phase check/apply pattern for idempotency.
How Modules Work
Section titled “How Modules Work”Every module implements two operations:
-
check — inspects the current state of the target and returns one of:
Satisfied— the desired state already matches, no action neededPending— changes are requiredUnknown— state cannot be determined
-
apply — performs the actual change on the target
With --dry-run, check decides the outcome: a task is reported as would change when its check returns Pending, and the plan that check produced is the reason shown against it. apply is still invoked, but it is told the run is a preview and only describes the command it would have run, so nothing on the target is modified.
A task in a step triggered by subscribe is no exception: its check is told the step was triggered, and returns Pending when the module would redo its work — a restart, a recreate, a rerun — so a preview counts exactly what the real run does.
Parameters
Section titled “Parameters”A built-in module accepts only the parameters its page lists. Any other — a typo such as
mdoe=, or a parameter from another tool — is an error that
glidesh validate reports, and that run reports before it
connects, rather than being ignored. External modules receive every
parameter as written.
Idempotency
Section titled “Idempotency”Because modules check before acting, plans are safe to run repeatedly. If a package is already installed, the package module reports Satisfied and skips it. If a service is already running, systemd reports Satisfied. Only the delta is applied. Idempotency & Drift lists what each module compares, and how to preview a run with --dry-run and --diff.
Available Modules
Section titled “Available Modules”Built-in
Section titled “Built-in”| Module | Description |
|---|---|
| shell | Run arbitrary shell commands |
| host | Run once on the controller (or a chosen host) and share the result with every target |
| package | Install or remove system packages |
| user | Manage system users and groups |
| systemd | Control systemd services |
| container | Manage containers (Docker/Podman) |
| file | Transfer files, templates, and fetch |
| disk | Format and mount block devices |
| nix | Cross-distro Nix packages and environments |
External
Section titled “External”Community and custom modules can extend glidesh via the external module plugin system. External modules are standalone executables that communicate over a JSON-over-stdio protocol. They use the external keyword in plans:
step "Configure nginx" { external "acme/nginx-vhost" "mysite" server_name="example.com"}See Writing Plugins for how to build your own.

