pub const USAGE: &str = "demesne — RLS-compiled ReBAC authorization, point it at your database.
USAGE:
demesne validate <spec.demesne>... parse + validate a spec
demesne emit <spec.demesne>... [kind] print generated SQL
kind: rls|definers|enablement|triggers|pdp|all (default all)
manifest: JSON record of every object the SQL creates
migrate <manifest.json>: all, then exact drops of what that
manifest's surface had and this spec no longer emits
--file <spec.demesne>: one file's share of a spec in several
files (kind all, manifest or migrate)
--target ts: emit TypeScript (@foir/demesne)
kind: claims|pdp|projections|framework|all
--target go: emit Go (github.com/foir-io/demesne/go)
kind [pkg]: claims|pdp|projections|framework|all,
in package pkg (default authz)
--profile supabase: emit the Supabase
deployment profile (access-token hook)
demesne introspect <dsn> summarise the live schema (tables/columns/FKs)
demesne scaffold [-i] <dsn> generate a STARTER spec from the schema (-i: interactive)
demesne check <spec.demesne> <dsn> validate the spec, bind it to the live schema, check the RLS role,
and look for schema traps (owner-rights views, NULL-blind unique
scope indexes, policy comparisons that can't use an index)
demesne diff <spec.demesne> <dsn> [--exit-code] [--allow <file>]
generated-vs-live drift, both ways: policies, definers, triggers
and orphans; --exit-code fails (exit 1) on any drift (CI guard);
--allow lists orphans to leave unreported, one per line
demesne coverage <spec.demesne> <dsn> [--exit-code] ungoverned tables (no object → no RLS); --exit-code fails (exit 1) if any (CI guard)
demesne version print the build version
<spec.demesne>... is a spec in one file, or in several, given in order: each file may refer to what the
files before it declare, and may `replace` a declaration of theirs.
<dsn> may be omitted to use $DATABASE_URL. A Postgres connection string, e.g.
postgres://user:pass@host:5432/db
";