{
"$defs": {
"Override": {
"description": "An override provides alternative sources for a variable, activated via\nthe `--override` CLI flag.",
"properties": {
"default": {
"anyOf": [
{
"$ref": "#/$defs/Source"
},
{
"type": "null"
}
],
"default": null,
"description": "Fallback source for this override when the environment has no entry."
},
"envs": {
"additionalProperties": {
"$ref": "#/$defs/Source"
},
"default": {},
"description": "Map of environment names to value sources for this override.",
"type": "object"
}
},
"type": "object"
},
"Source": {
"description": "How to obtain the value for a variable in a given environment.",
"oneOf": [
{
"additionalProperties": false,
"description": "A fixed string value.",
"properties": {
"literal": {
"type": "string"
}
},
"required": [
"literal"
],
"type": "object"
},
{
"additionalProperties": false,
"description": "A command to execute; stdout is captured with trailing whitespace\nstripped.",
"properties": {
"cmd": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"cmd"
],
"type": "object"
},
{
"additionalProperties": false,
"description": "A shell script to execute via `sh -c`; stdout is captured with trailing\nwhitespace stripped.",
"properties": {
"sh": {
"type": "string"
}
},
"required": [
"sh"
],
"type": "object"
},
{
"additionalProperties": false,
"description": "A minijinja (Jinja2) template string. Reference other variables with\n`{{ VAR_NAME }}`.",
"properties": {
"template": {
"type": "string"
}
},
"required": [
"template"
],
"type": "object"
},
{
"additionalProperties": false,
"description": "When `true`, the variable is silently omitted from output. Must be\n`true` when specified; `skip: false` is rejected by validation.",
"properties": {
"skip": {
"type": "boolean"
}
},
"required": [
"skip"
],
"type": "object"
}
]
},
"Variable": {
"description": "A single environment variable with per-environment sources.\n\nResolution requires either an `envs` entry matching the target environment\nor a `default`. If neither exists, resolution fails with a `NoConfig` error.",
"properties": {
"default": {
"anyOf": [
{
"$ref": "#/$defs/Source"
},
{
"type": "null"
}
],
"default": null,
"description": "Fallback source used when the requested environment has no entry in\n`envs`."
},
"description": {
"description": "Human-readable description, rendered as a comment in output.",
"type": [
"string",
"null"
]
},
"envs": {
"additionalProperties": {
"$ref": "#/$defs/Source"
},
"default": {},
"description": "Map of environment names to value sources.",
"type": "object"
},
"overrides": {
"additionalProperties": {
"$ref": "#/$defs/Override"
},
"description": "Named overrides that can be activated via `--override` on the CLI.\nEach override provides alternative `default`/`envs` sources that\ntake precedence over the base sources when active.",
"type": "object"
},
"tags": {
"default": [],
"description": "Tags for conditional inclusion. When `--tag` flags are passed on the\nCLI, only variables with at least one matching tag (or no tags) are\nincluded.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Top-level envoke configuration, typically loaded from `envoke.yaml`.",
"properties": {
"variables": {
"additionalProperties": {
"$ref": "#/$defs/Variable"
},
"description": "Map of variable names to their definitions.",
"type": "object"
}
},
"required": [
"variables"
],
"title": "Config",
"type": "object"
}