Skip to content

Quick Start

Here's how to get up and running with Tamarin either as a CLI or as a library.

If this is your first time trying Tamarin, we recommend starting with the CLI.

Install using Homebrew

Install the Tamarin CLI using Homebrew as follows:

brew tap cloudcmds/tamarin
brew install tamarin

You should then be able to run tamarin -h to see usage information.

Install the CLI from Source

If you have Go installed on your system, you can build and install by running:

go install

The tamarin binary should now be present in $HOME/go/bin or in the location corresponding to your GOPATH directory.

Add Tamarin as a Library

Use go get to add Tamarin as a library dependency of your Go project:

go get

Run the REPL

Running the tamarin command without any options will start the REPL:

$ tamarin

>>> print("Hello gophers!")
Hello gophers!

Entering ctrl+c or ctrl+d will exit the program.

Execute a Tamarin String

Run tamarin -c "code-to-execute" to directly evaluate a given code string:

$ tamarin -c "uuid.v4()"

Run a Script

To run a Tamarin script in a file, pass the path to the command:

$ tamarin ./examples/

VSCode Extension

VSCode users can quickly enable Tamarin syntax highlighting by installing the Tamarin VSCode Extension. A TextMate grammar file is available here that may help with syntax highlighting in other editors.