Installation
This guide will help you set up the Animal language interpreter on your system.
Requirements
Go 1.18 or higher
Git
Installing from Source
Clone the repository
git clone https://github.com/your-username/animal.git cd animal
Build the interpreter
go build -o animal.exe ./cmd/animal
Alternatively, you can use the Go install command:
go install ./cmd/animal@latest
Verify the installation
./animal --versionThe command should display the version of Animal that you’ve just installed.
Adding Animal to Your PATH
To use Animal from any directory, add it to your system PATH:
On Linux/macOS:
# Add this line to your .bashrc or .zshrc
export PATH=$PATH:/path/to/animal/directory
On Windows:
Right-click on ‘This PC’ and select ‘Properties’
Click on ‘Advanced system settings’
Click on ‘Environment Variables’
Under ‘System variables’, select ‘Path’ and click ‘Edit’
Click ‘New’ and add the path to your Animal directory
Click ‘OK’ to close all dialogs
Using the Animal REPL
You can start an interactive REPL (Read-Eval-Print Loop) by running Animal without arguments:
animal
This will open an interactive session where you can type Animal code and see the results immediately.
Platform-Specific Notes
Windows
The executable will be named
animal.exeYou may need to run the command prompt as Administrator when building
Linux
You may need to add execute permissions:
chmod +x animalConsider placing the binary in
/usr/local/binfor system-wide installation
macOS
You may need to bypass Gatekeeper the first time you run Animal
Homebrew installation may be available in the future