# Installer loc avec Homebrew

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de loc pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:loc
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install loc
```

  Preuve: local Homebrew formula metadata

## Faits du paquet

- **Clé du paquet:** brew:loc
- **Gestionnaire de paquets:** Homebrew
- **Version:** 0.4.1
- **Résumé source:** Count lines of code quickly
- **Page d'accueil:** <https://github.com/cgag/loc>
- **Dépôt:** <https://github.com/cgag/loc>
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- loc (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 0.4.1
## Historique du projet et usages

loc is a Rust command-line tool for quickly counting lines of code. Its README describes it as a Rust implementation of cloc focused on speed, reporting file, line, blank, comment, and code counts by language.

### Historique du projet

The cgag/loc GitHub repository was created in July 2016. The README positions loc directly against cloc and tokei, with old benchmark examples showing loc as much faster on large source trees, while also warning readers that tokei may be smarter or more accurate for some cases.

### Historique d'adoption

loc's adoption is concentrated among developers who want a fast one-shot codebase counter and are comfortable with Rust-built CLI tools. Official evidence points to GitHub interest, release binaries, cargo install, and a Homebrew package rather than a large ecosystem of integrations.

### Modes d'utilisation

By default, loc counts the current directory or a target path and prints a language table with files, total lines, blank lines, comments, and code. It is used for quick repository sizing, comparing implementation-language mix, and sanity-checking source tree growth.

### Pourquoi les passionnés de paquets s'y intéressent

loc is significant in the package-manager catalog as part of the Rust rewrite wave of classic Unix developer tools: a narrow utility, fast startup, static-ish binaries, and simple install paths through cargo or Homebrew. Its README also records the healthy package-nerd humility of pointing users at tokei when accuracy matters more than raw speed.

### Chronologie

- 2016: The cgag/loc repository is created.
- 2018: README note points users to tokei as a smarter and more accurate related Rust counter.
- 2020s: loc remains available through Homebrew and source/release installation paths.

### Related projects

- cloc is the older Perl tool that loc explicitly reimplements for speed.
- tokei is the related Rust code-counting tool that loc compares against and recommends checking for accuracy-sensitive work.

### Sources

- <https://api.github.com/repos/cgag/loc>
- <https://github.com/cgag/loc>
- source_facts.package-manager


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals


## Combined YAML source

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


## Sources

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