# 使用 Homebrew, MacPorts, Nix 安装 sleepwatcher

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

## 安装

```sh
sudo av install brew:sleepwatcher
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sleepwatcher
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install sleepwatcher
```

  证据: MacPorts ports tree: sysutils/sleepwatcher/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#sleepwatcher
```

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

## 软件包事实

- **软件包键:** brew:sleepwatcher
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/sleepwatcher>
- **版本:** 2.2.1
- **来源摘要:** Monitors sleep, wakeup, and idleness of a Mac
- **主页:** <https://www.bernhard-baehr.de/>
- **上游文档:** <https://www.bernhard-baehr.de/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://www.bernhard-baehr.de/sleepwatcher_2.2.1.tgz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- sleepwatcher (cli)
- sleepwatcher (别名)

## 安装行为

- post-install 钩子: 未定义
- 服务: declared
- 注意事项: For SleepWatcher to work, you will need to write sleep and wakeup scripts, located here when using brew services: ~/.sleep ~/.wakeup
- Bottle: 可用 于 arm64_big_sur, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.2.1
- 本地数据: OK
- 上游仓库: https://www.bernhard-baehr.de/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.

## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service

## 源数据库详情

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

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

- Nix - sleepwatcher: normalized package name match | nixpkgs package indexes: pkgs/by-name/sl/sleepwatcher/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - sleepwatcher: normalized package name match | MacPorts ports tree: sysutils/sleepwatcher/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://pkg.so/zh-hans/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [mole](https://pkg.so/zh-hans/brew/mole/) - Shares pkgdb curated category or tags: cli, macos, system.
- [mas](https://pkg.so/zh-hans/brew/mas/) - Shares pkgdb curated category or tags: cli, macos, system.
- [cliclick](https://pkg.so/zh-hans/brew/cliclick/) - Shares pkgdb curated category or tags: automation, cli, macos, system.
- [osx-cpu-temp](https://pkg.so/zh-hans/brew/osx-cpu-temp/) - Shares pkgdb curated category or tags: cli, macos, system.
- [fileicon](https://pkg.so/zh-hans/brew/fileicon/) - Shares pkgdb curated category or tags: cli, macos, system.
- [m-cli](https://pkg.so/zh-hans/brew/m-cli/) - Shares pkgdb curated category or tags: automation, cli, macos, system.
- [reattach-to-user-namespace](https://pkg.so/zh-hans/brew/reattach-to-user-namespace/) - Shares pkgdb curated category or tags: cli, macos, system.
- [mist-cli](https://pkg.so/zh-hans/brew/mist-cli/) - Shares pkgdb curated category or tags: cli, macos, system.
- [direvent](https://pkg.so/zh-hans/brew/direvent/) - Local package facts share a topical domain. Shared terms: cli, daemon, monitoring, monitors, system.

## Combined YAML source

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


## 来源

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