Generic developer utility scripts for the VisualText org.
Written in TypeScript and run directly through tsx —
no build step required.
Anyone can now clone and use it:
git clone https://github.com/VisualText/dev-tools.git
cd dev-tools
npm install
npm run analyzersRun any of these with npm run <name>. Arguments after -- are passed through to the script.
| Script | What it does |
|---|---|
npm run clean |
Remove build/cache artifacts (dist, coverage, …) |
npm run loc |
Count lines of code by file extension |
npm run tree |
Print a directory tree, skipping noisy folders |
npm run fresh |
Wipe node_modules + lockfile and reinstall |
npm run reclone |
Delete a sibling VisualText repo and clone it fresh (+submodules) |
npm run analyzers |
Index NLP++ analyzer folders into a markdown report |
npm run format |
Format src with Prettier |
npm run lint |
Lint src with ESLint |
npm run typecheck |
Type-check the project with tsc --noEmit |
npm run check |
Run typecheck + lint + format check together |
npm run clean -- --dry # preview what clean would delete
npm run clean -- dist .turbo # delete only the named targets
npm run loc -- src --top 5 # lines of code in ./src, top 5 extensions
npm run tree -- . --depth 2 # directory tree, 2 levels deep
npm run fresh -- --dry # preview a fresh reinstall
npm run reclone -- nlp-engine # delete ../nlp-engine and clone it fresh
npm run reclone -- nlp-engine --dry # preview the delete + clone, do nothing
npm run reclone -- nlp-engine --yes # skip the delete confirmation prompt
npm run analyzers # index analyzers under c:\git into analyzers.md
npm run analyzers -- --root c:\git --out report.md
npm run analyzers -- --json # also emit analyzers.jsonAn NLP++ analyzer is any folder containing
input/,spec/,kb/, andtmp/subfolders.analyzersscans recursively (skippingnode_modules,.git, etc.) and reports, per analyzer: files ininput/,.nlpfiles inspec/, and files inkb/user/. The report groups analyzers by top-level repo with per-repo subtotals, flags duplicate names, and ends with grand totals.--jsonwrites a machine-readable sibling file.
recloneclones into dev-tools's parent directory (e.g.c:\git\<repo>), not the current working directory. It refuses to reclonedev-toolsitself and prompts before deleting unless--yesis given.
- Create
src/scripts/<name>.ts. Shared helpers live insrc/lib/(log.tsfor colored output,fs.tsfor filesystem walking,paths.tsfor resolving dev-tools's root and parent directory). - Add an entry to the
"scripts"block inpackage.json:"<name>": "tsx src/scripts/<name>.ts"
- Document it in the table above.
Each script reads its arguments from process.argv.slice(2) and should exit
non-zero on failure.
MIT