Skip to main content

Windows maintenance CLI/TUI: sift junk, analyze disks, manage apps, updates and files. Recycle Bin only, dry-run by default.

Project description

Sifty

Sifty

Sift the junk from the keep.

PyPI Python 3.11+ Windows License: MIT CI Coverage

Website · Guides · Changelog

Sifty is an open-source maintenance tool for Windows that is built to be hard to misuse: it previews every change, deletes only to the Recycle Bin, and can undo any clean. It clears junk and caches, analyzes disk usage, finds duplicate files, and manages apps, startup items and updates. It also cleans the clutter other cleaners ignore: stray node_modules and build output, orphaned git worktrees, and bloated WSL2 disks. Drive it from a scriptable CLI or a full-screen terminal UI.

The optional AI assistant runs locally via Ollama: nothing leaves your machine, and it only ever sees file metadata (names, sizes, paths), never file contents.

Sifty demo

Safety first

Sifty deletes files and changes system state, so it is built to be hard to misuse:

  • Dry-run by default. Every destructive command previews what it would do; real changes need an explicit --apply.
  • Recycle Bin, never permanent delete. All removals go through one trash() function backed by Send2Trash, and sifty undo restores the last clean.
  • Protected paths. C:\Windows, Program Files, ProgramData, the drive root and your profile root are refused even with --apply --yes.
  • Audit log. Every applied deletion is recorded in %APPDATA%\sifty\audit.log.
  • The AI never deletes anything. It is advisory; high-risk tool calls always require your approval.

How it compares

Feature Sifty CCleaner BleachBit Revo Uninstaller WinDirStat
Junk / cache cleaning ✅ 14+ categories
Disk usage analysis ✅ top-N + volumes ✅ treemap
Duplicate finder ✅ SHA-256, NTFS-aware ✅ (paid)
App uninstall + leftover scan ✅ winget + leftovers ✅ + leftovers
App updates ✅ via winget ✅ (paid)
Startup manager ✅ reversible
Dev artifact purge (node_modules, …)
Git worktree / WSL2 VHD cleanup
Local AI assistant ✅ Ollama
Scriptable (JSON output) ➖ CLI
Recycle Bin + undo for everything ❌ permanent n/a
Open source ✅ MIT ✅ GPL
Price Free, MIT Freemium Free Freemium Free

Sifty is built developer-first: everything is scriptable, the engine is a reusable Python library, and it cleans the things developer machines actually accumulate (build artifacts, orphaned worktrees, bloated WSL2 disks). BleachBit is the closest open-source cousin; it is cross-platform and can securely shred files, while Sifty stays Windows-only, sends everything to the Recycle Bin with full undo, and adds duplicates, app management and developer cleanups.

Cleaned junk categories

When running sifty junk scan or sifty junk clean, the engine targets the following categories extracted directly from junk_categories():

Always-on categories

  • user-temp: Per-user temporary files (%TEMP% or %TMP%).
  • thumbnail-cache: Explorer thumbnail and icon cache (rebuilt automatically).
  • browser-cache: On-disk caches for Chrome, Edge, Brave, Vivaldi, and Firefox profiles (never cookies, history, or passwords).
  • winget-cache: Temporary installer files downloaded by WinGet.
  • onedrive-logs: OneDrive sync diagnostic logs (rebuilt automatically).
  • discord-cache: On-disk caches for Discord, PTB, and Canary channels (never login session data).
  • crash-dumps: Per-user crash dumps and error reports (CrashDumps, WER).
  • windows-temp (Requires Admin): System-wide temporary files (C:\Windows\Temp).
  • windows-update-cache (Requires Admin): Downloaded update packages left behind by Windows Update.
  • event-log-archives (Requires Admin): Old Windows event log archives (Archive-*.evtx). Active logs are untouched.
  • defender-history (Requires Admin): Windows Defender scan detection history logs.
  • system-crash-reports (Requires Admin): System-wide crash reports and kernel minidumps (WER, Minidump).

Off by default (opt-in via configuration)

  • downloads-installers: Installer files (.exe/.msi) in your Downloads folder. Can be enabled via sifty config set junk.include_downloads_installers true.
  • windows-old (Requires Admin): Leftovers from previous Windows installations after a feature update (C:\Windows.old). Can be enabled via sifty config set junk.include_windows_old true.

Install

pipx install sifty       # recommended (isolated); or: pip install sifty
scoop bucket add sifty https://github.com/Vortrix5/scoop-bucket; scoop install sifty
winget install Vortrix5.Sifty

sifty doctor             # check admin rights, winget, Ollama

Prefer no Python install? Download the standalone sifty.exe from the latest release.

Free Windows code signing provided by SignPath.io, certificate by SignPath Foundation.

For development:

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytest -q

Usage

sifty checkup                # one read-only scan of everything: junk, updates,
                             # orphans, stale files, disk space, startup
sifty tui                    # the full-screen interactive app

# Junk
sifty junk scan              # show reclaimable space per category
sifty junk clean             # preview removal (dry-run)
sifty junk clean --apply     # send junk to the Recycle Bin (asks first)

# Disk
sifty disk volumes           # used/free/total per volume
sifty disk analyze C:\Users  # biggest folders/files under a path
sifty disk duplicates D:\    # find duplicate files and wasted space

# Apps & updates
sifty apps list --by-size    # installed apps, largest first
sifty apps orphans           # broken uninstall entries in the registry
sifty apps uninstall "App"   # uninstall via winget (preview, then --apply)
sifty apps leftovers "App"   # what the uninstaller left behind (then --apply)
sifty update check           # available updates (winget)
sifty update apply           # upgrade everything (asks first)

