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 }
[[commands.subcommand]]
path = ["generate"]
label = "Generate architecture"
[[commands.subcommand.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]
Generate an architecture from a CALM pattern file.
-p, --pattern Path to the pattern file to use. May be a file path or a URL.
-o, --output Path location at which to output the generated file. (default: "architecture.json")
-v, --verbose Enable verbose logging. (default: false)
"""
[[commands.subcommand.field]]
id = "pattern"
label = "Pattern file"
type = "path"
option = ["--pattern", "-p"]
path = { kind = "file", role = "input" }
sources = ["readme"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "verbose"
label = "Verbose"
type = "boolean"
option = ["--verbose", "-v"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "generate"
label = "Generate from pattern"
fields = ["pattern", "output"]
required = ["pattern"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["pattern", "output", "verbose"]
[[commands.subcommand]]
path = ["validate"]
label = "Validate documents"
[[commands.subcommand.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]
Validate a CALM document.
-p, --pattern Path to the pattern file to use. May be a file path or a URL.
-a, --architecture Path to the architecture file to use. May be a file path or a URL.
--timeline Path to the timeline file to validate. May be a file path or a URL.
--strict When run in strict mode, the CLI will fail if any warnings are reported. (default: false)
-f, --format The format of the output (choices: "json", "junit", "pretty", default: "json")
-o, --output Path location at which to output the generated file.
-v, --verbose Enable verbose logging. (default: false)
"""
[[commands.subcommand.field]]
id = "architecture"
label = "Architecture file"
type = "path"
option = ["--architecture", "-a"]
path = { kind = "file", role = "input" }
sources = ["readme"]
[[commands.subcommand.field]]
id = "pattern"
label = "Pattern file"
type = "path"
option = ["--pattern", "-p"]
path = { kind = "file", role = "input" }
sources = ["readme"]
[[commands.subcommand.field]]
id = "timeline"
label = "Timeline file"
type = "path"
option = ["--timeline"]
path = { kind = "file", role = "input" }
sources = ["readme"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "strict"
label = "Fail on warnings"
type = "boolean"
option = ["--strict"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "output"
label = "Output file"
type = "path"
option = ["--output", "-o"]
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["readme"]
[[commands.subcommand.field]]
id = "verbose"
label = "Verbose"
type = "boolean"
option = ["--verbose", "-v"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "validate_arch"
label = "Validate architecture against pattern"
fields = ["architecture", "pattern", "format", "strict"]
required = ["architecture"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["architecture", "pattern", "timeline", "format", "strict"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["output", "verbose"]