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/syslPre-compiled binary#
Download the pre-compiled binaries matching your OS from the releases page.
Uncompress the archive and move the
syslbinary to your desired location:- On your
PATHto run it withsysl - Elsewhere to run it with
./sysl, or some otherpath/to/sysl
- On your
Go get it#
First make sure you've installed Go:
go versionFetch the sysl command's Go module:
GO111MODULE=on go get -u github.com/anz-bank/sysl/cmd/syslcaution
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:latestFor 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.syslMac 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:
- If you want to contribute to the project, please follow the steps on our contributing guide.
- 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 installTry 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 envVS Code Extension#
Sysl has a VS Code extension which provides syntax highlighting for .sysl files. Get it from here, or search Extensions for "sysl".