Automic VaultAutomic Vault

brew

使用 Homebrew, apt, Nix, pacman 安装 mdformat

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install mdformat

local Homebrew formula metadata

Linux

Debian apt已验证 · 92%
sudo apt install mdformat

Debian stable package indexes · mdformat · 来源: deb.debian.org

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

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

Arch Linux pacman已验证 · 92%
sudo pacman -S mdformat

Arch Linux sync databases · mdformat · 来源: geo.mirror.pkgbuild.com

概览

软件包摘要

CommonMark compliant Markdown formatter

命令和别名

  • mdformat

历史

项目历史与用法

mdformat is an opinionated CommonMark-compliant Markdown formatter available as both a Unix-style command-line tool and a Python library. It formats Markdown documents in place, checks formatting in CI, and exposes plugin hooks for parser extensions and code-block formatting.

项目历史

The project was published to PyPI in July 2020 as version 0.1.0 and is developed in the hukkin/mdformat GitHub repository. Its README describes the core pitch as enforcing a consistent Markdown style while preserving CommonMark-rendered output.

The changelog shows steady maturation of the 0.7 series: configuration in `.mdformat.toml` arrived in 0.7.10, plugin interfaces evolved in 0.7.19, and version 1.0.0 later removed older Python support, added markdown-it-py v4 support, and added CommonMark 0.31.2 support.

采用历史

mdformat's adoption is tied to Python packaging and automated formatting workflows. Its official docs show installation with pipx, Python API use, and use as a pre-commit hook by referencing the GitHub repository and pinning a revision.

The plugin docs document a broader ecosystem of mdformat-* packages for GitHub Flavored Markdown, MyST, front matter, table-of-contents generation, code-block formatting with Black, shfmt, gofmt, rustfmt, and related tools. The input facts list availability in Homebrew, Debian, Nix, and Arch-style packaging.

使用方式

Common CLI usage is `mdformat README.md CHANGELOG.md`, `mdformat .` for recursive formatting, `mdformat -` for standard input, and `mdformat --check` in CI. The tool also exposes a Python API through `mdformat.text()` and `mdformat.file()`.

Configuration is resolved from a TOML file named `.mdformat.toml`, searched upward from the formatted file or from the current working directory for standard input. Command-line arguments take precedence over configuration values.

为什么软件包爱好者会关心

mdformat is a useful package-history marker for the shift from Markdown rendering tools to Markdown style enforcement. It fills a similar cultural role for Markdown that Black filled for Python: fewer formatting arguments, more reproducible diffs.

Its plugin model matters to packagers because optional behavior is split across separately distributed Python packages. That keeps the core package small but makes environment composition important for users who need GFM, MyST, front matter, or code-block formatters.

时间线

  • 2020: Version 0.1.0 published to PyPI.
  • 2021: Version 0.7.10 added `.mdformat.toml` configuration.
  • 2025: Version 1.0.0 published with Python support and CommonMark updates.
  • 2026: Homebrew formula tracked stable version 1.0.0.

Related projects

  • The README explicitly compares mdformat with Prettier for Markdown formatting and discusses CommonMark-focused behavior.
  • The plugin ecosystem includes mdformat-gfm, mdformat-black, mdformat-toc, mdformat-myst, mdformat-frontmatter, and other official-doc-listed extensions.

安全态势

风险级别:绿色

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 元数据适用于 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
.mdformat.toml

可执行文件

已安装的可执行文件

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

新鲜度

版本和新鲜度

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

页面生成时间2026-07-25
管理器版本1.0.0
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://mdformat.readthedocs.io/en/stable/

安装元数据

软件包元数据

软件包键brew:mdformat
版本1.0.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/mdformat
主页https://mdformat.readthedocs.io/en/stable/
仓库https://github.com/hukkin/mdformat
上游文档https://mdformat.readthedocs.io/en/stable
许可证MIT
源码归档https://files.pythonhosted.org/packages/3f/05/32b5e14b192b0a8a309f32232c580aefedd9d06017cb8fe8fce34bec654c/mdformat-1.0.0.tar.gz
依赖python@3.14
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

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

源数据库匹配

其他软件包管理器记录

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

Debian apt95%

mdformat 0.7.22-1

CommonMark compliant Markdown formatter

sudo apt install mdformat
  • Section: python
  • Architecture: all
  • 5 依赖
  • normalized package name match
  • 匹配方式:Mdformat
Debian stable package indexes · deb.debian.org · Debian stable package indexes: mdformat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

mdformat

nix profile install nixpkgs#mdformat
  • normalized package name match
  • 匹配方式:Mdformat
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/md/mdformat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
pacman95%

mdformat 1.0.0-2

CommonMark compliant Markdown formatter

https://github.com/hukkin/mdformat

sudo pacman -S mdformat
  • License: MIT
  • Architecture: any
  • 1 依赖
  • normalized package name match
  • 匹配方式:Mdformat
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: mdformat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

来源线索

由仓库数据生成

此页面由 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