Was this page helpful?

Command Line Tools

Download the Command Line Tools

The command-line compiler lfc can be installed in any directory, but it will be most convenient if add its directory to your PATH environment variable. To download the current development version of the command-line tools instead of the latest release, replace the following tar and zip files with those from the nightly build.

Linux and macOS

Download lfc 0.4.0 for Linux/Mac and run:

    tar xvf lf-cli-0.4.0.tar.gz
    ./lf-cli-0.4.0/bin/lfc --help


Download lfc 0.4.0 for Windows and run:

    unzip lf-cli-0.4.0.zip
    .\lf-cli-0.4.0\bin\lfc.ps1 --version


Clone the repository using one of

    git clone git@github.com:lf-lang/lingua-franca.git


    git clone https://github.com/lf-lang/lingua-franca.git

Then build using gradle or maven:

    ./gradlew assemble


    mvn compile

Note: The Gradle build also performs tests, which takes a long time.

The comnand-line tools will then be in a directory lingua-franca/bin.

Using the Command Line Tools

Set up a Lingua Franca project by putting your program in a file with the .lf extension, such as Example.lf and putting that file with a directory called src. Then compile the program:

    lfc src/Example.lf

This will create two directories in parallel with the src directory, src-gen and bin. If your target language is a compiled one (like C and C++), then the bin directory should contain an executable that you can run:


To see the options that can be given to lfc, get help:

    lfc --help

If you have installed the developer setup by cloning the GitHub repository, then there are a number of other command-line tools available in the lingua-franca/bin directory.

Lingua Franca is an open source project. Help us improve these pages by sending a Pull Request

Contributors to this page:
Eeal  (3)
PDPeter Donovan  (2)
MLMarten Lohstroh  (1)
JJakio815  (1)

Last updated: Mar 30, 2023