fallow rule-pack-schema: print the rule pack JSON Schema
Print the JSON Schema of fallow rule pack files. Use it for editor autocomplete and validation of the policy rules in a rule pack.
fallow rule-pack-schema prints the JSON Schema of a rule pack file. A rule pack is a JSON or JSONC file that the rulePacks config key lists. The schema describes the pack fields and every rule kind, for example banned-import, banned-call, and banned-effect.
fallow rule-pack-schema
fallow rule-pack-schema > rule-pack-schema.json
The output is always JSON on stdout, whatever the value of --format. The command does not read your project or your config file. fallow rule-pack schema prints the same schema.
Use the schema in your editor
Point the $schema field of the pack file at one of these sources:
| Source | Value of $schema |
|---|---|
| The npm package | The path of node_modules/fallow/rule-pack-schema.json, relative to the pack file. This file matches the fallow version that you installed. |
| The fallow repository | https://raw.githubusercontent.com/fallow-rs/fallow/main/rule-pack-schema.json. fallow rule-pack init writes this value. |
| A local file | The path of the file that fallow rule-pack-schema > rule-pack-schema.json wrote. |
{
"$schema": "../node_modules/fallow/rule-pack-schema.json",
"version": 1,
"name": "team-policy",
"rules": []
}
The npm package also exports the file as fallow/rule-pack-schema.json. The output of fallow rule-pack-schema is equal to the file in the npm package of the same version.
Options
fallow rule-pack-schema has no flags of its own. The global flags do not change the output.
The MCP server serves the same schema as the fallow://schema/rule-pack resource.