Developer tools & scriptsOwnerApr 2026

Code Consolidator: a browser tool for AI-ready code context

TL;DR

The browser successor to my Python copy-code tools. It reads a folder with the File System API, uploads nothing, and produces one labelled, sanitised text block.

Period
Apr 2026
Technologies
2
Diagrams
1
Reading time
1 min

JavaScriptTailwind CSS

1 chapter(s) collapsed in quick read

Purpose

The browser successor to the Python copycode family (S01) and ThuOneCopy (P22): pick a local project folder, tick the files you want, strip comments / imports, and copy one clean, labelled block of code ready to paste into ChatGPT or Claude.

Features (from the code)

  • Local folder read via webkitdirectory; buildFileTree → recursive tree with expand / collapse, tri-state checkboxes (updateAllCheckboxes, getAllChildFiles), live search.
  • Selection list separate from the tree; add / remove; generate-button enable logic.
  • Filters (initFilters): by extension (getFileExtension), removeComments, remove imports.
  • generateCode: concatenates the picked files into one labelled block; per-file open in a tab and a dedicated consolidate tab (openConsolidateTab, handleTabClick, switchTab).
  • Modal system (showModal/hideModal, about + “buy me a coffee”), toast messages (showMessage).
Features (from the code)
Diagram as text
flowchart LR
 F[webkitdirectory pick folder] --> T[buildFileTree: checkbox tree + search]
 T --> SEL[selected list]
 SEL --> FIL[filters: ext, strip comments/imports]
 FIL --> G[generateCode → one labelled block]
 G --> CB[(copy to clipboard)]

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.