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 binaryDownload the pre-compiled binaries matching your OS from the releases page.
Uncompress the archive and move the
arrai
binary to your desired location:- On your
PATH
to run it witharrai
- Elsewhere to run it with
./arrai
, or some otherpath/to/arrai
- On your
#
Go get itFirst make sure you've installed Go:
go version
Fetch the arrai
command's Go module:
GO111MODULE=on go get -u github.com/arr-ai/arrai/cmd/arrai
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 arrai
within a Docker container (created from this Dockerfile):
docker run --rm -it -v $HOME:$HOME -w $(pwd) anzbank/arrai:latest
For 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.arrai
Mac 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 sourcegit clone https://github.com/arr-ai/arrai.gitcd arraiGOPATH=$(go env GOPATH) make install
#
Try it outIf 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 info
#
VS Code ExtensionArr.ai has a VS Code extension which provides syntax highlighting for .arrai
files. Get it from here, or search Extensions for "arrai".
#
ShortcutsInstalling 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).