Installation
arrai 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#
- Docker:
docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/arrai:latest - Go:
GO111MODULE=on go get -u github.com/arr-ai/arrai/cmd/arrai - Source:
git clone https://github.com/arr-ai/arrai.gitcd arraimake install - Binary: download from the GitHub releases page to your 
PATH 
Check the installation with arrai help.
Requirements#
Pre-compiled binary#
Download the pre-compiled binaries matching your OS from the releases page.
Uncompress the archive and move the
arraibinary to your desired location:- On your 
PATHto run it witharrai - Elsewhere to run it with 
./arrai, or some otherpath/to/arrai 
- On your 
 
Go get it#
First make sure you've installed Go:
go versionFetch the arrai command's Go module:
GO111MODULE=on go get -u github.com/arr-ai/arrai/cmd/arraicaution
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 arrai within a Docker container (created from this Dockerfile):
docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/arrai:latestFor example:
docker run --rm \  -v $PWD:/go/src/github.com/arr-ai/arrai \  -w /go/src/github.com/arr-ai/arrai \  anzbank/arrai:latest run -v examples/simple/simple.arraiMac and Linux users can create an alias for the arrai command:
alias arrai="docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/arrai:latest"arrai 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#
git clone https://github.com/arr-ai/arrai.gitcd arraiGOPATH=$(go env GOPATH) make installTry it out#
If the installation worked, you should be able to run:
arraiusage: arrai [<flags>] <command> [<args> ...]...You can always check your setup of arrai with:
arrai --versionarrai infoVS Code Extension#
Arr.ai has a VS Code extension which provides syntax highlighting for .arrai files. Get it from here, or search Extensions for "arrai".
Shortcuts#
Installing via make install will set up symlinks:
ai=>arrai i: interactive shellax=>arrai x: transform
If your installation method did not set up similar shortcuts, you may like to do so yourself (e.g. with alias ai="arrai i" in Bash).