# Install detekt with Homebrew, Nix, scoop

Static code analysis for Kotlin. Version 1.23.8 via Homebrew; verified 2026-06-15.

## Install

```sh
sudo av install brew:detekt
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install detekt
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#detekt
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/detekt
```

  Evidence: Scoop official bucket manifest trees: bucket/detekt.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:detekt
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/detekt>
- **Version:** 1.23.8
- **Source summary:** Static code analysis for Kotlin
- **Homepage:** <https://detekt.dev>
- **Repository:** <https://github.com/detekt/detekt>
- **Upstream docs:** <https://detekt.dev/>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/detekt/detekt/releases/download/v1.23.8/detekt-cli-1.23.8-all.jar>
- **Last updated:** 2026-06-15T10:20:15-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- detekt (cli)
- detekt (alias)

## Dependencies

- openjdk@21

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.23.8
- Package-manager updated: 2026-06-15
- Local data: ok
- Upstream repository: https://github.com/detekt/detekt
- info: No cached GitHub release or tag data was available.
## Project history and usage

detekt is a static-analysis and linting tool for Kotlin. Its official README describes code smell analysis, configurable rule sets, baselines for legacy projects, multiple report formats, Gradle integration, and extension points for custom rules and reports.

### Project history

The detekt GitHub repository was created in October 2016. Early release tags used milestone and release-candidate names, while the modern project documents stable 1.x releases and 2.0.0 alpha documentation on detekt.dev.

### Adoption history

detekt grew with Kotlin's move from Android-focused adoption into broader JVM and multiplatform use. Its README highlights Maven Central, the Gradle plugin, third-party plugins, IDE and CI integrations, SARIF output for code scanning, and a marketplace for custom rules.

### How it is used

Package users typically install the CLI jar, Homebrew formula, or Gradle plugin, then point detekt at Kotlin sources with a YAML config and optional baseline XML. In Gradle builds, teams commonly configure reports such as HTML, Checkstyle XML, SARIF, and Markdown.

### Why package nerds care

detekt matters in package-manager culture because it is one of the canonical Kotlin quality gates: language-specific, rule-driven, CI-friendly, and packaged across CLI, Maven Central, Gradle, Homebrew, Scoop, and Nix-style workflows.

### Timeline

- 2016: GitHub repository created for detekt/detekt.
- 2018: Release-candidate era visible in official GitHub releases.
- 2023: detekt 1.23.0 added the experimental detekt compiler plugin and expanded rule coverage.
- 2025: detekt 1.23.8 shipped as a point release with Kotlin 2.0.21 support.

### Related projects

- The official README names Kotlin, Gradle, ktlint, PMD, Checkstyle, SARIF, SonarQube, Codacy, and third-party detekt plugins as nearby tools and integration surfaces.

### Sources

- <https://github.com/detekt/detekt>
- <https://github.com/detekt/detekt/blob/main/README.md>
- <https://detekt.dev/changelog>
- <https://api.github.com/repos/detekt/detekt>


## Security Notes

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: config/detekt/detekt.yml, config/detekt/baseline.xml
## Source Database Details

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

## Other Package-Manager Records

- Nix - detekt: normalized package name match | nixpkgs package indexes: pkgs/by-name/de/detekt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/detekt: normalized package name match | Scoop official bucket manifest trees: bucket/detekt.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openjdk@21](https://www.automicvault.com/pkg/brew/openjdk-21/) - Runtime dependency declared by Homebrew.
- [ktlint](https://www.automicvault.com/pkg/brew/ktlint/) - Shares av.db curated category or tags: cli, developer-tools, kotlin, static-analysis.
- [checkstyle](https://www.automicvault.com/pkg/brew/checkstyle/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [credo](https://www.automicvault.com/pkg/brew/credo/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [hlint](https://www.automicvault.com/pkg/brew/hlint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [wartremover](https://www.automicvault.com/pkg/brew/wartremover/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, linting, static-analysis.
- [datadog-static-analyzer](https://www.automicvault.com/pkg/brew/datadog-static-analyzer/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [eslint](https://www.automicvault.com/pkg/brew/eslint/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [globstar](https://www.automicvault.com/pkg/brew/globstar/) - Shares av.db curated category or tags: cli, code-quality, developer-tools, static-analysis.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- 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
