Skip to content

Help

Screencast (Asciinema)

Demo

Global Help

Invoking the CLI without any arguments, or with help or --help shows the global help:

$ ./enola
Missing required subcommand
Usage: enola [-hVv] COMMAND
https://enola.dev
  -h, --help      Show this help message and exit.
  -v, --verbose   Error verbosity; specify multiple -v options to increase it;
                    e.g. -v -v -v or -vvv.
  -V, --version   Print version information and exit.
Commands:
  help                 Display help information about the specified command.
  generate-completion  Generate bash/zsh completion script for enola.
  docgen               Generate Markdown Documentation
  list                 List Entities
  get                  Get Entity
  rosetta              Transform YAML <=> JSON <=> TextProto
  server               Start HTTP and/or gRPC Server/s
  execmd               Execute Commands in Markdown
  info                 Provides various information

Each sub-command’s help can be shown either with enola help SUBCOMMAND (better) or enola SUBCOMMAND --help (not recommended).

DocGen

Documentation Generation has the following options:

$ ./enola help docgen
Usage: enola docgen [-iv] [--[no-]classpath-scheme] [--[no-]file-scheme] [--
                    [no-]http-scheme] [-d=<diagram>] [-h=<headerURI>]
                    [-o=<output>] [-var=<variables>] (-l=<load> [-l=<load>]...
                    | -m=<model> | -s=<server>)
Generate Markdown Documentation
      --[no-]classpath-scheme
                             Whether classpath: resource scheme to access
                               internal JAR content is allowed
                               Default: true
  -d, --diagram=<diagram>    Type of diagrams to generate (Mermaid, Graphviz,
                               None; default: Mermaid)
      --[no-]file-scheme     Whether file: resource scheme to access local
                               filesystem is allowed
                               Default: true
  -h, --header=<headerURI>   URI of Markdown header (e.g. file: or string:
                               <URL-encoded> etc.)
                               Default: string:%23%20Models%0A
      --[no-]http-scheme     Whether external HTTP requests are allowed
                               Default: false
  -i, --[no-]index           Whether index.md should be generated
  -l, --load=<load>          URI Glob of Models to load (e.g. file:"**.ttl")
  -m, --model=<model>        URI to EntityKinds (e.g. file:model.yaml)
  -o, --output=<output>      URI of where to write output (of get or docgen)
                               Default: fd:1
  -s, --server=<server>      Target of an Enola gRPC Server (e.g. localhost:
                               7070)
  -v, --verbose              Error verbosity; specify multiple -v options to
                               increase it; e.g. -v -v -v or -vvv.
      -var, --variables=<variables>
                             Type of variables to generate for IRI Templates
                               (Mustache, HTML, Star; default: Mustache)

Get

Get Entity has the following options:

$ ./enola help get
Usage: enola get [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--[no-]
                 http-scheme] [-f=<format>] [-o=<output>] (-l=<load>
                 [-l=<load>]... | -m=<model> | -s=<server>) iri
Get Entity
      iri                  IRI of Entity
      --[no-]classpath-scheme
                           Whether classpath: resource scheme to access
                             internal JAR content is allowed
                             Default: true
  -f, --format=<format>    Output Format: TextProto, YAML, JSON, BinaryPB;
                             default=YAML
      --[no-]file-scheme   Whether file: resource scheme to access local
                             filesystem is allowed
                             Default: true
      --[no-]http-scheme   Whether external HTTP requests are allowed
                             Default: false
  -l, --load=<load>        URI Glob of Models to load (e.g. file:"**.ttl")
  -m, --model=<model>      URI to EntityKinds (e.g. file:model.yaml)
  -o, --output=<output>    URI of where to write output (of get or docgen)
                             Default: fd:1
  -s, --server=<server>    Target of an Enola gRPC Server (e.g. localhost:7070)
  -v, --verbose            Error verbosity; specify multiple -v options to
                             increase it; e.g. -v -v -v or -vvv.

List

List Entities has the following options:

$ ./enola help list
Usage: enola list [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--[no-]
                  http-scheme] [-f=<format>] [-o=<output>] (-l=<load>
                  [-l=<load>]... | -m=<model> | -s=<server>) iri
