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 lint Lint 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 download-lrauv-info Download published lrauv-application base information show-lrauv-info Show LRAUV definitions extracted from lrauv-application files lsp-server Run TethysL LSP server (only for LSP clients) 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 command performs a basic linting of the given script files, and reports any issues or associated suggestions. Checks initially implemented include:
- ID of mission or aggregate to be consistent with filename
- Arguments/output for possible use of array syntax
- Embedded aggregates for possible use of macro syntax
- Recursively, the above checks for each embedded aggregate.
You can indicate individual files, or use the
--mission-dir options to lint all files under a given directory
(except those with path containing "Deprecated" or "RegressionTest").
tethysl lint --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.
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.