Installation and Setup

Installation and Setup

Prerequisites

Algolang requires:

  • Go version 1.25 or later (https://go.dev/dl/)
  • Make (included on macOS and most Linux distributions)
  • A code editor or IDE (Visual Studio Code with the Go extension, GoLand, or any editor of your choice)

Building from source

Clone the repository and build the algo executable:

git clone <repository-url>
cd algolang
make all

The make all target performs three steps:

  1. make clean – removes any existing binary
  2. make generate – scans the strategies/ directory and generates cmd/builtin_strategies_gen.go, which registers all built-in strategies
  3. make algo – compiles the algo binary

After building, the algo binary is in the current directory. You can move it to a location on your PATH for convenience.

If you only need to rebuild after modifying a strategy:

make generate && make algo

Directory structure

Algolang uses the following directories:

DirectoryPurpose
~/.algolang/cacheLocal cache for downloaded market data
~/.algolang/configsDefault location for configuration files
~/.algolang/portfoliosPortfolio symbol list files (e.g., metals, energy)

These directories are created automatically on first use.

Verifying the installation

Run the following commands to verify that Algolang is working:

# Check the version
algo version

# List available strategies
algo strategies

# List available futures symbols
algo symbols -t future

If all three commands produce output without errors, Algolang is installed and ready to use.