https://github.com/wwq0327/taotie
吞磁盘垃圾的饕餮 — macOS 磁盘诊断 + 清理工具
https://github.com/wwq0327/taotie
cli disk-cleanup macos python
Last synced: about 1 month ago
JSON representation
吞磁盘垃圾的饕餮 — macOS 磁盘诊断 + 清理工具
- Host: GitHub
- URL: https://github.com/wwq0327/taotie
- Owner: wwq0327
- Created: 2026-05-12T23:53:45.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-13T01:00:15.000Z (2 months ago)
- Last Synced: 2026-05-13T01:38:37.996Z (2 months ago)
- Topics: cli, disk-cleanup, macos, python
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# taotie
[饕餮](https://baike.baidu.com/item/%E9%A5%95%E9%A4%AE) — 吞磁盘垃圾的神兽。macOS 磁盘诊断 + 清理工具。
## 安装
### 人类
```bash
git clone https://github.com/wwq0327/taotie.git
cd taotie
chmod +x taotie.py
ln -sf "$(pwd)/taotie.py" /usr/local/bin/taotie # 或 ~/.local/bin/taotie
```
### Agent
```bash
curl -fsSL https://raw.githubusercontent.com/wwq0327/taotie/main/install.sh | bash
```
或克隆后手动执行:
```bash
./install.sh
```
Python 标准库,零依赖。
## 用法
任意目录直接运行:
```bash
taotie scan
taotie clean --dry-run
taotie clean
```
### 诊断
```bash
taotie scan
```
扫描用户目录和系统目录的磁盘占用,红色标记 >10G 的大户,黄色标记 >1G 的项目。
### 清理
```bash
taotie clean --dry-run # 预览 safe 级
taotie clean # 执行 safe 清理
taotie clean --level medium --dry-run
```
三个安全等级:
| 等级 | 范围 |
|------|------|
| `safe` | 废纸篓、`~/Library/Caches`、`/tmp` 过期文件(>1天)、`~/.cache/uv`、`~/.cache/pip` |
| `medium` | safe + Whisper/HuggingFace 模型缓存 + 旧日志(>7天) |
| `aggressive` | 同 medium(更大范围需手动词) |
清理前需输入 `y` 确认。`--dry-run` 只预览不执行。
### 记录
```bash
taotie log # 查看最近 30 条操作记录
taotie log -n 10 # 最近 10 条
```
每次 scan 和 clean 自动写入 `~/.local/share/taotie/taotie.log`。