Skip to content

CLI Reference

This page provides documentation for our command line tools.

ili2py

Usage:

ili2py [OPTIONS] COMMAND [ARGS]...

Options:

  -v, --verbose  Print debug information
  -V, --version  Show the version and exit.
  --help         Show this message and exit.

diagram

Parses an arbitrary IMD16 and creates a diagram of selected flavour representing the selected models.

Usage:

ili2py diagram [OPTIONS]

Options:

  -i, --imd TEXT                  full path to IMD16 file  [required]
  -o, --output_folder TEXT        Path to the folder where the diagram should
                                  be written to. The folder will be created if
                                  not existing.  [required]
  -f, --flavour TEXT              the desired flavour (one of mermaid,
                                  plantuml, plantuml_role_members, dot)
                                  [default: mermaid]
  -d, --direction TEXT            the desired direction, depending on the
                                  selected flavour (one of mermaid: ['LR',
                                  'RL', 'TB', 'BT'], plantuml: ['top to
                                  bottom', 'left to right'],
                                  plantuml_role_members: ['top to bottom',
                                  'left to right'], dot: [])
  -l, --linetype TEXT             the desired linetype, depending on the
                                  selected flavour (one of mermaid: [],
                                  plantuml: ['polyline', 'ortho', 'spline'],
                                  plantuml_role_members: ['polyline', 'ortho',
                                  'spline'], dot: [])
  -n, --file_name TEXT            The name of the output diagram. The postfix
                                  (md, puml, etc. is added automatically due
                                  to selected flavour).  [default: diagram]
  -m, --models TEXT               Model names separated by comma. This is used
                                  to filter the content of the resulting
                                  diagram. If not provided, the full tree will
                                  be drawn. NOTE: This works in conjunction
                                  with the depth parameter
  -s, --spacing-line-length INTEGER
                                  The length of the drawn connectors between
                                  the diagram nodes. NOTE: Currently this only
                                  influences plantuml diagrams!  [default: 2]
  --depth INTEGER                 The depth how the diagram should be drawn in
                                  reference to the level of imports. 0 is the
                                  model itself, 1 the model itself and all
                                  models its importing and so on. NOTE: This
                                  can be used in conjunction to the model
                                  names to add arbitrary models to the
                                  diagram.
  -h, --help                      Show this message and exit.

python-classes

Parses an arbitrary imd and creates a library of python classes which represents a typed interface to the complete construction.

Usage:

ili2py python-classes [OPTIONS]

Options:

  -i, --imd TEXT            full path to imd file  [required]
  -o, --output_folder TEXT  Path to where the python package should be written
                            [required]
  -l, --library_name TEXT   Library name which will be used to assemble all
                            python structures in.  [required]
  -h, --help                Show this message and exit.