# Installation

## Binary Distributions

Compiled versions for macOS, Linux and Windows are available on GitHub:

{% embed url="<https://github.com/dreadl0ck/netcap/releases>" %}

## Go Get

Installation via go get:

```
$ go get -u github.com/dreadl0ck/netcap/...
```

## Manual Build

```
$ go build -ldflags "-s -w" -o /usr/local/bin/net github.com/dreadl0ck/netcap/cmd
```

## Reproducible Builds via Go Modules

In order to provide stable and reproducible builds, Go modules are used to pin the versions of source code dependencies to specific versions.

Go has included support for versioned modules as proposed [here](https://golang.org/design/24301-versioned-go) since `1.11`. The initial prototype `vgo` was [announced](https://research.swtch.com/vgo) in February 2018. In July 2018, versioned modules [landed](https://groups.google.com/d/msg/golang-dev/a5PqQuBljF4/61QK4JdtBgAJ) in the main Go repository. They are used by default by the go toolchain starting from version `1.13` .

You can read about Go modules here:

{% embed url="<https://github.com/golang/go/wiki/Modules>" %}

{% embed url="<https://blog.golang.org/using-go-modules>" %}

## Development Build

To install the command-line tool:

```
$ go build -o /usr/local/bin/net github.com/dreadl0ck/netcap/cmd
```

## Cross Compilation

To cross compile for other architectures, set the *GOARCH* and *GOOS* environment variables. For example to cross compile a binary for *linux amd64*:

```
$ GOARCH=amd64 GOOS=linux go build -o bin/net github.com/dreadl0ck/netcap/cmd
```

## Homebrew

On macOS, you can install the *netcap* command-line tool with Homebrew:

```
$ brew tap dreadl0ck/formulas
$ brew install netcap
```

## Buildsystem

*Netcap* uses the [zeus](https://github.com/dreadl0ck/zeus) build system, it can be found on GitHub along with installation instructions:

{% embed url="<https://github.com/dreadl0ck/zeus>" %}

To install the *Netcap* and *Netlabel* command-line tool and the library with zeus, run:

```
$ zeus install
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.netcap.io/master/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
