# enstate State next to the Nix store: keys, passwords, and public data about other hosts, which move forward only and change without deploying a system. A system declares what state it can consume; a receptor on the host accepts a snapshot that fits, puts it in place and reloads what uses it, or rejects it. The design is in [docs/design.md](docs/design.md); [docs/migrations.md](docs/migrations.md) walks through its migration model. ## What there is `enstate`, one program for the receptor and the provider: - `--plan PATH`, `--apply PATH`: what the submission in PATH would do, and doing it: complete and partial submissions, items required and optional, groups, removal, the chain as order, validators (a type's and across slots), views and their reactions; - `--stage PATH`: a submission for the generation of `--schema`, before switching to it (a host's first one, too): the snapshot only, no views, no reactions; - `--migrate [--dry-run]`: serving a generation from snapshots accepted under another schema (same names, `renamedFrom` both ways, kept entries), refusing where a required slot can't be filled; - `--status`, `--materialize`: the snapshots, and putting every view in place from them; - `--pack PATH --out DIR`: a submission from a source list, JSON or TOML. Settings come from `/etc/enstate/config.json` if it exists, then `--config` files, then arguments. The NixOS module is [nix/module.nix](nix/module.nix); [default.nix](default.nix) has the package and the module's VM test (`nix-build -A tests.vm`). Not yet: converters, derived slots and steps; shell completion, a sandbox for programs. ```sh cargo build cargo test enstate --help ```