# Install grok with Homebrew, MacPorts

DRY and RAD for regular expressions and then some. Version 0.9.2 via Homebrew; verified 2026-06-25.

## Install

```sh
sudo av install brew:grok
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install grok
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install grok
```

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

## Package facts

- **Package key:** brew:grok
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/grok>
- **Version:** 0.9.2
- **Source summary:** DRY and RAD for regular expressions and then some
- **Homepage:** <https://github.com/jordansissel/grok>
- **Repository:** <https://github.com/jordansissel/grok>
- **Upstream docs:** <https://github.com/jordansissel/grok#readme>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/jordansissel/grok/archive/refs/tags/v0.9.2.tar.gz>
- **Last updated:** 2026-06-25T13:37:44+02:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- discogrok (cli)
- discogrok (alias)

## Dependencies

- libevent
- pcre
- tokyo-cabinet

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.9.2
- Package-manager updated: 2026-06-25
- Local data: ok
- Upstream repository: https://github.com/jordansissel/grok
- Upstream latest detected: v0.9.2 (current)
## Project history and usage

Jordan Sissel's grok is a small Unix-oriented log parsing tool that turns reusable regular-expression patterns into structured output.

### Project history

The project predates its GitHub repository through the semicomplete.com and Google Code era referenced from the repository metadata. Its manual page describes the command as software for parsing logs, handling events, and turning unstructured text into structured data.

The C implementation builds a `grok` command, `discogrok`, and a shared library. Its pattern-file model lets users name regular expressions once and compose them in match blocks instead of repeating long PCRE expressions across log-processing configurations.

### Adoption history

The standalone package remained a niche command-line tool, but the grok pattern idea became culturally important in log processing. Similar pattern syntax appears in widely used log pipelines and observability products, while the original package stayed available through package managers such as Homebrew and MacPorts.

### How it is used

A typical invocation points `grok` at a configuration file with `-f`. Configurations declare inputs such as files or command output, define match blocks, and emit reactions such as the original line, captured fields, JSON, or shell-command input.

### Why package nerds care

For package nerds, the appeal is the old-school Unix shape: a C command, PCRE-backed named patterns, installable pattern files, and log parsing without pulling in a larger log-ingestion stack.

### Timeline

- 2011: The GitHub repository was created and release tags from the 2011 series were published.
- 2012: Homebrew and other package ecosystems carried the standalone tool during the early 2010s log-processing boom.
- 2020s: The original project persisted as a niche packaged utility while grok-style patterns became common in larger logging systems.

### Related projects

- Related projects include Jordan Sissel's Ruby grok implementation, Logstash-style grok filters, and observability tools that use named pattern matching for unstructured logs.
- It is also adjacent to traditional text-processing tools such as grep, awk, sed, and PCRE-based command-line filters.

### Sources

- <https://api.github.com/repos/jordansissel/grok>
- <https://api.github.com/repos/jordansissel/grok/tags>
- <https://github.com/jordansissel/grok>
- <https://github.com/jordansissel/grok/blob/master/grok.pod>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- MacPorts - grok: normalized package name match | MacPorts ports tree: sysutils/grok/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [libevent](https://www.automicvault.com/pkg/brew/libevent/) - Runtime dependency declared by Homebrew.
- [pcre](https://www.automicvault.com/pkg/brew/pcre/) - Runtime dependency declared by Homebrew.
- [tokyo-cabinet](https://www.automicvault.com/pkg/brew/tokyo-cabinet/) - Runtime dependency declared by Homebrew.
- [rgxg](https://www.automicvault.com/pkg/brew/rgxg/) - Shares av.db curated category or tags: cli, developer-tools, regular-expressions, text-processing.
- [grep](https://www.automicvault.com/pkg/brew/grep/) - Shares av.db curated category or tags: cli, developer-tools, regular-expressions, text-processing.
- [onigmo](https://www.automicvault.com/pkg/brew/onigmo/) - Shares av.db curated category or tags: cli, developer-tools, regular-expressions, text-processing.
- [oniguruma](https://www.automicvault.com/pkg/brew/oniguruma/) - Shares av.db curated category or tags: cli, developer-tools, regular-expressions, text-processing.
- [ssed](https://www.automicvault.com/pkg/brew/ssed/) - Shares av.db curated category or tags: cli, developer-tools, regular-expressions, text-processing.
- [align](https://www.automicvault.com/pkg/brew/align/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [bsdconv](https://www.automicvault.com/pkg/brew/bsdconv/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [cconv](https://www.automicvault.com/pkg/brew/cconv/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.

## Combined YAML source

View the package source record on GitHub. [combined/grok.yml](https://github.com/automic-vault/db/blob/main/combined/grok.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
