# 策展 · X (Twitter) 🔥

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 作者：Maxl (@_bemax) · 平台：X (Twitter) · 日期：2026-05-26

> 原始來源：https://x.com/_bemax/status/2058953512596246595

## 中文摘要

saft 利用裝置端模型自動生成 Git 訊息。

**核心理念**
開發者 @_bemax (Maxl) 推出了「saft」（原專案更名），旨在解決開發者為了生成提交訊息而浪費 token 的問題。該工具完全在本地端執行，不依賴 ChatGPT 或 Claude 等雲端服務，確保所有資料皆保留在 Mac 裝置內，無需任何 API 金鑰。

**安裝與使用**
使用者可透過以下指令快速安裝該工具：
```bash
curl -fsSL https://raw.githubusercontent.com/Mechse/saft/master/install.sh | bash
```
若在安裝前希望審核腳本內容，可執行：
```bash
curl -fsSL https://raw.githubusercontent.com/Mechse/saft/master/install.sh
```
若需移除工具，請執行：
```bash
sudo rm /usr/local/bin/saft /usr/local/libexec/saft-helper
```

**技術演進與規劃**
該專案目前已支援處理較大的提交內容，並針對不同規模的變更採取相應策略：
- 已完成：針對小型差異（diffs）直接處理。
- 已完成：針對中型差異，透過 `--stat` 與 `--unified=0` 參數進行壓縮處理。
- 規劃中：針對大型差異，將導入「Map-Reduce」機制進行分段處理。
- 規劃中：新增 `--candidates N` 參數，允許使用者從多個生成的訊息中進行挑選。
- 規劃中：新增 `--message-only` 旗標，以便整合至 `prepare-commit-msg` 的 Git hook 中使用。

詳細專案資訊請參考 [saft GitHub 頁面](https://github.com/Mechse/saft)。

## 標籤

CLI, 開源專案, 自動化, macOS, saft, Git
