Docs/Installation

Installation

Get Cadence installed and ready to use on your system.

Get Cadence installed and ready to use on your system.

Prerequisites

  • Go 1.24 or later - Download Go
  • Git - Required for repository analysis (pre-installed on most systems)

Verify your Go version:

Bash
go version

Installation Methods

Building from source gives you the latest version with automatic version info injection.

Step 1: Clone the Repository

Bash
git clone https://github.com/TryCadence/Cadence.git
cd Cadence

Step 2: Build the Binary

Using Make (macOS/Linux):

Bash
make build
# Binary created at: ./bin/cadence

Using PowerShell (Windows):

PowerShell
.\scripts\build.ps1
# Binary created at: .\cadence.exe

Using Go directly (all platforms):

Bash
go build -o cadence ./cmd/cadence

Step 3: Verify Installation

Bash
./bin/cadence version

You should see output like:

Cadence v0.3.0 (abc123de) built at 2026-03-03T10:30:00Z

Method 2: Go Install

Install directly from GitHub:

Bash
go install github.com/TryCadence/Cadence/cmd/cadence@latest

Then verify:

Bash
cadence version

Method 3: Download Pre-built Binary

Pre-built binaries are available for:

PlatformArchitectureBinary name
macOSApple Silicon (M1/M2/M3)cadence-darwin-arm64
macOSIntelcadence-darwin-amd64
Linuxx86-64cadence-linux-amd64

Check GitHub Releases for downloads. Then make it executable:

Bash
chmod +x ./cadence-darwin-arm64
./cadence-darwin-arm64 version

Add to PATH (Optional)

Make cadence available from anywhere.

macOS/Linux

Bash
# Copy to system path
sudo cp ./cadence /usr/local/bin/

# Or create a symlink
sudo ln -s $(pwd)/cadence /usr/local/bin/

# Verify
cadence --help

Windows (PowerShell as Admin)

PowerShell
# Add to PATH
$env:PATH += ";$(Get-Location)"

# Make permanent
[Environment]::SetEnvironmentVariable(
    "PATH", 
    $env:PATH, 
    "User"
)

# Verify
cadence --help

Build Details

The Makefile and build scripts automatically inject version information from Git tags:

Bash
make build
# Automatically captures:
# - Version from latest git tag (or "0.1.0" if no tags)
# - Short commit hash
# - Build timestamp in UTC

Available Make targets:

Bash
make build    # Build binary with version injection (output: ./bin/cadence)
make install  # Install to $GOPATH/bin
make test     # Run all tests
make fmt      # Format code
make tidy     # Tidy dependencies (go mod tidy)
make lint     # Run linter (golangci-lint)
make vet      # Run go vet
make clean    # Remove build artifacts
make help     # Show all targets

Troubleshooting

"Go version too old"

If you get an error about Go version, upgrade to 1.24+:

Bash
go version
# If less than 1.24, download from https://golang.org/dl

"command not found: cadence"

The binary is not in your PATH. Either:

  1. Use full path:

    Bash
    /path/to/cadence --help
    ./cadence --help
    
  2. Add to PATH - Follow the "Add to PATH" section above

Build fails with "module not found"

Ensure you're in the Cadence directory and have internet connection:

Bash
cd Cadence
go mod tidy
go build -o cadence ./cmd/cadence

Configuration file not auto-detected

cadence config init creates .cadence.yaml. However, the analyze and web commands auto-detect cadence.yml (without the leading dot). To use your generated config, always pass it explicitly:

Bash
cadence analyze /repo --config .cadence.yaml -o report.json

Permission denied (macOS/Linux)

Make the binary executable:

Bash
chmod +x ./cadence
./cadence --help

Next Steps

Once installed:

  1. Quick Start - 5-minute guide to your first analysis
  2. Configuration - Set up thresholds for your needs
  3. Commands - Full CLI reference for all options

Development Setup

If you're contributing to Cadence:

Bash
git clone https://github.com/TryCadence/Cadence.git
cd Cadence

# Install dependencies
go mod download

# Run tests
go test ./...

# Format code
go fmt ./...

# Build
make build

# Run linter
make lint

See the Build & Development guide for more details.