# 使用 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
- **版本:** 0.15.1
- **来源摘要:** Beautiful and reliable typst code formatter
- **主页:** <https://typstyle-rs.github.io/typstyle/>
- **仓库:** <https://github.com/typstyle-rs/typstyle>
- **最后更新:** 2026-08-02T07:22:36Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- typstyle (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.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

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

- 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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
