# 使用 Homebrew, Nix, scoop 安装 static-web-server

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

## 安装

```sh
sudo av install brew:static-web-server
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install static-web-server
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#static-web-server
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/static-web-server
```

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

## 软件包事实

- **软件包键:** brew:static-web-server
- **软件包管理器:** Homebrew
- **版本:** 2.44.0
- **来源摘要:** High-performance and asynchronous web server for static files-serving
- **主页:** <https://static-web-server.net>
- **仓库:** <https://github.com/static-web-server/static-web-server>
- **最后更新:** 2026-08-01T02:50:39Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- static-web-server (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.44.0
## 项目历史与用法

Static Web Server is a Rust command-line HTTP server for serving static files and assets. In package-manager culture it belongs to the small, single-purpose server family: a binary that can be installed quickly, pointed at a directory, and used for local previews, containers, CI jobs, or simple production static hosting.

### 项目历史

The upstream repository was created in September 2019 and the project describes itself as a cross-platform, high-performance asynchronous static-file server. Its README emphasizes a tiny production-ready server built on Rust, Hyper, and Tokio, with HTTP/1, HTTP/2, TLS, compression, directory listings, cache headers, CORS, and other deployment-oriented features.

The project moved beyond a local preview utility by publishing release binaries, Docker images, a crates.io package, and official documentation. The v2 series is documented as the stable line while the main branch README identifies an upcoming v3 as still in development.

### 采用历史

The input package metadata lists Static Web Server in Homebrew, Nix, and Scoop, which places it in the cross-platform CLI packaging set used by developers on macOS, Linux, and Windows. The official README also highlights prebuilt binaries, Docker images, crates.io, docs.rs, and support for Linux, macOS, Windows, FreeBSD, NetBSD, Android, Docker, and WebAssembly.

Its adoption pattern is typical for Rust infrastructure CLIs: package managers provide the executable for day-to-day use, while Docker and static release binaries cover container and server deployments.

### 使用方式

Common usage is to install the `static-web-server` executable and serve a directory of static content. Configuration can be supplied through command-line flags, environment variables, or a TOML file, making the tool convenient both for one-off local serving and repeatable deployment.

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

Package maintainers care about Static Web Server because it is a modern replacement for ad hoc `python -m http.server` style workflows when users need compression, TLS, headers, logging, Docker images, and static binaries without bringing in a full application server.

Its value in package indexes comes from being a small executable with a large practical surface: easy to bottle or cache, useful in CI, and relevant to web projects that only need to ship files.

### 时间线

- 2019: Upstream GitHub repository created.
- 2019: Early v1 release series published on GitHub.
- 2026: Official downloads page listed v2.43.0 with release binaries for multiple platforms.

### Related projects

- Related tools include other static-file servers and development preview servers, while the implementation is tied to the Rust Hyper and Tokio ecosystem.

### 来源

- <https://github.com/static-web-server/static-web-server>
- <https://raw.githubusercontent.com/static-web-server/static-web-server/master/README.md>
- <https://static-web-server.net/download-and-install/>
- input.source_facts.package-manager
- input.source_facts.repo


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## 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

- Unix: ./sws.toml
- Windows: .\sws.toml
## 其他软件包管理器记录

- Nix - static-web-server: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/static-web-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/static-web-server: normalized package name match | Scoop official bucket manifest trees: bucket/static-web-server.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
