# Install gocloc with Homebrew

Little fast LoC counter. Version 0.7.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:gocloc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gocloc
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:gocloc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gocloc>
- **Version:** 0.7.0
- **Source summary:** Little fast LoC counter
- **Homepage:** <https://github.com/hhatto/gocloc>
- **Repository:** <https://github.com/hhatto/gocloc>
- **Upstream docs:** <https://github.com/hhatto/gocloc#readme>
- **License:** MIT
- **Source archive:** <https://github.com/hhatto/gocloc/archive/refs/tags/v0.7.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gocloc (cli)
- gocloc (alias)

## Build dependencies

- go

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.7.0
- Local data: ok
- Upstream repository: https://github.com/hhatto/gocloc
- Upstream latest detected: v0.7.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

gocloc is a Go implementation of a source-code line counter, inspired by cloc and tokei. It reports file, blank, comment, and code counts by language, with CLI and container workflows.

### Project history

The public repository was created in April 2016. The README describes the project as a little fast cloc-style counter written in Go and explicitly cites tokei as an inspiration. GitHub release records show the v0.2.1 release in March 2019 and later 0.x releases through the 2020s.

### Adoption history

gocloc is packaged for Homebrew and is also documented for AUR installation in the README. Its packaging profile is typical of developer metrics tools: small binary, no service, useful in local repositories and CI jobs.

### How it is used

Users run gocloc against a directory to print per-language totals, request supported languages with --show-lang, or run it through Docker. The README also documents Jenkins/SLOCCount-oriented output workflows, making it useful both at the terminal and in reporting pipelines.

### Why package nerds care

The package is interesting as part of the lineage from cloc to newer compiled counters such as tokei and gocloc. For package managers, it is a low-friction developer-tool formula: install one executable and use it across repositories without managing a Perl or Rust toolchain at runtime.

### Timeline

- 2016-04-01: Public GitHub repository created
- 2019-03-02: v0.2.1 release published
- 2021-02-19: v0.4.0 release published
- 2023-05-06: v0.5.0 release published
- 2025-03-24: v0.7.0 release published

### Related projects

- cloc is the predecessor-style tool named in the README.
- tokei is explicitly cited by gocloc as an inspiration.
- SLOCCount appears in the README's Jenkins integration workflow.

### Sources

- <https://api.github.com/repos/hhatto/gocloc>
- <https://api.github.com/repos/hhatto/gocloc/releases?per_page=100>
- <https://formulae.brew.sh/formula/gocloc>
- <https://github.com/hhatto/gocloc>


## 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:** gocloc
- **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


## 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.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [gnu-complexity](https://www.automicvault.com/pkg/brew/gnu-complexity/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools, metrics.
- [lizard-analyzer](https://www.automicvault.com/pkg/brew/lizard-analyzer/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools, metrics.
- [ohcount](https://www.automicvault.com/pkg/brew/ohcount/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools, metrics.
- [pmccabe](https://www.automicvault.com/pkg/brew/pmccabe/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [tokei](https://www.automicvault.com/pkg/brew/tokei/) - Shares av.db curated category or tags: cli, code-analysis, code-metrics, developer-tools.
- [cargo-llvm-lines](https://www.automicvault.com/pkg/brew/cargo-llvm-lines/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.
- [castxml](https://www.automicvault.com/pkg/brew/castxml/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.
- [ccheck](https://www.automicvault.com/pkg/brew/ccheck/) - Shares av.db curated category or tags: cli, code-analysis, developer-tools.

## Combined YAML source

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