CleanFlow:先预览再执行的本地文件清理工具,支持 Claude 与 Ollama 分类
9t29zhmwdh-coder/CleanFlow
CleanFlow 是一款基于 Tauri v2 的原生桌面文件清理工具,扫描 Downloads 或 Desktop 后先生成包含移动、删除、打标签的完整计划,用户勾选后才执行,所有操作记入日志,移动和重命名可撤销,删除文件可用 Finder 的 Put Back 恢复。
Shows you the whole cleanup before it touches anything, and remembers what it did.
Point it at Downloads or Desktop. CleanFlow applies its rules, finds the duplicates and the junk, and hands you a plan: every move, every deletion, every tag, listed. You tick what should happen. Every executed action goes into a journal: moves and renames can be undone from the app, and whatever went to the Trash comes back with Finder's Put Back.
Not for you if the filenames tell you nothing and you need something to
look inside the files, including photos. That is a different job, and
LifeSort is the one in this
portfolio: it reads documents and runs a vision model over images to sort by
content. CleanFlow works by rule, which is faster and predictable, but a rule
cannot tell you what is in IMG_4471.jpg.
Nothing is executed until you select it, and the AI only suggests.
How it runs: CleanFlow is a native desktop app, not a server or browser tool. It opens as its own window and has no tray icon or background service; it only runs while the window is open.
💾 Download: macOS (DMG) · Windows (Installer) · Linux (AppImage): always the latest release, not code-signed/notarized (Gatekeeper/SmartScreen will warn on first run). Or build from source, see Getting Started below.
In practice: you scan a folder, review a generated plan of moves, trashes and tags, and execute only what you select; every run is kept in a journal, moves and renames can be undone from it, and trashed files come back with Finder's Put Back. AI (Claude or a local Ollama model) only assists with classification and suggestions; the underlying scan, rule matching, and undo logic works without it.
🌱 New here? → Step-by-step guide for beginners
Features
| Feature | Description |
|---|---|
| File Analysis | MIME detection, SHA-256 deduplication, series grouping |
| AI Classification | Optional, off by default. Claude or a local Ollama model classifies invoices, contracts, screenshots, code, etc. from file metadata (name, size, type), never from file contents |
| Clean-Up Engine | Detects DMGs, .DS_Store, temp files, zombie files, old versions |
| Rule Engine | Built-in + custom rules (e.g. "PDF + invoice → Documents/Finance/2026") |
| Action Preview | Review every proposed action before executing |
| One-Click CleanFlow | Execute all selected actions in one click |
| Undo | Every run is listed on the start page; moves and renames are reversed, trashed files are named so you can Put Back them from the Trash |
| CLI Mode | cleanflow scan, cleanflow organize, cleanflow undo |
Requirements
- Rust 1.77+
- Node.js 20+
- Tauri CLI v2:
cargo install tauri-cli - macOS / Windows / Linux (Tauri v2)
Quick Start
git clone https://github.com/9t29zhmwdh-coder/CleanFlow cd CleanFlow # Install frontend dependencies cd frontend && npm install && cd .. # Run in development mode cargo tauri dev # Build release cargo tauri build
CLI Only
cargo install --path crates/cf-cli cleanflow scan ~/Downloads cleanflow organize ~/Downloads --execute cleanflow undo cleanflow rules list
Uninstall / Cleanup
CleanFlow is a self-contained app with no installer and no background service.
- macOS: delete the app bundle, then remove
~/.cleanflow/(settings, scan journal). - Windows: remove the app folder, then delete
%USERPROFILE%\.cleanflow\. - API keys are stored in the OS keychain, not in
~/.cleanflow/; remove them separately via Keychain Access (macOS) or Credential Manager (Windows) if you added one. - CleanFlow never touches your original files outside the folders you explicitly scan and organize; there is nothing else to clean up.
AI Providers
| Provider | Setup |
|---|---|
| Claude (Anthropic) | Enter your API key in Settings; stored securely in the OS keychain |
| Ollama (local) | Install Ollama, run ollama pull llama3.2 |
| Rule-based only | No AI provider required |
Cost: ~$0.002 per 1,000 files with claude-haiku-4-5.
Built-in Rules
| Rule | Condition | Action |
|---|---|---|
| Screenshots | Name matches Screenshot* |
→ Pictures/Screenshots |
| DMG Installers | Extension .dmg |
Trash |
| .DS_Store | Name contains .DS_Store |
Trash |
| PDF Invoices | PDF + AI: invoice |
→ Documents/Finance/{year} |
| Temp Files | Extension .tmp/.log/.cache |
Trash |
| Zombie Files | Never accessed + older 90 days |
Archive |
Architecture
CleanFlow/
├── crates/cf-core/ # Rust: scanner, AI, rules, planner, executor, undo
├── crates/cf-cli/ # CLI binary (clap)
├── src-tauri/ # Tauri v2 backend + IPC commands
└── frontend/ # React + TypeScript + Tailwind
Author: Rafael Yilmaz · Status: Active · · License: MIT
来源:GitHub · github.com

