# ktlint を Homebrew, MacPorts, Nix, pacman, scoop でインストール

ktlint のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install ktlint
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ktlint
```

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

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

## パッケージ情報

- **パッケージキー:** brew:ktlint
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.8.0
- **ソース概要:** Anti-bikeshedding Kotlin linter with built-in formatter
- **ホームページ:** <https://ktlint.github.io/>
- **リポジトリ:** <https://github.com/ktlint/ktlint>
- **最終更新:** 2026-07-04T16:53:43+09:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- ktlint (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.8.0
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

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

### ソース

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


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- 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
## 他のパッケージマネージャ記録

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


## ソース

- 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
