{
  "id": "calm-cli",
  "name": "CALM CLI",
  "homepage": "https://github.com/finos/architecture-as-code",
  "description": "A command line interface to interact with the CALM schema.",
  "executables": [
    "calm"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.calm.json"
    ]
  },
  "commands": {
    "format": 1,
    "label": "CALM CLI",
    "description": "Generate an architecture from a pattern, or validate CALM documents. Docify, template, diff and CalmHub options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "generate"
        ],
        "label": "Generate architecture",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/finos/architecture-as-code/HEAD/cli/README.md",
            "revision": "2026-10-27",
            "evidence": "Usage: calm generate [options]\nGenerate an architecture from a CALM pattern file.\n-p, --pattern           Path to the pattern file to use. May be a file path or a URL.\n-o, --output            Path location at which to output the generated file. (default: \"architecture.json\")\n-v, --verbose                 Enable verbose logging. (default: false)\n"
          }
        ],
        "field": [
          {
            "id": "pattern",
            "label": "Pattern file",
            "type": "path",
            "option": [
              "--pattern",
              "-p"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "description": "Defaults to architecture.json.",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "readme"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "generate",
            "label": "Generate from pattern",
            "fields": [
              "pattern",
              "output"
            ],
            "required": [
              "pattern"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "pattern",
              "output",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "validate"
        ],
        "label": "Validate documents",
        "source": [
          {
            "id": "readme",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/finos/architecture-as-code/HEAD/cli/README.md",
            "revision": "2026-10-27",
            "evidence": "Usage: calm validate [options]\nValidate a CALM document.\n-p, --pattern           Path to the pattern file to use. May be a file path or a URL.\n-a, --architecture      Path to the architecture file to use. May be a file path or a URL.\n--timeline              Path to the timeline file to validate. May be a file path or a URL.\n--strict                  When run in strict mode, the CLI will fail if any warnings are reported. (default: false)\n-f, --format          The format of the output (choices: \"json\", \"junit\", \"pretty\", default: \"json\")\n-o, --output            Path location at which to output the generated file.\n-v, --verbose                 Enable verbose logging. (default: false)\n"
          }
        ],
        "field": [
          {
            "id": "architecture",
            "label": "Architecture file",
            "type": "path",
            "option": [
              "--architecture",
              "-a"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "pattern",
            "label": "Pattern file",
            "type": "path",
            "option": [
              "--pattern",
              "-p"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "timeline",
            "label": "Timeline file",
            "type": "path",
            "option": [
              "--timeline"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "readme"
            ]
          },
          {
            "id": "format",
            "label": "Output format",
            "type": "enum",
            "option": [
              "--format",
              "-f"
            ],
            "choices": [
              {
                "value": "json",
                "label": "JSON"
              },
              {
                "value": "junit",
                "label": "JUnit"
              },
              {
                "value": "pretty",
                "label": "Pretty"
              }
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "strict",
            "label": "Fail on warnings",
            "type": "boolean",
            "option": [
              "--strict"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "output",
            "label": "Output file",
            "type": "path",
            "option": [
              "--output",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output",
              "must_exist": false
            },
            "effect": "overwrite",
            "sources": [
              "readme"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "validate_arch",
            "label": "Validate architecture against pattern",
            "fields": [
              "architecture",
              "pattern",
              "format",
              "strict"
            ],
            "required": [
              "architecture"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "architecture",
              "pattern",
              "timeline",
              "format",
              "strict"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "output",
              "verbose"
            ]
          }
        ]
      }
    ]
  }
}
