{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://fire-cli.dev/schemas/fire.schema.json", "title": "Fire Config", "type": "object", "additionalProperties": false, "patternProperties": { "^x-": {} }, "properties": { "dir": { "type": "string", "description": "Project working directory. Defaults to '.'." }, "namespace": { "$ref": "#/$defs/namespace" }, "group": { "type": "string", "description": "Optional file-level group used as a command prefix for all commands in this file." }, "description": { "type": "string", "description": "Optional file-level description. When `group` is set, this description is shown for that group in help and completion." }, "runtimes": { "type": "object", "description": "Runtime definitions keyed by alias (for example: deno, py).", "additionalProperties": { "$ref": "#/$defs/runtime" } }, "include": { "type": "array", "description": "List of additional local directories (relative to current directory) where Fire should load fire config files. Search is direct-level only (non-recursive).", "items": { "type": "string" } }, "commands": { "type": "object", "description": "Command definitions keyed by command name. The top-level command name `cli` is reserved and cannot be defined (validation error example: 'Property cli is not allowed.').", "minProperties": 1, "properties": { "cli": { "description": "Reserved command name. `commands.cli` is not allowed at the top level because `cli` is used internally by Fire.", "not": {} } }, "additionalProperties": { "$ref": "#/$defs/commandEntry" } } }, "$defs": { "namespace": { "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string", "description": "Human-readable namespace label." }, "prefix": { "type": "string", "description": "Namespace prefix used in CLI paths." } }, "required": [ "prefix", "description" ] }, "runtime": { "type": "object", "additionalProperties": false, "properties": { "sdk": { "type": "string", "description": "Runtime SDK identifier used in runtime expressions.", "enum": [ "node", "deno", "python" ] }, "runner": { "type": "string", "description": "Default runner command used to execute runtime logic." }, "check": { "type": "string", "description": "Health-check command to verify runtime availability." }, "fallback_runner": { "type": "string", "description": "Fallback runner command used when `check` fails." }, "paths": { "type": "array", "description": "Glob patterns where runtime scripts/functions are discovered.", "items": { "type": "string" } } }, "required": [ "sdk" ] }, "stringOrStringArray": { "description": "A single command string or a sequence of command strings.", "oneOf": [ { "type": "string" }, { "type": "array", "minItems": 1, "items": { "type": "string" } } ] }, "commandEntry": { "description": "Command shorthand string or full command object.", "oneOf": [ { "type": "string" }, { "$ref": "#/$defs/commandSpec" } ] }, "commandSpec": { "type": "object", "additionalProperties": false, "properties": { "<<": { "description": "YAML merge key used to reuse anchored blocks." }, "dir": { "type": "string", "description": "Command-specific working directory. Overrides top-level `dir`." }, "check": { "type": "string", "description": "Pre-check command; can be paired with `fallback_runner`." }, "runner": { "type": "string", "description": "Command runner prefix (for example to run inside a container shell)." }, "fallback_runner": { "type": "string", "description": "Runner used if `check` fails." }, "before": { "type": "string", "description": "Command executed before the main action." }, "description": { "type": "string", "description": "Short user-facing description shown in listings and completion." }, "placeholder": { "type": "string", "description": "Placeholder template for this command." }, "on_unused_args": { "type": "string", "description": "Behavior for unused args at this command level.", "enum": [ "ignore", "warn", "error" ] }, "exec": { "$ref": "#/$defs/stringOrStringArray", "description": "Shell command(s) to execute. If an array is provided, commands run in order." }, "eval": { "$ref": "#/$defs/stringOrStringArray", "description": "Runtime expression(s) to evaluate (for example: py:func(\"{1}\"))." }, "compute": { "type": "object", "description": "Computed variables map (name -> expression), evaluated before execution. If expression uses a known runtime prefix (:) it is evaluated in that runtime; otherwise it is executed as a shell command.", "additionalProperties": { "type": "string" } }, "macros": { "type": "object", "description": "Macro substitutions map used in `exec` and nested command strings.", "additionalProperties": { "type": "string" } }, "commands": { "type": "object", "description": "Nested subcommands keyed by subcommand name.", "additionalProperties": { "$ref": "#/$defs/commandEntry" } } }, "anyOf": [ { "required": [ "exec" ] }, { "required": [ "eval" ] }, { "required": [ "commands" ] } ] } } }