Skip to main content

Installation

The simplest way to install InfraGuard is using go install:

go install github.com/aliyun/infraguard/cmd/infraguard@latest

This will download, compile, and install the infraguard binary to your $GOPATH/bin directory (or $HOME/go/bin if GOPATH is not set).

Make sure your Go bin directory is in your PATH:

export PATH=$PATH:$(go env GOPATH)/bin

Verify Installation

infraguard version

You should see the version information displayed.

Download Pre-built Binaries

You can download pre-built binaries from GitHub Releases.

Available Platforms

PlatformArchitectureFilename
Linuxamd64infraguard-vX.X.X-linux-amd64
Linuxarm64infraguard-vX.X.X-linux-arm64
macOSamd64 (Intel)infraguard-vX.X.X-darwin-amd64
macOSarm64 (Apple Silicon)infraguard-vX.X.X-darwin-arm64
Windowsamd64infraguard-vX.X.X-windows-amd64.exe
Windowsarm64infraguard-vX.X.X-windows-arm64.exe

Installation Steps

  1. Download the appropriate binary for your platform from the Releases page

  2. Make the binary executable (Linux/macOS):

chmod +x infraguard-*
  1. Move to a directory in your PATH:
# Linux/macOS
sudo mv infraguard-* /usr/local/bin/infraguard

# Or for user-only installation
mv infraguard-* ~/bin/infraguard
  1. Verify installation:
infraguard version

Building from Source (Optional)

If you need to modify the code or prefer building from source:

Prerequisites

  • Go 1.24.6 or later
  • Git
  • Make

Steps

# Clone the repository
git clone https://github.com/aliyun/infraguard.git
cd infraguard

# Build the binary
make build

# Optionally install to your PATH
sudo cp infraguard /usr/local/bin/

Next Steps

Now that you have InfraGuard installed, proceed to the Quick Start Guide to learn how to use it.