Tyl Command Line Tool is an executable program that runs from the console and is used to handle Tyl programs. It is part of Tyl installation package, and can be found in Tyl installation folder, by the name 'tyl.exe'. It will be referred to as tyl.

If you followed the installation instructions, and Tyl System is successfully installed, you should find Tyl installation folder in the PATH system environment. If not, manually add it to the PATH, so tyl will be identified by the system anywhere.

In this chapter we create and use a directory 'C:/tylprojects', that will contain file 'app.tyl', that will be referred to as app.tyl or simply app:
> md "C:/tylprojects"
> cd "C:/tylprojects"
> echo. 2>app.tyl
Now we are at tylprojects directory, and the prompt text '> ', in the terminal box is referring to it.

To see tyl options:
> tyl

Tyl Command Line Tool

Usage: tyl FILEPATH [r][u][f][x][m]

  FILEPATH     full or relative path or file name of Tyl program to be
               run in the background by Tyl Launcher

  r            reset application state
  u            run in user-interface
  f            fast execution (run in the background)
  x            create executable program
  m            create global module
Run app.tyl with Tyl Launcher:
> tyl app u
tyl searches for app.tyl, in the relative path FILEPATH and runs the file with Tyl Launcher. FILEPATH may not end with '.tyl'.

Some examples of relative paths:
> tyl app.tyl u
> tyl apps/app.test u
> tyl ../src/app u
> tyl "happy app" u
In the second command, tyl will look for file 'app.test.tyl' at directory 'apps'. In the fourth command, file name contains space characters and therefore its path must be enclosed in quotation marks.

The option u tells the system to load app with the user interface. Omitting it, will cause the system to run the file in the background, referred to as a background app:
> tyl app
app will run in the background, and will output its out statements to the console.

If the program is fit for fast execution, you may run it with f option:
> tyl app f
app will run in the background and will run in the fast mode. Note that if you do have unnecessary system interactivity in your code, Tyl System merely will ignore it, and the program will run anyway.

While running Tyl programs in the user interface, the system saves app state, like form location and executable program creation preferences. To reset app state, write:
> tyl app r
The system will reset app state to its original state. Note that in some scenarios, this is the only option to reset the program state, except for reinstalling Tyl Software.

Other tyl command options are dealing with global module and executable program creation activities, and can be mixed to set creation preferences. Some examples:
> tyl app m
> tyl app x
> tyl app xu
> tyl app xf
The options combination xu, tells the system to create an excutable program that will run in Tyl Runner. xf is for creating fast background app, while x is for background app that has some system interactivity. All executable programs are created in the current directory, and will copy required dll files to it as well. If you need to make app a global module, use m option.

Other uses for tyl can be inserting tyl commands in batch files, and activating tyl from Tyl or other programs.