# ktfmt を Homebrew, Nix でインストール

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

## インストール

```sh
sudo av install brew:ktfmt
```

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

### macOS

- Homebrew (100%):

```sh
brew install ktfmt
```

  証拠: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ktfmt
```

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

## パッケージ情報

- **パッケージキー:** brew:ktfmt
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/ktfmt>
- **バージョン:** 0.64
- **ソース概要:** Kotlin code formatter
- **ホームページ:** <https://facebook.github.io/ktfmt/>
- **リポジトリ:** <https://github.com/facebook/ktfmt>
- **上流ドキュメント:** <https://facebook.github.io/ktfmt/>
- **ライセンス:** Apache-2.0
- **ソースアーカイブ:** <https://github.com/facebook/ktfmt/archive/refs/tags/v0.64.tar.gz>
- **最終更新:** 2026-06-24T03:35:16Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- ktfmt (cli)
- ktfmt (エイリアス)

## 依存関係

- openjdk@17

## ビルド依存関係

- gradle

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 0.64
- マネージャ更新日: 2026-06-24
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/facebook/ktfmt
- 検出された最新: v0.64 (最新)
## プロジェクトの歴史と使われ方

ktfmt is Meta's Kotlin formatter, built to pretty-print Kotlin code deterministically and with minimal style choice. The project describes itself as based on google-java-format and intentionally non-customizable to promote consistency.

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

The repository README describes ktfmt as a formatter that reformats Kotlin source code and compares its output with ktlint and IntelliJ formatting. Its website emphasizes that the same input always receives the same output, regardless of initial layout, so developers can avoid style debates.

### 採用の歴史

ktfmt is consumed both as a command-line jar and through integrations: a JetBrains IDE plugin, Gradle and Maven examples, Spotless integration, Maven Central artifacts, and Homebrew packaging. That puts it in the same culture as gofmt and google-java-format, where a formatter's value is partly social: teams agree to stop arguing about layout.

### 使われ方

Users run ktfmt from the command line, through build tooling, through Spotless, or through the IntelliJ and Android Studio plugin. The README documents editorconfig use for approximating ktfmt behavior in IDE editing and command-line options for whole-file or partial formatting.

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

ktfmt matters to package people because it packages style as an executable policy. It is a Kotlin example of formatter distribution via Maven Central, IDE plugins, build plugins, jars, and Homebrew, with very little configuration surface by design.

### タイムライン

- 2024-10-30: The v0.53 tag was published in the GitHub tag history.
- 2025-06-25: The v0.56 tag was published in the GitHub tag history.
- 2026-03-17: The v0.62 tag was published in the GitHub tag history.
- 2026-06-24: Release 0.64 was published on GitHub.

### Related projects

- Related projects include google-java-format, ktlint, IntelliJ IDEA formatting, Android Studio, Spotless, Gradle, Maven, and Kotlin coding conventions.

### ソース

- <https://facebook.github.io/ktfmt/>
- <https://github.com/facebook/ktfmt>
- <https://github.com/facebook/ktfmt/releases>
- <https://github.com/facebook/ktfmt/tags>


## セキュリティノート

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
## ソースデータベース詳細

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

## 他のパッケージマネージャ記録

- Nix - ktfmt: normalized package name match | nixpkgs package indexes: pkgs/by-name/kt/ktfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [openjdk@17](https://pkg.so/ja/brew/openjdk-17/) - Runtime dependency declared by Homebrew.
- [gradle](https://pkg.so/ja/brew/gradle/) - Build dependency declared by Homebrew.
- [scalariform](https://pkg.so/ja/brew/scalariform/) - Shares pkgdb curated category or tags: cli, code-formatting, code-style, developer-tools, formatter.
- [ktlint](https://pkg.so/ja/brew/ktlint/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, kotlin.
- [prettier](https://pkg.so/ja/brew/prettier/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [prettierd](https://pkg.so/ja/brew/prettierd/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [ormolu](https://pkg.so/ja/brew/ormolu/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [detekt](https://pkg.so/ja/brew/detekt/) - Shares pkgdb curated category or tags: cli, developer-tools, kotlin.
- [findent](https://pkg.so/ja/brew/findent/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [perltidy](https://pkg.so/ja/brew/perltidy/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [cljfmt](https://pkg.so/ja/brew/cljfmt/) - Local package facts share a topical domain. Shared terms: cli, code, code-style, developer, developer-tools.
- [darker](https://pkg.so/ja/brew/darker/) - Local package facts share a topical domain. Shared terms: cli, code, code-formatting, developer, developer-tools.

## Combined YAML source

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


## ソース

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