The TethysL Command-Line Interface (CLI) is the core program that supports all major operations on TethysL script files, including: full validation, translation to XML, TethysL source reformatting, and markdown page generation. It also features an LSP Language Server, which supports smart editing capabilities for LSP enabled editors.
The TethysL CLI program is available from the Install page.
The general usage of the program is displayed with the
$ tethysl --help TethysL System <version> tethysl - TethysL CLI USAGE: tethysl [-h|--help] [SUBCOMMAND] [OPTION]... --log <level> Minimum logging level (default, info) -h, --help Show help message -v, --version Show version of this program Subcommands: compile Compile TethysL sources prettify Prettify TethysL sources markdown Generate markdown from mission scripts and other LRAUV resources xml2tethysl Translate .xml sources to TethysL sources parse-lrauv-info Extract base information from lrauv-application files lrauv-info Show base information extracted from lrauv-application files validate-xml Validate XML mission files lsp-server Run TethysL LSP server For more details and all other tricks, consult the documentation.
The CLI program comprises a number of subcommands, which are described below.
You can use
--help after a subcommand to get more details about the particular subcommand.
LRAUV Application Resources¶
A representation of key LRAUV application resources are used by the TethysL CLI program to support its functionality, in particular, to properly validate mission scripts. These resources include all LRAUV behaviors and their settings, units of measure, universals, and several XML Schema files.
For convenience, a version of such representation is embedded in the TethysL CLI program itself. The embedded resources (which are captured at time of creating the TethysL distribution) are mainly intended to facilitate the use of the tool even when a local LRAUV application codebase is not available on the system.
On the other hand, if the LRAUV application codebase is available on the system, the CLI can be instructed to use it to fetch the necessary information instead of using the embedded resources. There are two possible ways to indicate this location:
- Via option
--lrauv, which is accepted by each of the relevant subcommands
- Via environment variable
This subcommand performs full validation of given TethysL script files.
As an example, the following command:
tethysl compile Missions/_examples/WithInsertExample.tl
will compile the indicated script and generate the corresponding XML file
Missions/_examples/WithInsertExample.tx if the script is successfully validated.
.txfile extension has been designated to denote a "TethysL compiled XML version." These
.txmission files will be recognized and handled appropriately by the LRAUV application for purposes of parsing and execution.
- In the DashUI, for a selected TethysL mission, operators may only note
.tlas file extension (instead of
.xml) in the script filename, but all related functionality will remain the same as with any XML mission. Internally, at time of mission loading and execution, the LRAUV will process the corresponding
.txfile that has been generated as part of vehicle deployment preparations.
tethysl compile --help for more details.
This subcommand re-formats the given set of TethysL script files.
tethysl prettify --help for more details.
This subcommand generates markdown files of various kinds, including mission pages from a given set of TethysL script files, as well pages for all behaviors, units, and universals, with corresponding information extracted from relevant lrauv-application resources.
tethysl markdown --help for more details.
Instead of using the embedded LRAUV resources for the relevant commands,
when a local copy of the
lrauv-application codebase is available,
this subcommand allows parsing and capturing all needed information
in a way that can be reused more efficiently in subsequent uses of the CLI.
--dest option to indicate a directory under which the information will be saved.
Commands accepting the
--lrauv option will also accept, alternatively,
--lrauv-info to indicate the directory where the information has been captured
tethysl parse-lrauv-info --help for more details.
This subcommand shows the information that has been extracted from LRAUV application resources, which the CLI uses to support most of its central functionality.
tethysl info --help for more details.
Only to be invoked automatically by LSP client tools
(e.g., VS Code),
lsp-server subcommand launches the TethysL LSP server,
which supports smart editing features. See the VS Code section.
This subcommand validates the given XML mission files.
Consider using the
--strict option to perform a strict validation.
Intended as a general utility, you can use
tethysl validate-xml on any
LRAUV mission script written in XML,
that is, not necessarily on those generated by translation from
tethysl validate-xml --help for more details.
This subcommand translates XML mission files into corresponding TethysL files.
Although pretty functional and useful in general, the implementation of this subcommand has mainly been intended to facilitate the TethysL development itself, as well as, to some extent, facilitate the migration of some traditional missions from XML to TethysL.
tethysl xml2tethysl --help for more details.