Tool for assembly, compilation, and validation of component manifests.
USAGE:
cmc [OPTIONS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-s, --stamp <stamp> Stamp this file on success
SUBCOMMANDS:
check-includes check if given includes are present in a given component manifest
compile compile a CML file
format format a json file
help Prints this message or the help of the given subcommand(s)
include add contents from includes if any
merge merge the listed cmx files
print-cml-reference print generated .cml reference documentation
validate validate that one or more cmx files are valid
validate-references validate component manifest {.cmx|.cml} against package manifest.
check-includes
cmc-check-includes
check if given includes are present in a given component manifest
USAGE:
cmc check-includes [OPTIONS] <FILE> [--] [expect]...
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-d, --depfile <depfile>
depfile for includes
If specified, include paths will be listed here, delimited by newlines.
-f, --fromfile <fromfile>
response file for includes to expect
If specified, additional includes to expect will be read from the path provided. The input format is
delimited by newlines.
-p, --includepath <includepath>...
base paths for resolving includes [default: ]
-r, --includeroot <includeroot>
base path for resolving include paths that start with "//" [default: ]
ARGS:
<FILE>
file to process
<expect>...
compile
cmc-compile
compile a CML file
USAGE:
cmc compile [OPTIONS] <FILE>
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
--config-package-path <config_package_path>
path within the component's package at which its configuration will be available
-d, --depfile <depfile>
depfile for includes
If specified, include paths will be listed here, delimited by newlines.
--experimental-force-runner <experimental_force_runner>
override runner to this value in resulting CML
If specified, the program.runner field will be set to this value. This option is EXPERIMENTAL and subject to
removal without warning.
-f, --features <features>...
The set of non-standard features to compile with. Only applies to CML files.
-p, --includepath <includepath>...
base paths for resolving includes [default: ]
-r, --includeroot <includeroot>
base path for resolving include paths that start with "//" [default: ]
--must-offer-protocol <must_offer_protocol>...
protocols to verify that all children and collections are offered
If specified, for each offer named, cmc will require that all children or collections in `files` have been
offered a capability named for the offer specified. This can be used to help find missing offers of
important capabilities, like fuchsia.logger.LogSink
--must-use-protocol <must_use_protocol>...
protocols to verify that all children and collections are used
If specified, for each offer named, cmc will require that the offer is in a use block. This can be used to
help find missing usages of important capabilities, like fuchsia.logger.LogSink
-o, --output <output>
file to write the formatted results to, will print to stdout if not provided
ARGS:
<FILE>
file to format
format
cmc-format
format a json file
USAGE:
cmc format [FLAGS] [OPTIONS] <FILE>
FLAGS:
--cml interpret input file as JSON5 CML, and output in the preferred style, preserving all comments
(this is the default for `.cml` files; implies `--pretty`)
-h, --help Prints help information
-i, --in-place replace the input file with the formatted output (implies `--output <inputfile>`)
-p, --pretty whether to pretty-print the results (otherwise minify JSON documents; ignored for JSON5)
-V, --version Prints version information
OPTIONS:
-o, --output <output> file to write the formatted results to, will print to stdout if not provided
ARGS:
<FILE> file to format
include
cmc-include
add contents from includes if any
USAGE:
cmc include [OPTIONS] <FILE>
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-d, --depfile <depfile>
depfile for includes
If specified, include paths will be listed here, delimited by newlines.
-p, --includepath <includepath>...
base paths for resolving includes [default: ]
-r, --includeroot <includeroot>
base path for resolving include paths that start with "//" [default: ]
-o, --output <output>
file to write the merged results to, will print to stdout if not provided
ARGS:
<FILE>
file to process
merge
cmc-merge
merge the listed cmx files
USAGE:
cmc merge [OPTIONS] [FILE]...
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-d, --depfile <depfile>
depfile for includes
If specified, include paths will be listed here, delimited by newlines.
-f, --fromfile <fromfile>
response file for files to process
If specified, additional files to merge will be read from the path provided. The input format is delimited
by newlines.
-o, --output <output>
file to write the merged results to, will print to stdout if not provided
ARGS:
<FILE>...
files to process
If any file contains an array at its root, every object in the array will be merged into the final object.
print-cml-reference
cmc-print-cml-reference
print generated .cml reference documentation
USAGE:
cmc print-cml-reference [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --output <file path> If provided, will output generated reference documentation to a text file at the file
path provided.
validate
cmc-validate
validate that one or more cmx files are valid
USAGE:
cmc validate [OPTIONS] [--] [FILE]...
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
--extra_schema <extra_schemas>...
extra JSON schema files to additionally validate against. A custom error message - to be displayed if the
schema fails to validate - can be specified by adding a ':' separator and the message after the path.
--must-offer-protocol <must_offer_protocol>...
verifies that all children and collections are offered the given protocols
If specified, for each protocol named, cmc will require that all children or collections in `files` have
been offered the given protocol. This can be used to help find missing offers of capabilities like
`fuchsia.logger.LogSink`
--must-use-protocol <must_use_protocol>...
verifies that components use the given protocols
If specified, for each protocol named, cmc will require that each component in `files` uses the given
protocol. This can be used to help find missing usages of capabilities like `fuchsia.logger.LogSink`
ARGS:
<FILE>...
files to process
validate-references
cmc-validate-references
validate component manifest {.cmx|.cml} against package manifest.
USAGE:
cmc validate-references [OPTIONS] --component-manifest <Component Manifest> --package-manifest <Package Manifest>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --component-manifest <Component Manifest>
-e, --context <Free text label, for instance as context for errors printed>
-p, --package-manifest <Package Manifest>