# ktlint mit Homebrew, MacPorts, Nix, pacman, scoop installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für ktlint in AI-Agent-Workflows.

## Installation

```sh
sudo av install brew:ktlint
```

Weitere Installationsbefehle:

### macOS

- Homebrew (100%):

```sh
brew install ktlint
```

  Evidenz: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ktlint
```

  Evidenz: MacPorts ports tree: devel/ktlint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ktlint
```

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

- pacman (92%):

```sh
sudo pacman -S ktlint
```

  Evidenz: Arch Linux sync databases: ktlint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/ktlint
```

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

## Paketfakten

- **Paketschlüssel:** brew:ktlint
- **Paketmanager:** Homebrew
- **Version:** 1.8.0
- **Quellzusammenfassung:** Anti-bikeshedding Kotlin linter with built-in formatter
- **Homepage:** <https://ktlint.github.io/>
- **Repository:** <https://github.com/ktlint/ktlint>
- **Zuletzt aktualisiert:** 2026-07-04T16:53:43+09:00
- **Generiert:** 2026-08-03T19:37:03+00:00

## Executables

- ktlint (Alias)

## Installationsverhalten

- Bottle: nicht verfügbar

## Version und Aktualität

- Seite generiert: 2026-08-03
- Manager-Version: 1.8.0
## Projektgeschichte und Nutzung

ktlint is an anti-bikeshedding Kotlin linter with a built-in formatter. Its docs describe it as a Kotlin linter in the spirit of JavaScript Standard Style and gofmt: low setup, conventional defaults, and automatic formatting when possible.

### Projektgeschichte

The documentation copyright trail records Stanley Shyiko's original 2016-2019 authorship and Pinterest's 2019 stewardship. The repository later moved from the pinterest namespace to the ktlint organization on GitHub, while the Homebrew package still records the historical pinterest/ktlint repository URL.

### Adoptionsgeschichte

ktlint gained adoption by combining a CLI jar, Maven/Gradle integrations, reporters, custom rule sets, .editorconfig support, and package-manager distribution. Its docs emphasize no-configuration defaults, Kotlin coding conventions, Android Kotlin Style Guide alignment, and extensibility for organizations that need custom checks.

### Wie es verwendet wird

Users run ktlint to scan .kt and .kts files, optionally with --format or -F to autocorrect violations. Teams commonly add it to build pipelines, pre-commit hooks, editor workflows, or Gradle/Maven tasks, with .editorconfig and baseline files used when defaults need project-level adjustment.

### Warum Paket-Nerds sich dafür interessieren

ktlint is significant because it became the Kotlin ecosystem's canonical packaged linter/formatter pair: one executable jar, common default rules, multiple reporters, custom rulesets, and enough integration points to make style enforcement portable across editors, CI, and package managers.

### Zeitleiste

- 2016: The docs copyright trail begins Stanley Shyiko's authorship period.
- 2019: Pinterest stewardship appears in the docs copyright trail.
- 2024-12-04: Tag 1.5.0 was published in the GitHub tag history.
- 2025-11-14: Release 1.8.0 was published on GitHub.

### Related projects

- Related projects include Kotlin coding conventions, Android Kotlin Style Guide, gofmt, JavaScript Standard Style, ktfmt, Gradle, Maven, and .editorconfig.

### Quellen

- <https://github.com/ktlint/ktlint>
- <https://github.com/ktlint/ktlint/releases>
- <https://github.com/pinterest/ktlint/tags>
- <https://pinterest.github.io/ktlint/latest/>


## Sicherheitshinweise

narrow executable package without higher-risk signals.

- **Geiger-Risiko:** grün / niedrig
- 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: .editorconfig, ktlint-baseline.xml
## Andere Paketmanager-Einträge

- Nix - ktlint: normalized package name match | nixpkgs package indexes: pkgs/by-name/kt/ktlint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - ktlint - 1.8.0-1: normalized package name match | Arch Linux sync databases: ktlint from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | An anti-bikeshedding Kotlin linter with built-in formatter | https://ktlint.github.io/
- MacPorts - ktlint: normalized package name match | MacPorts ports tree: devel/ktlint/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/ktlint: normalized package name match | Scoop official bucket manifest trees: bucket/ktlint.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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


## Quellen

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
