Skip to content

About

Advanced local-first file intelligence & smart organization desktop application for Windows built with Python, PySide6, and SQLite.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GhostSort

Advanced File Intelligence & Smart Organization for Windows. Understand, classify, search, and organize desktop files safely—with zero cloud dependencies and complete explainability.


What is GhostSort?

GhostSort is a native Windows desktop application built with Python and PySide6 (Qt) designed under one core product principle:

GhostSort must understand files before recommending actions, and it must obtain user approval before modifying files.

Key Capabilities

  • Deep File Inventory: Discovers and indexes folders without altering them. Handles long paths, Unicode names, and skips system junctions.
  • Magic Byte Verification: Verifies genuine file signatures against extensions, immediately flagging camouflaged executables or mismatched types.
  • Safe Content Extraction: Extracts document text, EXIF attributes, and audio tags locally (PDF, DOCX, XLSX, PNG, JPG, MP3, FLAC) within strict resource caps.
  • Explainable Classification: Every categorization provides human-readable evidence (signatures, extracted keywords, EXIF, rules) and calibrated confidence bands (High, Medium, Low).
  • Exact Duplicate Detection: Clusters identical files using a three-stage pipeline (size grouping → 64KB sample hashing → streaming SHA-256) with accurate potential storage savings calculations.
  • Non-Destructive Organization Planning: Generates editable, proposed destination plans before modifying files.
  • Bulletproof Filesystem Safety: Blocks Windows system roots (C:\Windows, Program Files, user credential vaults), resolves collisions automatically, and guards against TOCTOU races.
  • Journaled Recovery: Every file operation is tracked in a persistent SQLite journal. Completed moves can be restored to their original locations with pre-flight verification.
  • Origin-Inspired Aesthetic: High-contrast, dark editorial desktop interface adhering to the user's design tokens (#0f1011 Obsidian, #090a0b Abyss, #2e2e2e Graphite, #3f4041 Steel, and 21:1 AAA white-fill primary CTAs).

Architecture Overview

GhostSort is organized as a clean modular monolith:

  • src/ghostsort/ui/: PySide6 presentation layer (9 complete workflow pages, model/view tables, custom widgets, and theme).
  • src/ghostsort/application/: Workflow services coordinating scanning, intelligence, planning, execution, and recovery.
  • src/ghostsort/intelligence/: Rules engine, format extractors, signature validator, and duplicate detector.
  • src/ghostsort/safety/: Centralized path validator, Windows system protection, collision detector, and resource limits.
  • src/ghostsort/filesystem/: Safe operation executor, streaming hasher, and rollback manager.
  • src/ghostsort/storage/: SQLite database in WAL mode with repository patterns and FTS5 search index.
  • src/ghostsort/workers/: Off-thread Qt background workers for smooth, unblocked UI responsiveness.

Quick Start

Running from Source

# Clone and navigate to project root
cd GhostSort

# Install dependencies
pip install -e ".[dev]"

# Launch GhostSort
python -m ghostsort

Running Automated Tests

python -m pytest -v

Packaging Windows Standalone Binary (.exe)

python scripts/build_windows.py

The executable will be generated at dist/GhostSort.exe.


License

MIT License. See LICENSE for details.

About

Advanced local-first file intelligence & smart organization desktop application for Windows built with Python, PySide6, and SQLite.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages