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
  validate             Validate Models (and exit)
  canonicalize         Canonicalize (AKA normalize) resources

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] [--[no-]validate] [-d=<diagram>]
                    [-h=<headerURI>] [-var=<variables>] (-l=<load>
                    [-l=<load>]... | -m=<model> | -s=<server>) [[-o=<output>]]
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 (base) of where to write output/s
                               Default: fd:1?charset=UTF-8
  -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.
      --[no-]validate        Whether validation errors in loaded models should
                               stop & exit
                               Default: false
      -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] [--[no-]validate] [-f=<format>] (-l=<load>
                 [-l=<load>]... | -m=<model> | -s=<server>) [[-o=<output>]] 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 (base) of where to write output/s
                             Default: fd:1?charset=UTF-8
  -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.
      --[no-]validate      Whether validation errors in loaded models should
                             stop & exit
                             Default: false

List

List Entities has the following options:

$ ./enola help list
Usage: enola list [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--[no-]
                  http-scheme] [--[no-]validate] [-f=<format>] (-l=<load>
                  [-l=<load>]... | -m=<model> | -s=<server>) [[-o=<output>]] 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 (base) of where to write output/s
                             Default: fd:1?charset=UTF-8
  -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.
      --[no-]validate      Whether validation errors in loaded models should
                             stop & exit
                             Default: false

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] [--[no-]validate] (-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.
      --[no-]validate      Whether validation errors in loaded models should
                             stop & exit
                             Default: false

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> -o=<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)
  -o, --out, --output=<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.

Canonicalize

Canonicalize has the following options:

$ ./enola help canonicalize
Usage: enola canonicalize [-v] [--[no-]classpath-scheme] [--[no-]file-scheme]
                          [--[no-]http-scheme] [--[no-]pretty] -l=<load>
                          [-l=<load>]... [[-o=<output>]]
Canonicalize (AKA normalize) resources
using e.g. RFC 8785 JSON Canonicalization Scheme (JCS) inspired approach
(but this implementation is currently not yet fully compliant with that RFC)
      --[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
  -l, --load=<load>        URI Glob of Models to load (e.g. file:"**.ttl")
  -o, --output=<output>    URI (base) of where to write output/s
                             Default: fd:1?charset=UTF-8
      --[no-]pretty        Whether to 'pretty print' (format) output
                             Default: false
  -v, --verbose            Error verbosity; specify multiple -v options to
                             increase it; e.g. -v -v -v or -vvv.

Validate

$ ./enola help validate
Usage: enola validate [-v] [--[no-]classpath-scheme] [--[no-]file-scheme] [--
                      [no-]http-scheme] [--[no-]validate] (-l=<load>
                      [-l=<load>]... | -m=<model> | -s=<server>)
Validate Models (and exit)
      --[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
  -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.
      --[no-]validate      Whether validation errors in loaded models should
                             stop & exit
                             Default: false

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.