Skip to content

Installation

LeapSQL is distributed as a single binary with no external dependencies. Choose the installation method that works best for your environment.

If you have Go 1.21+ installed:

bash
go install github.com/leapstack-labs/leapsql/cmd/leapsql@latest

This installs the leapsql binary to your $GOPATH/bin directory.

Pre-built Binaries

Download the latest release for your platform from the releases page.

macOS

bash
# Intel Mac
curl -L https://github.com/leapstack-labs/leapsql/releases/latest/download/leapsql-darwin-amd64 -o leapsql
chmod +x leapsql
sudo mv leapsql /usr/local/bin/

# Apple Silicon
curl -L https://github.com/leapstack-labs/leapsql/releases/latest/download/leapsql-darwin-arm64 -o leapsql
chmod +x leapsql
sudo mv leapsql /usr/local/bin/

Linux

bash
# x86_64
curl -L https://github.com/leapstack-labs/leapsql/releases/latest/download/leapsql-linux-amd64 -o leapsql
chmod +x leapsql
sudo mv leapsql /usr/local/bin/

# ARM64
curl -L https://github.com/leapstack-labs/leapsql/releases/latest/download/leapsql-linux-arm64 -o leapsql
chmod +x leapsql
sudo mv leapsql /usr/local/bin/

Windows

powershell
# Download the Windows binary
Invoke-WebRequest -Uri "https://github.com/leapstack-labs/leapsql/releases/latest/download/leapsql-windows-amd64.exe" -OutFile "leapsql.exe"

# Add to PATH or move to a directory in your PATH

Verify Installation

After installation, verify that LeapSQL is working:

bash
leapsql version

You should see output like:

LeapSQL version 0.1.0

Database Dependencies

DuckDB

LeapSQL uses DuckDB as its default database engine. DuckDB is embedded directly into LeapSQL - no separate installation is required.

The DuckDB database file is created automatically in your project directory when you first run LeapSQL.

Project Setup

Once installed, you can create a new project:

bash
# Create project directory
mkdir my-project
cd my-project

# Create the standard directory structure
mkdir -p models/staging models/marts seeds macros

# Initialize by running your first command
leapsql list

This creates the .leapsql/ directory containing:

  • state.db - SQLite database tracking run history and lineage
  • data.db - DuckDB database containing your actual data

Configuration

LeapSQL uses sensible defaults and requires minimal configuration. Optional configuration can be provided via environment variables:

VariableDescriptionDefault
LEAPSQL_MODELS_DIRDirectory containing SQL modelsmodels/
LEAPSQL_SEEDS_DIRDirectory containing seed CSV filesseeds/
LEAPSQL_MACROS_DIRDirectory containing Starlark macrosmacros/
LEAPSQL_TARGETTarget environment namedev

Troubleshooting

Command not found

If you get "command not found" after installation:

  1. Ensure the binary is in your PATH
  2. For Go installs, ensure $GOPATH/bin is in your PATH:
    bash
    export PATH=$PATH:$(go env GOPATH)/bin

Permission denied

If you get permission errors:

bash
chmod +x /path/to/leapsql

DuckDB errors

DuckDB is embedded in LeapSQL, but if you encounter issues:

  1. Ensure you have write permissions in the project directory
  2. Check that .leapsql/data.db isn't locked by another process
  3. Try deleting .leapsql/data.db to start fresh

Next Steps

Released under the MIT License.