# Developer cleanup
sifty purge clean            # node_modules, dist, __pycache__, target, …
sifty cleanup duplicates D:\Photos   # de-duplicate (keeps one copy each)
sifty cleanup large C:\Users\you     # biggest files under a path
sifty cleanup stale --days 180       # old items in Downloads

# Startup & services
sifty startup list                   # startup programs (enabled/disabled)
sifty startup disable "Spotify"      # reversible (sifty startup enable …)
sifty services list                  # curated optional services + state
sifty --admin services disable DiagTrack   # toggle one (needs admin)

# History & undo
sifty history                # what was cleaned + total space reclaimed
sifty undo                   # restore the most recent clean from the Recycle Bin

# Organize files
sifty organize preview C:\Users\you\Downloads --by type
sifty organize apply   C:\Users\you\Downloads --by date
sifty organize undo          # put the last organize's files back

# Configuration
sifty config                 # all settings + which ones you've overridden
sifty config set ai.model "llama3.2:3b"
sifty config edit            # open config.toml in your editor

# AI (requires Ollama running)
sifty ai status
sifty ai ask "what can I safely delete on my C drive?" --path C:\

# Scripting: JSON output on read-only commands (auto-enabled when piped)
sifty --json checkup
sifty --json disk volumes
sifty --json apps list --by-size

Some operations (Windows temp, update cache, certain uninstalls) need an Administrator terminal. sifty doctor tells you if you're elevated, and sifty --admin <cmd> relaunches elevated via UAC.

The TUI

sifty tui opens a full-screen app with a seven-section sidebar (Home, Clean, Disk, Apps, Monitor, Reports, AI):

  • Home: volume gauges and a Run checkup button that scans everything at once; findings come with buttons that fix them right there (clean junk, clean stale downloads, apply updates, each behind a confirm).
  • Clean: Junk / Purge / Optimize / Smart cleanup under one roof (tabs).
  • Apps: Installed / Updates / Startup / Services, with fuzzy filter, sorting, bulk uninstall, and an automatic leftover scan after uninstalling.
  • AI: an agentic chat where proposed tool runs show Run/Skip buttons inline in the conversation, and scan results carry follow-up action buttons.

Press Ctrl+P for the command palette (jump to any screen), F2 to elevate, Space to mark rows for bulk actions. The Reports screen shows space reclaimed over time with an Undo last clean button.

AI setup (optional)

  1. Install Ollama and start it.
  2. Pull the configured model: ollama pull qwen2.5:3b.
  3. sifty ai status should report "running".

Configure everything with the sifty config command, no need to hand-edit files:

sifty config                                  # show all settings + your overrides
sifty config set ai.model "llama3.2:3b"       # use a different local model
sifty config set ai.host "http://localhost:11434"
sifty config set safety.extra_protected_paths '["D:\\Important"]'
sifty config set junk.include_downloads_installers true
sifty config edit                             # or open config.toml in your editor

Settings live in %APPDATA%\sifty\config.toml; sifty config set only writes the keys you change, so defaults keep flowing through on upgrades.

Architecture

Layered: thin frontends over a reusable engine, OS specifics quarantined:

src/sifty/
├── cli/               # Typer entry point + one thin command module per group
├── tui/               # Textual full-screen app (views call core, not cli)
├── core/              # the engine: junk, disk, apps, updates, cleanup,
│   │                  # startup, services, organize, checkup, history, …
│   └── safety.py      # ★ protected paths, dry-run guard, trash(), audit log
├── windows/           # OS primitives: winget, registry, UAC, Recycle Bin, DISM
├── ai/                # Ollama client, advisor prompts, agentic tool loop
└── infra/             # TOML config + rotating diagnostics log

Frontends depend on core; core depends on windows/infra; nothing imports upward. A GUI could call the same engine functions (junk.scan, disk.find_duplicates, checkup.run_checkup) without a rewrite. See docs/ARCHITECTURE.md for the design rationale.

Tests

.\.venv\Scripts\python.exe -m pytest -q    # 160+ tests, ~20 s

The safety guardrails are the most heavily tested code in the repo; the Windows environment is mocked so the suite also runs on CI. See CONTRIBUTING.md to get involved.

License

MIT © Amine Zouaoui

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sifty-0.7.0.tar.gz (165.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sifty-0.7.0-py3-none-any.whl (146.1 kB view details)

Uploaded Python 3

File details

Details for the file sifty-0.7.0.tar.gz.

File metadata

  • Download URL: sifty-0.7.0.tar.gz
  • Upload date:
  • Size: 165.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sifty-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0592e7b074efcbd885d793d3148b0a7963870edc049b14b08215389b26d0862d
MD5 edda4892f1343611fc816b4f59e6de13
BLAKE2b-256 a12e76e000993383ac1430fc4ca33a7cf7a83062102eb987635f8d6f3061c6f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sifty-0.7.0.tar.gz:

Publisher: release.yml on Vortrix5/sifty

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sifty-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: sifty-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 146.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sifty-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0089f79dd3a0cbc051127ad8c9d35877584c6c40e2047cfae4f6bc23f48c2fd8
MD5 a73888db70b62db46d28b7186212614b
BLAKE2b-256 05b3bfb10c3b477b83212b219503fb4cb6f9d68bac1d0a6c60016d25975d1c32

See more details on using hashes here.

Provenance

The following attestation bundles were made for sifty-0.7.0-py3-none-any.whl:

Publisher: release.yml on Vortrix5/sifty

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page