# 使用 Cargo 安装 stylua

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

## 安装

```sh
sudo av install cargo:stylua
```

其他安装命令:

### 便携式和语言管理器

- Cargo (100%):

```sh
cargo install stylua
```

  证据: local crates.io package metadata

## 软件包事实

- **软件包键:** cargo:stylua
- **软件包管理器:** Cargo
- **软件包管理器页面:** <https://crates.io/crates/stylua>
- **版本:** 2.5.2
- **来源摘要:** A code formatter for Lua
- **仓库:** <https://github.com/johnnymorganz/stylua>
- **许可证:** MPL-2.0
- **源码归档:** <https://static.crates.io/crates/stylua/stylua-2.5.2.crate>
- **发布时间:** 2026-05-16 15:47:03.299978+00
- **最后更新:** 2026-05-16 15:47:03.299978+00
- **已生成:** 2026-09-19T06:45:57+00:00

## 可执行文件

- stylua (二进制): Declared by crates.io version metadata.

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-09-19
- 管理器版本: 2.5.2

## 安全说明

没有找到 stylua 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** crates.io database dump
- **Crate ID:** 325,325
- **Crate Size:** 175,973
- **Edition:** 2018
- **Executable Intent:** Intent: public_cli, Signals: manifest declares a binary target, binary name matches crate name
- **Has Lib:** yes
- **Num Versions:** 62
- **Recent Download Window Days:** 90
- **Version ID:** 2,408,081

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

- Nix - stylua: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/stylua/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - stylua - 2.5.2-r0: normalized package name match | Alpine Linux edge package indexes: stylua from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Opinionated Lua code formatter | https://github.com/JohnnyMorganz/StyLua
- pacman - stylua - 2.5.2-1: normalized package name match | Arch Linux sync databases: stylua from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Deterministic code formatter for Lua | https://github.com/JohnnyMorganz/StyLua
- zypper - StyLua - 2.0.2-1.7: normalized package name match | openSUSE Tumbleweed package metadata: StyLua from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | Opinionated Lua code formatter | https://github.com/JohnnyMorganz/StyLua
- MacPorts - stylua: normalized package name match | MacPorts ports tree: lua/stylua/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/stylua: normalized package name match | Scoop official bucket manifest trees: bucket/stylua.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - JohnnyMorganz.StyLua: normalized package name match | Windows Package Manager source index: JohnnyMorganz.StyLua from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [stylua](https://pkg.so/zh-hans/brew/stylua/) - Same normalized package name exists in another local package ecosystem.

## 来源

- crates.io package index
- external package-manager database matches
- cross-ecosystem install command graph