List Entities
      iri                  IRI of Entity
      --[no-]classpath-scheme
                           Whether classpath: resource scheme to access
                             internal JAR content is allowed
                             Default: true
  -f, --format=<format>    Output Format: TextProto, YAML, JSON, BinaryPB;
                             default=YAML
      --[no-]file-scheme   Whether file: resource scheme to access local
                             filesystem is allowed
                             Default: true
      --[no-]http-scheme   Whether external HTTP requests are allowed
                             Default: false
  -l, --load=<load>        URI Glob of Models to load (e.g. file:"**.ttl")
  -m, --model=<model>      URI to EntityKinds (e.g. file:model.yaml)
  -o, --output=<output>    URI of where to write output (of get or docgen)
                             Default: fd:1
  -s, --server=<server>    Target of an Enola gRPC Server (e.g. localhost:7070)
  -v, --verbose            Error verbosity; specify multiple -v options to
                             increase it; e.g. -v -v -v or -vvv.

Server

The built-in HTTP Web Server has the following options:

$ ./enola help server
Usage: enola server [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--[no-]
                    http-scheme] (-l=<load> [-l=<load>]... | -m=<model> |
                    -s=<server>) ([--httpPort=<httpPort>]
                    [--grpcPort=<grpcPort>])
Start HTTP and/or gRPC Server/s
      --[no-]classpath-scheme
                           Whether classpath: resource scheme to access
                             internal JAR content is allowed
                             Default: true
      --[no-]file-scheme   Whether file: resource scheme to access local
                             filesystem is allowed
                             Default: true
      --grpcPort=<grpcPort>
                           gRPC API Port
      --[no-]http-scheme   Whether external HTTP requests are allowed
                             Default: false
      --httpPort=<httpPort>
                           HTTP Port
  -l, --load=<load>        URI Glob of Models to load (e.g. file:"**.ttl")
  -m, --model=<model>      URI to EntityKinds (e.g. file:model.yaml)
  -s, --server=<server>    Target of an Enola gRPC Server (e.g. localhost:7070)
  -v, --verbose            Error verbosity; specify multiple -v options to
                             increase it; e.g. -v -v -v or -vvv.

ExecMD

Executable Markdown has the following options:

$ ./enola help execmd
Usage: enola execmd [-iv] <files>...
Execute Commands in Markdown
      <files>...   Markdown (MD) files to process
  -i, --in-place   Edit MD files in place
  -v, --verbose    Error verbosity; specify multiple -v options to increase it;
                     e.g. -v -v -v or -vvv.

Rosetta

Rosetta has the following options:

$ ./enola help rosetta
Usage: enola rosetta [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--
                     [no-]http-scheme] --in=<in> --out=<out> [--schema=<schema>]
Transform YAML <=> JSON <=> TextProto
(see https://en.wikipedia.org/wiki/Rosetta_Stone)
      --[no-]classpath-scheme
                           Whether classpath: resource scheme to access
                             internal JAR content is allowed
                             Default: true
      --[no-]file-scheme   Whether file: resource scheme to access local
                             filesystem is allowed
                             Default: true
      --[no-]http-scheme   Whether external HTTP requests are allowed
                             Default: false
      --in=<in>            URI to Input (e.g. file:model.json)
      --out=<out>          URI to Output (e.g. file:model.yaml)
      --schema=<schema>    Schema (Entity, EntityKinds); optional for YAML <=>
                             JSON, required if --in is *.textproto
  -v, --verbose            Error verbosity; specify multiple -v options to
                             increase it; e.g. -v -v -v or -vvv.

Info

Info has the following options:

$ ./enola help info
Usage: enola info [-v] [COMMAND]
Provides various information
  -v, --verbose   Error verbosity; specify multiple -v options to increase it;
                    e.g. -v -v -v or -vvv.
Commands:
  extensions  Provides information about extensions of media types for URI path
                resource names
  detect      Provides information about the media type detected for a given IRI

Generate Completion

$ ./enola generate-completion --help
Usage: enola generate-completion [-hVv]
Generate bash/zsh completion script for enola.
Run the following command to give `enola` TAB completion in the current shell:

  source <(enola generate-completion)

Options:
  -h, --help      Show this help message and exit.
  -v, --verbose   Error verbosity; specify multiple -v options to increase it;
                    e.g. -v -v -v or -vvv.
  -V, --version   Print version information and exit.