CLI reference/Schema and validation
clavis schema
Manage the project secret schema
sh
clavis schema <command>A schema lists the keys a project needs, with a type, kind, pattern and which environment types require them. Keep it in git as clavis.schema.yaml and review changes like code. clavis check validates environments against it and clavis codegen turns it into a typed loader.
Commands
clavis schema inferSuggest a schema from the current environmentclavis schema lsList schema entriesclavis schema pullDownload the schema as codeclavis schema pushUpload the schema from a fileExamples
sh
clavis schema infer -o clavis.schema.yaml
clavis schema push
clavis check --allDetails
yaml
DATABASE_URL:
type: url
kind: secret
required: { development: true, production: true }
description: Primary Postgres connection string
LOG_LEVEL:
type: enum
kind: variable
values: [debug, info, warn, error]Types: string, url, int, bool, json, enum. Kinds: secret, variable, file. Optional pattern (regular expression), example and description.
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command