# Install ktlint with Homebrew, MacPorts, Nix, pacman, scoop

Anti-bikeshedding Kotlin linter with built-in formatter. Version 1.8.0 via Homebrew; verified 2026-07-04.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ktlint
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ktlint
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:ktlint
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ktlint>
- **Version:** 1.8.0
- **Source summary:** Anti-bikeshedding Kotlin linter with built-in formatter
- **Homepage:** <https://ktlint.github.io/>
- **Repository:** <https://github.com/ktlint/ktlint>
- **Upstream docs:** <https://pinterest.github.io/ktlint/latest>
- **License:** MIT
- **Source archive:** <https://github.com/ktlint/ktlint/releases/download/1.8.0/ktlint-1.8.0.zip>
- **Last updated:** 2026-07-04T16:53:43+09:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ktlint (cli)
- ktlint (alias)

## Dependencies

- openjdk

## Install behavior

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

## Freshness

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

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


## 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: .editorconfig, ktlint-baseline.xml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ktlint
- **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 - 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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [detekt](https://www.automicvault.com/pkg/brew/detekt/) - Shares av.db curated category or tags: cli, developer-tools, kotlin, static-analysis.
- [dscanner](https://www.automicvault.com/pkg/brew/dscanner/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [errcheck](https://www.automicvault.com/pkg/brew/errcheck/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [eslint](https://www.automicvault.com/pkg/brew/eslint/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [fortitude](https://www.automicvault.com/pkg/brew/fortitude/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [go-critic](https://www.automicvault.com/pkg/brew/go-critic/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [ktfmt](https://www.automicvault.com/pkg/brew/ktfmt/) - Shares av.db curated category or tags: cli, developer-tools, formatter, kotlin.
- [kube-linter](https://www.automicvault.com/pkg/brew/kube-linter/) - Shares av.db curated category or tags: cli, developer-tools, linter, static-analysis.
- [pmd](https://www.automicvault.com/pkg/brew/pmd/) - Local package facts share a topical domain. Shared terms: analysis, cli, developer, developer-tools, linter.
- [spotbugs](https://www.automicvault.com/pkg/brew/spotbugs/) - Local package facts share a topical domain. Shared terms: analysis, cli, developer, developer-tools, linter.

## Combined YAML source

View the package source record on GitHub. [combined/ktlint.yml](https://github.com/automic-vault/db/blob/main/combined/ktlint.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
