# Installation

## Go Get

Installation via go get:

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

## Development Build

To install the command-line tool:

```
$ go build -o $(go env GOPATH)/bin/netcap -i 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 netcap -i github.com/dreadl0ck/netcap/cmd
```

## Homebrew

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) buildsystem, it can be found on github along with installation instructions.

However, the project can easily be installed without zeus. All shell scripts needed for installation can be found in the *zeus/generated* directory as standalone versions:

```
zeus/generated/install-netcap.sh
zeus/generated/install-netlabel.sh
zeus/generated/install-sensor.sh
zeus/generated/install-server.sh
```

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

```
$ zeus install
```

## Tests

To execute the unit tests, run the following from the project root:

```
$ go test -v -bench=. ./...
```


---

# 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/v0.4.3/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.
