# 使用 Homebrew 安装 gocloc

查看 gocloc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gocloc
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:gocloc
- **软件包管理器:** Homebrew
- **版本:** 0.7.0
- **来源摘要:** Little fast LoC counter
- **主页:** <https://github.com/hhatto/gocloc>
- **仓库:** <https://github.com/hhatto/gocloc>
- **最后更新:** 2026-07-25T20:55:24-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gocloc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.7.0
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

- 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.

### 来源

- <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>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Combined YAML source

View the package source record on GitHub. [combined/gocloc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gocloc.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
