Skip to main content

Installation

sysl is a command-line tool written in Go. There are a variety of ways to install it, depending on your OS and use case.

Summary#

  • Mac:
    brew install anz-bank/homebrew-sysl/sysl
  • Docker:
    docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/sysl:latest
  • Go:
    GO111MODULE=on go get -u github.com/anz-bank/sysl/cmd/sysl
  • Source:
    git clone https://github.com/anz-bank/sysl.gitcd syslmake install
  • Binary: download from the GitHub releases page to your PATH

Check the installation with sysl help.

Requirements#

(Mac) Homebrew#

If you use a Mac and have Homebrew installed, you can simply run the following commands in your terminal:

brew tap anz-bank/homebrew-syslbrew install anz-bank/homebrew-sysl/sysl

Pre-compiled binary#

  1. Download the pre-compiled binaries matching your OS from the releases page.

  2. Uncompress the archive and move the sysl binary to your desired location:

    1. On your PATH to run it with sysl
    2. Elsewhere to run it with ./sysl, or some other path/to/sysl

Go get it#

First make sure you've installed Go:

go version

Fetch the sysl command's Go module:

GO111MODULE=on go get -u github.com/anz-bank/sysl/cmd/sysl
caution

Do NOT run this from inside a Go source directory that is module enabled, otherwise it gets added to go.mod/go.sum.

Docker#

You can use sysl within a Docker container (created from this Dockerfile):

docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/sysl:latest

For example:

docker run --rm \  -v $PWD:/go/src/github.com/anz-bank/sysl \  -w /go/src/github.com/anz-bank/sysl \  anzbank/sysl:latest validate -v demo/examples/Modules/model_with_deps.sysl

Mac and Linux users can create an alias for the sysl command:

alias sysl="docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/sysl:latest"

sysl can then be used from the same terminal window. Alternatively, add the alias to your .bashrc or .zshrc file to keep it permanently.

Compile from source#

Here you have two options:

  1. If you want to contribute to the project, please follow the steps on our contributing guide.
  2. If just want to build from source, follow the steps below:
# clone it to create a local copy on your computergit clone https://github.com/anz-bank/sysl.gitcd syslGOPATH=$(go env GOPATH) make install

Try it out#

If the installation worked, you should be able to run:

syslusage: sysl [<flags>] <command> [<args> ...]...

You can always check yours setup of sysl with:

sysl --versionsysl infosysl env

VS Code Extension#

Sysl has a VS Code extension which provides syntax highlighting for .sysl files. Get it from here, or search Extensions for "sysl".