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 binaryDownload the pre-compiled binaries matching your OS from the releases page.
Uncompress the archive and move the
sysl
binary to your desired location:- On your
PATH
to run it withsysl
- Elsewhere to run it with
./sysl
, or some otherpath/to/sysl
- On your
#
Go get itFirst 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.
#
DockerYou 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 sourceHere 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 install
#
Try it outIf 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 ExtensionSysl has a VS Code extension which provides syntax highlighting for .sysl
files. Get it from here, or search Extensions for "sysl".