CLI descriptor reference#

This reference is generated from the descriptors that configure the COGS command-line parser. It is checked in so documentation builds do not need to execute the tool, and CI rejects drift between this file and the executable.

cogs-new#

Create a model skeleton in a new target directory

Usage#

cogs cogs-new targetLocation [options]

Arguments#

targetLocation

Directory where the model skeleton is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, delete and overwrite the location

publish-cs#

Publish a C# class structure from a COGS data model

Usage#

cogs publish-cs [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the c# schema is generated.

Options#

-?|-h|--help

Show help information

-n|--namespace <value>

URI of the target XML namespace

-o|--overwrite

If the target directory exists, delete and overwrite the location

--csproj

Determines whether to generate a .csproj project file

--nullable

Determines whether to use C# nullable types

publish-dctap#

Publish DCTAP Dublin Core Tabular Application Profile from a COGS data model

Usage#

cogs publish-dctap [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the DCTAP csv is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, delete and overwrite the location

publish-dot#

Publish a dot schema from a COGS data model

Usage#

cogs publish-dot [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the dot schema is generated.

Options#

-?|-h|--help

Show help information

--dot <value>

Path to the Graphviz dot executable. Uses COGS_DOT, then PATH when omitted.

-o|--overwrite

If the target directory exists, delete and overwrite the location

-f|--format <value>

Specifies format for output file. Defaults to svg

-a|--all

generate one graph containing all objects. Cannot be used with -s

-s|--single

generate a graph for every single item (incoming links and outgoing links). Cannot be used with -a

-i|--inheritance

allow inheritance in the graph(s)

-c|--composite

show composite types inside item types

publish-graphql#

Publish a GraphQL schema from a COGS data model

Usage#

cogs publish-graphql [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the GraphQL schema is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, replace it transactionally.

publish-json#

Publish a JSON schema from a COGS data model

Usage#

cogs publish-json [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the json schema is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, delete and overwrite the location

--allowAdditionalProperties

Removed in COGS 2.0; generated JSON contracts are closed.

publish-linkml#

Publish LinkML from a COGS data model

Usage#

cogs publish-linkml [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the LinkML yaml is generated.

Options#

-?|-h|--help

Show help information

-n|--namespace <value>

URI of the target XML namespace

-p|--namespacePrefix <value>

Namespace prefix to use for the target namespace

-o|--overwrite

If the target directory exists, delete and overwrite the location

--name <value>

Name of the model

publish-owl#

Publish an authoritative OWL ontology in Turtle from a COGS data model

Usage#

cogs publish-owl [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the owl schema is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, delete and overwrite the location

-n|--namespace <value>

URI of the target Owl namespace

-p|--namespacePrefix <value>

Namespace prefix to use for the target Owl namespace

-v|--version <value>

Version number for the target Owl namespace

publish-py#

Publish a Python package from a COGS data model

Usage#

cogs publish-py [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the Python package is generated.

Options#

-?|-h|--help

Show help information

--flavor <value>

Python flavor: python (dependency-free, default) or pydantic (v2)

-n|--namespace <value>

URI of the target XML namespace

-o|--overwrite

If the target directory exists, delete and overwrite the location

publish-sphinx#

Publish a Sphinx documentation website from a COGS data model

Usage#

cogs publish-sphinx [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the sphinx documentation is generated.

Options#

-?|-h|--help

Show help information

--dot <value>

Path to the Graphviz dot executable. Uses COGS_DOT, then PATH when omitted.

-o|--overwrite

If the target directory exists, delete and overwrite the location

publish-ts#

Publish a TypeScript package from a COGS data model

Usage#

cogs publish-ts [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the TypeScript package is generated.

Options#

-?|-h|--help

Show help information

-n|--namespace <value>

URI of the target XML namespace

-o|--overwrite

If the target directory exists, delete and overwrite the location

publish-uml#

Publish an UML schema from a COGS data model

Usage#

cogs publish-uml [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the UML schema is generated.

Options#

-?|-h|--help

Show help information

--dot <value>

Path to the Graphviz dot executable. Uses COGS_DOT, then PATH when omitted.

-o|--overwrite

If the target directory exists, delete and overwrite the location

-m|--mode <value>

UML output mode: normative (UML/XMI 2.4.2) or ea (XMI 2.5.1 with diagram extensions).

publish-xsd#

Publish an XML schema from a COGS data model

Usage#

cogs publish-xsd [cogsLocation] [targetLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

[targetLocation]

Directory where the xsd schema is generated.

Options#

-?|-h|--help

Show help information

-o|--overwrite

If the target directory exists, delete and overwrite the location

-n|--namespace <value>

URI of the target XML namespace

-p|--namespacePrefix <value>

Namespace prefix to use for the target XML namespace

rewrite#

Rewrite an on-disk COGS model directory to the current CSV conventions

Usage#

cogs rewrite [cogsLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

Options#

-?|-h|--help

Show help information

--upgrade-cogs-2

Mechanically migrate an unambiguous legacy model to COGS 2.0; tracked marker case changes use git mv -f.

validate#

Validate a on disk COGS data model directory

Usage#

cogs validate [cogsLocation] [options]

Arguments#

[cogsLocation]

Directory where the COGS datamodel is located.

Options#

-?|-h|--help

Show help information

validate-instance#

Validate a JSON or XML instance against a COGS 2.0 model.

Usage#

cogs validate-instance model instance [options]

Arguments#

model

Directory containing the COGS model.

instance

Path to the JSON or XML instance.

Options#

-?|-h|--help

Show help information

--format <format>

Instance serialization format: json or xml.