Automic VaultAutomic Vault

brew

使用 Homebrew, Nix 安装 ktfmt

查看 ktfmt 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install ktfmt

local Homebrew formula metadata

Linux

Nix已验证 · 92%
nix profile install nixpkgs#ktfmt

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

概览

软件包摘要

Kotlin code formatter

命令和别名

  • ktfmt

历史

项目历史与用法

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.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
ktfmtcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本0.64
管理器更新时间2026-06-24
本地数据OK
上游当前
检测到的最新版本v0.64

https://github.com/facebook/ktfmt

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:ktfmt
版本0.64
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/ktfmt
主页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
Pulseupdated
依赖openjdk@17
构建依赖gradle
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

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

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

ktfmt

nix profile install nixpkgs#ktfmt
  • normalized package name match
  • 匹配方式: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

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • 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