From 11e87762241ac5125180801f5e5ef67b79216c03 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Sat, 10 Jan 2026 15:41:59 +1100 Subject: [PATCH] Document enroll 'validate' --- src/content/_index.html | 20 ++++++++++++++++++++ src/content/docs.html | 1 + src/content/examples.html | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/content/_index.html b/src/content/_index.html index e19afab..a8590e0 100644 --- a/src/content/_index.html +++ b/src/content/_index.html @@ -88,6 +88,13 @@ og_type: "website"
Analyze what's included/excluded in the harvest and why.
+
+
+
+
Validate
+
Confirm that a harvest isn't corrupt or lacking artifacts.
+
+
@@ -155,6 +162,7 @@ og_type: "website" +
@@ -249,6 +257,18 @@ enroll explain /path/to/harvest.sops \
'explain' tells you why something was included, but also why something was excluded.
+
+
+ +
# Validate a harvest is correct.
+enroll validate /path/to/harvest
+
+# Check against the latest published version of the state schema specification
+enroll validate /path/to/harvest --schema https://enroll.sh/schema/state.schema.json
+
+
+
'validate' makes sure the harvest's state confirms to Enroll's state schema, doesn't contain orphaned artifacts and isn't missing any artifacts needed by the state. By default, it checks against the schema packaged with Enroll, but you can also check against the latest version on this site.
+
diff --git a/src/content/docs.html b/src/content/docs.html index 44ff065..3d3cf51 100644 --- a/src/content/docs.html +++ b/src/content/docs.html @@ -124,6 +124,7 @@ description: "How Enroll works: harvest, manifest, modes, and configuration."

State schema

Enroll writes a state.json file describing what was harvested. The canonical definition of that file format is the JSON Schema below.

+

You can also validate a harvest state file against the schema by using enroll validate /path/to/harvest.

diff --git a/src/content/examples.html b/src/content/examples.html index 911423c..464eb1e 100644 --- a/src/content/examples.html +++ b/src/content/examples.html @@ -68,7 +68,7 @@ description: "Copy/paste recipes for Enroll: one host, fleets, drift detection,
Drift detection with enroll diff
-
$ enroll diff --old /path/to/harvestA   --new /path/to/harvestB   --format markdown   --exclude-path /var/anacron   --ignore-package-versions
+            
$ enroll diff --old /path/to/harvestA --new /path/to/harvestB --format markdown --exclude-path /var/anacron --ignore-package-versions
 $ enroll diff --old /path/to/golden --new /path/to/current \
   --webhook https://example.net/webhook  \
   --webhook-format json \