How hyperfield/ai-file-sorter works
AI File Sorter is a cross-platform desktop application that scans a chosen folder, analyzes files, proposes categories and supported rename suggestions, then lets the user review and apply changes. The README documents local and remote AI, image and document analysis, media-metadata naming, learned behavior, whitelists, and storage-provider support. The graph follows those product stages and includes persistence and plugin extension layers. Workflow links reflect the README’s stated behavior; sampled excerpts were partial, so uncertain internal call wiring is omitted.
Main entry points: AnalysisCoordinator.cpp Analysis coordinator · CategorizationService.cpp Categorization · HeadlessReviewApplyService.cpp Review apply · StorageProvider.hpp Storage providers
Components 24
User interaction
- Desktop app
app/lib/MainApp.cpp - Headless command
app/lib/HeadlessAnalysisCommand.cpp - Review results
app/lib/ResultsCoordinator.cpp
Analysis and suggestions
- Analysis coordinator
app/lib/AnalysisCoordinator.cpp - File scanning
app/lib/FileScanner.cpp - Categorization
app/lib/CategorizationService.cpp - Image analysis
app/lib/ImageAnalyzerFactory.cpp - Document analysis
app/lib/DocumentTextAnalyzer.cpp - Media naming
app/lib/MediaRenameMetadataService.cpp
Review and storage
- Review apply
app/lib/HeadlessReviewApplyService.cpp - Storage providers
app/include/StorageProvider.hpp
AI and model runtime
- Local LLM
app/lib/LocalLLMClient.cpp - Remote clients
app/lib/LLMClient.cpp - Gemini client
app/lib/GeminiClient.cpp - Visual runtime
app/lib/VisualLlmRuntime.cpp
State and extensions
- Categorization cache
app/lib/DatabaseManager.cpp - Learned behavior
app/lib/UserLearningStore.cpp - Category whitelists
app/lib/WhitelistStore.cpp - Review history
app/lib/ReviewHistoryStore.cpp - Storage plugins
app/lib/StoragePluginManager.cpp - OneDrive provider
app/lib/OneDriveStorageProvider.cpp
Other components
- User
- Model services
- Files and folders
Connections 26
- User → Desktop app: selects folder
- User → Headless command: starts analysis
- Desktop app → Analysis coordinator: starts analysis
- Headless command → Analysis coordinator: runs analysis
- Analysis coordinator → File scanning: scans files
- File scanning → Files and folders: reads entries
- Analysis coordinator → Categorization: requests suggestions
- Analysis coordinator → Image analysis: analyzes images
- Analysis coordinator → Document analysis: analyzes documents
- Analysis coordinator → Media naming: reads media metadata
- Categorization → Local LLM: uses local model
- Categorization → Remote clients: uses remote model
- Categorization → Gemini client: uses Gemini
- Image analysis → Visual runtime: uses visual runtime
- Analysis coordinator → Categorization cache: uses categorization cache
- Analysis coordinator → Learned behavior: uses prior decisions
- Analysis coordinator → Category whitelists: uses category rules
- Analysis coordinator → Review results: presents suggestions
- User → Review results: reviews suggestions
- Review results → Review apply: confirms changes
- Review apply → Storage providers: moves and renames
- Storage providers → Files and folders: mutates files
- Review apply → Categorization cache: updates cache
- Review apply → Review history: records changes
- Storage plugins → OneDrive provider: loads provider
- Storage providers → OneDrive provider: dispatches provider operations