Automic VaultAutomic Vault

brew

Install ktfmt with Homebrew, Nix

Kotlin code formatter. Version 0.64 via Homebrew; verified 2026-06-24.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install ktfmt

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#ktfmt

nixpkgs package indexes · pkgs/by-name/kt/ktfmt/package.nix · source: api.github.com

overview

Package summary

Kotlin code formatter

Commands and aliases

  • ktfmt

history

Project history and usage

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.

Project history

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.

Adoption history

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.

How it is used

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.

Why package nerds care

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.

Timeline

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

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Installs with 1 runtime dependencies.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

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

Config paths the tool may read or write during local use.

Unix
.editorconfig

executables

Installed executables

CommandKindExposureNote
ktfmtcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.64
manager updated2026-06-24
local dataok
upstreamcurrent
latest detectedv0.64

https://github.com/facebook/ktfmt

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:ktfmt
Version0.64
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/ktfmt
Homepagehttps://facebook.github.io/ktfmt/
Repositoryhttps://github.com/facebook/ktfmt
Upstream docshttps://facebook.github.io/ktfmt
LicenseApache-2.0
Source archivehttps://github.com/facebook/ktfmt/archive/refs/tags/v0.64.tar.gz
Last updated2026-06-24T03:35:16Z
Pulseupdated
Dependenciesopenjdk@17
Build dependenciesgradle
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namektfmt
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

ktfmt

nix profile install nixpkgs#ktfmt
  • normalized package name match
  • Matched by: Ktfmt
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/kt/ktfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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