Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

To install Abra, clone the repository and run the install script.

git clone https://github.com/anandrav/abra
cd abra
./scripts/install

This installs the Abra CLI, the LSP, and the standard library (under ~/.abra/).

Editor support

The install script can also set up syntax highlighting and language support for your editor:

FlagEffect
--vimInstall Vim syntax highlighting and ftdetect
--vscodeBuild and install the VS Code extension (requires Node)
--intellijBuild and install the IntelliJ plugin (requires JDK 21)

Example:

./scripts/install --vim --vscode

Using the CLI

After installing, the abra command is available on your PATH:

Usage: abra [OPTIONS] <FILE> [ARGS]...

Arguments:
    <FILE>    The main Abra file to compile and execute
    [ARGS]    Arguments for the Abra program

Options:
    -h, --help                           Print help
    -c, --check                          Check for errors without compiling and running
    -i, --import-dir <DIRECTORY>         Provide an additional import directory

Additional options:
    --standard-modules <DIRECTORY>       Override the default standard modules directory
    -a, --assembly                       Print the assembly for the Abra program
    --debug-log                          Enable internal debug logging (debug builds only)

Requirements

Cargo

Cargo, the Rust package manager, is required to run the install script. The recommended way to get Cargo is via rustup.

Node (optional)

If you plan to install the VS Code extension with --vscode, you’ll need Node.js (which provides npm).

JDK 21 (optional)

If you plan to install the IntelliJ plugin with --intellij, you’ll need JDK 21. On macOS:

brew install openjdk@21