schema
Generates a JSON Schema for the .gitrepoforge per-repo config file based on the config definitions in the config repo.
gitrepoforge schema [flags]
Flags
| Flag | Required | Description |
|---|---|---|
--json | no | Output in JSON format instead of the default YAML. |
--output <path> | no | Write the schema to a file instead of stdout. |
Behavior
- Loads the root config (
.gitrepoforge-config) and config repo. - Reads all config definitions from
config/. - Generates a JSON Schema (draft-07) that describes the valid structure for
.gitrepoforgerepo config files. - Outputs the schema in YAML format by default, or JSON when
--jsonis specified. - The output is deterministic — given the same config definitions, the same schema is always generated.
Schema Details
The generated schema includes the following:
- Top-level fields:
name(string, required),default_branch(string, required),manifest(string, optional, default.managedfiles), andconfig(object). - The
configproperty mirrors the config definitions: types are mapped to JSON Schema types (string→string,boolean→boolean,number→number,list→array,object→object). - Enum constraints, patterns, default values, descriptions, and required fields are preserved in the schema.
additionalProperties: falseis set on all objects to enforce strict validation.