Skip to content

CLI

lis is the Lisette compiler toolchain, which provides every command below.

Terminal window
lis new <project-name>

Create a new Lisette project in the current directory.

  • Directoryhello-world/
    • Directorysrc/
      • main.lis
    • lisette.toml
    • README.md
    • AGENTS.md
    • .gitignore
ArgumentDoes
project-name (required)Name of the project, e.g. hello-world

See Packages

Terminal window
lis run [target] [--flags]

Compile a Lisette project to a binary at target/bin/ and run the binary.

ArgumentDoes
target (optional)Project dir or file (default: current dir)
FlagDoes
--sourcemapInclude //line in Go code for stack traces
--go-flags "<flags>"Pass flags through to go build
ExampleDoes
lis runRun project in current dir
lis run ~/projects/demoRun project in specific dir
lis run calculate.lisRun a script
lis run greet.lis johnPass argument to script
lis run --go-flags "-ldflags='-s -w'"Pass linker flags to go build

See Scripts

Terminal window
lis build [path] [--flags]

Compile a project to a binary at the target/.lisette/bin/ dir.

ArgumentDoes
path (optional)Path to project dir or file (default: current dir)
FlagDoes
--sourcemapInclude //line in Go code for stack traces
--go-flags "<flags>"Pass flags through to go build
-o, --output <path>Write the binary for a script at this path
ExampleDoes
lis buildBuild project in current dir
lis build ~/projects/demoBuild project in specific dir
lis build greet.lisBuild a script to ./greet
lis build greet.lis -o bin/greetBuild a script to a chosen path
lis build --go-flags "-trimpath"Strip file paths from the binary
Terminal window
lis emit [path] [--flags]

Generate Go code from a Lisette project at the target/ dir.

ArgumentDoes
path (optional)Path to project dir or file (default: current dir)
FlagDoes
--sourcemapInclude //line in Go code for stack traces
-o, --output <path>Write the Go file for a script at this path
ExampleDoes
lis emitEmit Go for project in current dir
lis emit ~/projects/demoEmit Go for project in specific dir
lis emit greet.lisEmit a script to ./greet.go
Terminal window
lis check [path] [--flags]

Lint and typecheck a Lisette project.

ArgumentDoes
path (optional)Path to dir (default: current dir)
FlagDoes
--errors-onlyShow only errors
--warnings-onlyShow only warnings
--deny warningsFail check if warnings found
--fixApply lint fixes in place
--output unixMachine-readable output
ExampleDoes
lis checkCheck project in current dir
lis check ~/projects/demoCheck project in specific dir
lis check script.lisCheck single file
lis check --fixFix all lints in the project
lis check --output unixOne diagnostic per line
Terminal window
lis format [path] [--flags]

Format source files in a Lisette project.

ArgumentDoes
path (optional)Path to file or dir (default: current dir)
FlagDoes
--checkVerify formatting without modifying files
ExampleDoes
lis formatFormat project in current dir
lis format ~/projects/demoFormat project in specific dir
lis format src/main.lisFormat a single file
lis format --checkVerify formatting in current dir
Terminal window
lis test [path] [--flags]

Run tests in a Lisette project.

ArgumentDoes
path (optional)Path to dir (default: current dir)
FlagDoes
-f, --filter <pattern>Run only tests whose name contains pattern
--failedRerun the tests that failed last time
--go-flags "<flags>"Pass flags through to go test
ExampleDoes
lis testRun all tests in current dir
lis test ~/projects/demoRun tests in specific dir
lis test -f parseOnly tests whose name contains “parse”
lis test --go-flags "-failfast"Stop at the first failing test

See Tests

Terminal window
lis add <dependency>[@version] [--flags]

Add a third-party Go module as a dependency to your project or script.

ArgumentDoes
dependency (required)Go module name
FlagDoes
--replace <module>Redirect to another module
--path <dir>Add a local Go module
--script <file>Add to this script
ExampleDoes
lis add google/uuidLatest version
lis add google/uuid@v1.6.0Exact version
lis add google/uuid@2d3c2a9Exact commit hash or branch
lis add go.uber.org/zapFull path for non-GitHub host
lis add --path ../authUse the Go module at ../auth
lis add gorilla/mux --replace you/muxUse your own fork of gorilla/mux
lis add --script tool.lis google/uuidAdd google/uuid to a script

See Third-party Go modules and Go module overrides

Terminal window
lis sync [--flags]

Reconcile lisette.toml against the go: imports in src/, similar to go mod tidy. This drops dependency entries no longer reached by any import, and generates typedefs for every imported package. Run this after removing imports, deleting source files, or pulling new code.

FlagDoes
--script <file>Tidy this script’s dependencies
ExampleDoes
lis syncTidy the project in the current dir
lis sync --script tool.lisTidy a script’s dependencies

See Third-party Go modules

Terminal window
lis version

Print compiler version (Lisette and Go toolchain).

Terminal window
lis upgrade

Upgrade the compiler, or show the upgrade command for the tool that installed it.

Terminal window
lis help <command>

Show help for a command.

ArgumentDoes
command (required)Command to get help for (e.g. run, build)
Terminal window
lis doc [symbol] [--flags]

Browse documentation on a symbol from the prelude or from the Go stdlib.

ArgumentDoes
symbol (optional)Symbol to look up (omit to list all)
FlagDoes
-s, --search <term>Search docs for term
ExampleDoes
lis docList prelude symbols and Go packages
lis doc SliceDocs on Lisette’s Slice type
lis doc Slice.mapDocs on map method on Lisette’s Slice type
lis doc preludeList all Lisette prelude symbols
lis doc testHow to write and run tests
lis doc go:List all Go stdlib packages
lis doc go:osDocs on Go stdlib os package contents
lis doc go:os.FileDocs on File type in Go stdlib os package
lis doc -s appendSearch docs for append

See Prelude

Terminal window
lis learn

Create a sample Lisette project in the current directory.

  • Directorylearn-lisette/
    • Directorysrc/
      • main.lis
      • Directorymodels/
        • props.lis
        • task.lis
      • Directorystore/
        • store.lis
      • Directorycommands/
        • commands.lis
      • Directorydisplay/
        • display.lis
    • lisette.toml
    • README.md
    • AGENTS.md
    • .gitignore

The sample is a CLI task manager that demonstrates enums, structs, pattern matching, error handling, closures, Go interop, and concurrency.

Terminal window
lis complete <shell>

Generate shell completion scripts.

ArgumentDoes
shell (required)Shell to generate completions for (bash, zsh, or fish)
Terminal window
lis complete bash > ~/.local/share/bash-completion/completions/lis
lis complete fish > ~/.config/fish/completions/lis.fish

For zsh, add to ~/.zshrc (before compinit):

Terminal window
fpath=(~/.zfunc $fpath)

Then generate:

Terminal window
mkdir -p ~/.zfunc && lis complete zsh > ~/.zfunc/_lis
Terminal window
lis lsp

Start the Lisette language server over stdio, for use by editor extensions.

See LSP