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:
go version
Installation Methods
Method 1: Build from Source (Recommended)
Building from source gives you the latest version with automatic version info injection.
Step 1: Clone the Repository
git clone https://github.com/TryCadence/Cadence.git
cd Cadence
Step 2: Build the Binary
Using Make (macOS/Linux):
make build
# Binary created at: ./bin/cadence
Using PowerShell (Windows):
.\scripts\build.ps1
# Binary created at: .\cadence.exe
Using Go directly (all platforms):
go build -o cadence ./cmd/cadence
Step 3: Verify Installation
./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:
go install github.com/TryCadence/Cadence/cmd/cadence@latest
Then verify:
cadence version
Method 3: Download Pre-built Binary
Pre-built binaries are available for:
| Platform | Architecture | Binary name |
|---|---|---|
| macOS | Apple Silicon (M1/M2/M3) | cadence-darwin-arm64 |
| macOS | Intel | cadence-darwin-amd64 |
| Linux | x86-64 | cadence-linux-amd64 |
Check GitHub Releases for downloads. Then make it executable:
chmod +x ./cadence-darwin-arm64
./cadence-darwin-arm64 version
Add to PATH (Optional)
Make cadence available from anywhere.
macOS/Linux
# 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)
# 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:
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:
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+:
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:
-
Use full path:
Bash/path/to/cadence --help ./cadence --help -
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:
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:
cadence analyze /repo --config .cadence.yaml -o report.json
Permission denied (macOS/Linux)
Make the binary executable:
chmod +x ./cadence
./cadence --help
Next Steps
Once installed:
- Quick Start - 5-minute guide to your first analysis
- Configuration - Set up thresholds for your needs
- Commands - Full CLI reference for all options
Development Setup
If you're contributing to Cadence:
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.