# 使用 Homebrew, Nix 安装 smlfmt

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

## 安装

```sh
sudo av install brew:smlfmt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install smlfmt
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#smlfmt
```

  证据: nixpkgs package indexes: pkgs/by-name/sm/smlfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:smlfmt
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/smlfmt>
- **版本:** 1.3.0
- **来源摘要:** Custom parser and code formatter for Standard ML
- **主页:** <https://github.com/shwestrick/smlfmt>
- **仓库:** <https://github.com/shwestrick/smlfmt>
- **许可证:** MIT
- **源码归档:** <https://github.com/shwestrick/smlfmt/archive/refs/tags/v1.3.0.tar.gz>
- **最后更新:** 2026-06-14T15:13:50+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- smlfmt (cli)
- smlfmt (别名)

## 依赖

- gmp

## 构建依赖

- mlton

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.3.0
- 管理器更新时间: 2026-06-14
- 本地数据: OK
- 上游仓库: https://github.com/shwestrick/smlfmt
- 检测到的最新版本: v1.3.0 (当前)
## 项目历史与用法

smlfmt is a command-line parser and formatter for Standard ML. It is a niche but package-manager-relevant developer tool because it brings modern formatter workflows, including check mode and whole-project formatting, to an older ML-family language ecosystem.

### 项目历史

The official README describes smlfmt as a custom parser and code formatter for Standard ML, fast enough for large projects and used to format its own source tree. The repository release list and README record v1.0.0 in January 2023, v1.2.0 in May 2025, and v1.3.0 in January 2026.

### 采用历史

The supplied package metadata shows smlfmt packaged in Homebrew and Nix, a typical adoption path for smaller language tooling. Its README targets command-line workflows rather than editor-only integration, including stdin/stdout use, CI-friendly checking, and `.mlb` whole-project formatting.

### 使用方式

Users build it with MLton, format `.sml` files in place, pipe code through stdin/stdout, or pass an `.mlb` file to format many files. Options include `--preview`, `--preview-only`, `--read-only`, `--check`, width and indentation controls, and SuccessorML syntax toggles.

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

Package maintainers care because smlfmt packages a language-specific formatter with MLton build requirements, command-line formatting semantics, and CI use through `--check`. It fills the same ergonomic role for Standard ML that formatter packages do for larger language ecosystems.

### 时间线

- 2023: v1.0.0 release published on GitHub.
- 2025: README records v1.2.0 release on May 2, 2025.
- 2026: README and release list record v1.3.0 on January 1, 2026.

### Related projects

- The README references MLton, MLBasis path maps, Emacs integration through `smlfmt.el`, SuccessorML syntax extensions, and hyperfine for timing measurements.

### 来源

- GitHub releases API for shwestrick/smlfmt: first listed release v1.0.0 on 2023-01-10.
- <https://github.com/shwestrick/smlfmt README: formatter purpose, features, release notes, build/run examples, options, performance notes.>
- input source_facts.package-manager: Homebrew and Nix package names.


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** smlfmt
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [mlton](https://pkg.so/zh-hans/brew/mlton/) - Build dependency declared by Homebrew.
- [jsonlint](https://pkg.so/zh-hans/brew/jsonlint/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, parser.
- [dockerfmt](https://pkg.so/zh-hans/brew/dockerfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, parser.
- [gdtoolkit](https://pkg.so/zh-hans/brew/gdtoolkit/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, parser.
- [millet](https://pkg.so/zh-hans/brew/millet/) - Shares pkgdb curated category or tags: cli, developer-tools, sml, standard-ml.
- [smlpkg](https://pkg.so/zh-hans/brew/smlpkg/) - Shares pkgdb curated category or tags: cli, developer-tools, sml, standard-ml.
- [expat](https://pkg.so/zh-hans/brew/expat/) - Shares pkgdb curated category or tags: cli, developer-tools, parser.
- [xcbeautify](https://pkg.so/zh-hans/brew/xcbeautify/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [lunarml](https://pkg.so/zh-hans/brew/lunarml/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gmp, ml.

## Combined YAML source

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


## 来源

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