# 使用 Homebrew, apk, Nix, pacman, scoop, winget 安装 typstyle

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

## 安装

```sh
sudo av install brew:typstyle
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install typstyle
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add typstyle
```

  证据: Alpine Linux edge package indexes: typstyle from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#typstyle
```

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

- pacman (92%):

```sh
sudo pacman -S typstyle
```

  证据: Arch Linux sync databases: typstyle from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/typstyle
```

  证据: Scoop official bucket manifest trees: bucket/typstyle.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Enter-tainer.typstyle -e
```

  证据: Windows Package Manager source index: Enter-tainer.typstyle from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:typstyle
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/typstyle>
- **版本:** 0.15.1
- **来源摘要:** Beautiful and reliable typst code formatter
- **主页:** <https://typstyle-rs.github.io/typstyle/>
- **仓库:** <https://github.com/typstyle-rs/typstyle>
- **上游文档:** <https://typstyle-rs.github.io/typstyle/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/typstyle-rs/typstyle/archive/refs/tags/v0.15.1.tar.gz>
- **最后更新:** 2026-08-02T07:22:36Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- typstyle (cli)
- typstyle (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.15.1
- 管理器更新时间: 2026-08-02
- 本地数据: OK
- 上游仓库: https://github.com/typstyle-rs/typstyle
- 检测到的最新版本: v0.15.1 (当前)
## 项目历史与用法

typstyle is an opinionated formatter for Typst source code. It belongs to the familiar package-manager niche of language-specific formatters: small executable, editor and CI integration, check/diff modes, and minimal configuration.

### 项目历史

The typstyle repository was created in March 2024. Its README says the project was started because existing Typst formatters were not a good fit for experiments with Wadler-style pretty printing, limited configuration, and stronger formatter correctness testing.

The project describes its goals as opinionated formatting, formatting code rather than prose content, convergence after repeated runs, and preserving rendered output. Its documentation and README also present it as a CLI, Rust library, WebAssembly package, playground, editor formatter through Tinymist, GitHub Action, and pre-commit hook.

### 采用历史

The README documents installation from GitHub releases, package managers through Repology, cargo-binstall, and Cargo. The batch package facts show Homebrew, Nix, Arch, Scoop, winget, and apk packaging, which is typical for a formatter that becomes useful once a document language gains enough users.

typstyle's adoption is closely tied to Typst's growth: it formats `.typ` files for local development, editor integrations, pre-commit hooks, and CI checks rather than serving as a standalone document authoring system.

### 使用方式

Typical usage is `typstyle -i file.typ` to rewrite files, plain `typstyle file.typ` to print formatted output, `--check` for CI, and `--diff` to inspect changes. The README also documents line width, indent width, import reordering, text wrapping, and escape-hatch comments.

For package-oriented workflows, typstyle is useful because it can be installed as a normal CLI, run in pre-commit, integrated into Tinymist, or invoked through a GitHub Action without adding a larger build framework.

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

typstyle is significant as part of the maturing Typst ecosystem: once a document language gets package managers, editor support, and CI use, a formatter becomes infrastructure. It is also a good example of Rust CLI distribution spanning crates.io, binary releases, Homebrew, distro packages, and WebAssembly.

### 时间线

- 2024-03-09: typstyle-rs/typstyle GitHub repository created.
- 2025: README documents editor, web, GitHub Action, and pre-commit integration surfaces.
- 2026-06-20: v0.15.0 released after Typst 0.15 support.

### Related projects

- Typst is the source language typstyle formats.
- Tinymist is the editor integration path named by the README.
- typstyle-action, pre-commit-typstyle, and typstyle-tampermonkey are companion projects in the typstyle-rs organization.

### 来源

- <https://api.github.com/repos/typstyle-rs/typstyle>
- <https://api.github.com/repos/typstyle-rs/typstyle/releases>
- <https://github.com/typstyle-rs/typstyle>
- <https://typstyle-rs.github.io/typstyle/>
- source_facts.package-manager


## 安全说明

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:** typstyle
- **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 - typstyle: normalized package name match | nixpkgs package indexes: pkgs/by-name/ty/typstyle/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - typstyle - 0.12.14-r0: normalized package name match | Alpine Linux edge package indexes: typstyle from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Beautiful and reliable typst code formatter | https://enter-tainer.github.io/typstyle/
- pacman - typstyle - 0.15.0-1: normalized package name match | Arch Linux sync databases: typstyle from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Beautiful and reliable typst code formatter | https://github.com/typstyle-rs/typstyle
- Scoop - main/typstyle: normalized package name match | Scoop official bucket manifest trees: bucket/typstyle.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Enter-tainer.typstyle: normalized package name match | Windows Package Manager source index: Enter-tainer.typstyle from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [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.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [topiary](https://pkg.so/zh-hans/brew/topiary/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter, rust.
- [rumdl](https://pkg.so/zh-hans/brew/rumdl/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, rust.
- [tinymist](https://pkg.so/zh-hans/brew/tinymist/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, typst.
- [oxfmt](https://pkg.so/zh-hans/brew/oxfmt/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, rust.
- [sqruff](https://pkg.so/zh-hans/brew/sqruff/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, rust.
- [air](https://pkg.so/zh-hans/brew/air/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, rust.
- [rubyfmt](https://pkg.so/zh-hans/brew/rubyfmt/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [ormolu](https://pkg.so/zh-hans/brew/ormolu/) - Shares pkgdb curated category or tags: cli, code-formatting, developer-tools, formatter.
- [dockerfmt](https://pkg.so/zh-hans/brew/dockerfmt/) - Local package facts share a topical domain. Shared terms: cli, code, code-formatting, developer, developer-tools.
- [golines](https://pkg.so/zh-hans/brew/golines/) - 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/typstyle.yml](https://github.com/mxcl/pkgdb/blob/main/combined/typstyle.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
