# Install goawk with Homebrew, apk, apt, MacPorts, Nix

POSIX-compliant AWK interpreter written in Go. Version 1.31.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:goawk
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install goawk
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install goawk
```

  Evidence: MacPorts ports tree: lang/goawk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add goawk
```

  Evidence: Alpine Linux edge package indexes: goawk from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install goawk
```

  Evidence: Debian stable package indexes: goawk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#goawk
```

  Evidence: nixpkgs package indexes: pkgs/by-name/go/goawk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:goawk
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/goawk>
- **Version:** 1.31.0
- **Source summary:** POSIX-compliant AWK interpreter written in Go
- **Homepage:** <https://benhoyt.com/writings/goawk/>
- **Repository:** <https://github.com/benhoyt/goawk>
- **Upstream docs:** <https://github.com/benhoyt/goawk#readme>
- **License:** MIT
- **Source archive:** <https://github.com/benhoyt/goawk/archive/refs/tags/v1.31.0.tar.gz>
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- goawk (cli)
- goawk (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 1.31.0
- Local data: ok
- Upstream repository: https://github.com/benhoyt/goawk
- Upstream latest detected: v1.31.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

GoAWK is Ben Hoyt's POSIX-compatible AWK interpreter written in Go, with command-line and embeddable library use cases. It began as a compact interpreter inspired by The AWK Programming Language and later grew CSV/TSV support, a bytecode virtual machine, code coverage, and an experimental AWK-to-Go compiler.

### Project history

The repository was created in June 2018, and the author's November 2018 article described GoAWK as an AWK interpreter written in Go, explaining its lexer, parser, resolver, tree-walking interpreter, testing, and performance work. The README says it is feature-complete and tested against the one true AWK and GNU AWK test suites.

GoAWK moved beyond the original tree-walking interpreter in the v1.15 era, when it switched to a bytecode compiler and virtual machine for better performance. In May 2022, the author added native CSV and TSV support, including CSV input/output modes and named fields, while keeping the project POSIX-compatible.

The project continued to add package-nerd features that ordinary awk implementations rarely expose, including embeddable Go APIs, code coverage support in v1.21.0, and the experimental AWKGo compiler.

### Adoption history

GoAWK is adopted as both a standalone awk-compatible command and an embeddable Go package. The README notes use in the Redpanda Connect stream processor and by the software team at the library of the University of Antwerp, the latter also sponsoring CSV work.

Distribution through Go modules, release binaries, Homebrew, Debian, MacPorts, Nix, and other package managers makes GoAWK a portable AWK option for users who want POSIX behavior, CSV-aware one-liners, or an AWK engine inside Go programs.

### How it is used

As a CLI, GoAWK accepts ordinary awk programs and files, can be installed with go install, and supports CSV/TSV processing with -i and -o modes. As a library, Go programs can parse and execute AWK programs directly, reuse parsed programs, and configure interpreter behavior.

### Why package nerds care

GoAWK matters because it connects two package cultures: the old Unix text-processing tradition of awk one-liners and the modern Go preference for single static binaries and embeddable packages. It is a practical example of reimplementing a standard Unix language with Go's parser, module, testing, and distribution ecosystem.

Its CSV support is especially notable because classic awk field splitting is convenient but not CSV-safe. GoAWK gives package users a drop-in-ish awk command that handles real CSV and TSV data while still aiming at POSIX AWK compatibility.

### Timeline

- 2018: The GoAWK repository was created and v1.0.0 was tagged.
- 2018: The author published the original GoAWK design and performance article.
- 2022: GoAWK adopted a bytecode compiler and virtual machine around the v1.15 release.
- 2022: GoAWK added native CSV and TSV support.
- 2022: GoAWK v1.21.0 added code coverage support.
- 2025: GoAWK v1.31.0 was tagged with minor fixes and a minimum Go version update.

### Related projects

- GoAWK is related to AWK, BWK awk, GNU Awk, POSIX awk, Redpanda Connect, the Go module ecosystem, and AWKGo, the experimental AWK-to-Go compiler included in the repository.

### Sources

- <https://benhoyt.com/writings/goawk-compiler-vm/>
- <https://benhoyt.com/writings/goawk-coverage/>
- <https://benhoyt.com/writings/goawk-csv/>
- <https://benhoyt.com/writings/goawk/>
- <https://github.com/benhoyt/goawk>
- <https://raw.githubusercontent.com/benhoyt/goawk/master/README.md>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** goawk
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - goawk - 1.29.0-1: normalized package name match | Debian stable package indexes: goawk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | POSIX-compliant AWK interpreter written in Go, with CSV support (program) | https://github.com/benhoyt/goawk
- Debian apt - golang-github-benhoyt-goawk-dev - 1.29.0-1: normalized package name match | Debian stable package indexes: golang-github-benhoyt-goawk-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | POSIX-compliant AWK interpreter written in Go, with CSV support (library) | https://github.com/benhoyt/goawk
- Nix - goawk: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/goawk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - goawk - 1.30.1-r6: normalized package name match | Alpine Linux edge package indexes: goawk from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | POSIX-compliant AWK interpreter written in Go | https://github.com/benhoyt/goawk
- apk - goawk-doc - 1.30.1-r6: normalized package name match | Alpine Linux edge package indexes: goawk-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | POSIX-compliant AWK interpreter written in Go (documentation) | https://github.com/benhoyt/goawk
- MacPorts - goawk: normalized package name match | MacPorts ports tree: lang/goawk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [mawk](https://www.automicvault.com/pkg/brew/mawk/) - Shares av.db curated category or tags: awk, cli, interpreter, language-runtime.
- [brainfuck](https://www.automicvault.com/pkg/brew/brainfuck/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.
- [cling](https://www.automicvault.com/pkg/brew/cling/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.
- [picoc](https://www.automicvault.com/pkg/brew/picoc/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.
- [rustpython](https://www.automicvault.com/pkg/brew/rustpython/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.
- [wasm3](https://www.automicvault.com/pkg/brew/wasm3/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.
- [yaegi](https://www.automicvault.com/pkg/brew/yaegi/) - Shares av.db curated category or tags: cli, go, interpreter, language-runtime.
- [abcl](https://www.automicvault.com/pkg/brew/abcl/) - Shares av.db curated category or tags: cli, interpreter, language-runtime.

## Combined YAML source

View the package source record on GitHub. [combined/goawk.yml](https://github.com/automic-vault/db/blob/main/combined/goawk.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
