Own products & experimentsOwnerDec 2024

ThuOneCopy: desktop code consolidator for LLM prompts

TL;DR

ThuOneCopy turns a project folder into one prompt-ready block. Version 2 restructured a single-file prototype into a layered, Clean-Architecture-style desktop app with auto-update.

Period
Dec 2024
Technologies
3
Diagrams
1
Reading time
1 min

PythonDesktop GUI (Tk / Qt)LLM integration

Summary

v2 restructured the single-file prototype into a layered “clean” layout: app (entry), core (config + example config), data (datasources, file / settings repositories), domain (models), services (file, settings), ui (main window, header, widgets: about popup, buy-coffee popup, checkbox delegate, consolidate tab, update popup), utils (description formatting with bold / break / link markup, helpers, update checker). That layout was generated by the owner’s scaffolder (S03).

Remote configuration / updates: Firebase Remote Config has no Python SDK, so the app reads a Firestore document (REST via requests, .env config) for the latest version, release notes and download URL. packaging.version compares versions and an update popup links to the release.

Packaged with PyInstaller (--onefile --windowed --add-data ".env;.", icon, rename to ThuOneCopy / TuOneCopy).

Stack

PyQt5 5.15.11 (QTreeView / model with check states, QTabWidget, delegates, dialogs), python-dotenv, requests, packaging; PyInstaller (ThuOneCopy.spec, TuOneCopy.spec, main.spec, build.py); tests (test_file_service.py).

Architecture

Architecture
Diagram as text
flowchart LR
 UI[MainWindow: tree + tabs + selected list + filters] --> FS[FileService]
 FS --> REPO[FileRepository / SettingsRepository]
 REPO --> DISK[(Filesystem)]
 UI --> CT[ConsolidateCodeTab: build combined text → clipboard]
 UI --> UPD[UpdateChecker] -->|REST| FIRE[(Firestore config doc)]
 UPD --> POP[UpdatePopup → download release]

Features

Folder tree with checkboxes (recursive select / toggle per folder), click-to-open tabs, close tabs, selected-files list (sync both ways), extension / name filters, consolidated copy with file headers, comment / import stripping and numbering (from S01 v2), class-name extraction, edit consolidated text with undo / redo, whitespace cleanup, about popup with rich text, buy-coffee popup, update check and popup, contact mail.

Resume Bullet

Built and shipped a PyQt5 desktop tool (VS Code-style tree and tabs) that consolidates multi-file codebases into LLM-ready prompts, with Firestore-driven auto-update checks and PyInstaller releases; evolved from 15 iterative prototypes.

Related projects

Want to discuss this project?

Happy to walk through the architecture, trade-offs or the code.

Email me about it

© 2026 Thuyavan Sivarasa. Script code is MIT licensed.