Answering myself, but I spent a very busy 48 hours trying to get TiddlyWiki plugins to work with the Node.js edition. Microsoft Copilot must have shortcircuited a few circuits trying to help me. That’s why I documented my exhausting time. Here’s a summary of what I leanrd and a summary of the procedure that appears to have worked.
Unfortunately a few plugins were not possible to add at all, for example the Editor-Autolist or to work as expected. For the latter group I’ll make separate postings.
! ''Here’s the “battle report”''
As seen by Copilot — the narrative arc from where we started to where we are now
---
!! 📜 The Attempted Path
Initial plan: Grab sample or empty HTML wikis containing the desired plugins, extract the plugin tiddlers, and drop them into your Node.js wiki’s plugin folder.
''Expectation'': Straightforward — each HTML would yield a clean set of plugin.info + tiddlers for staging.
''Reality'': Many of those HTMLs were incomplete, outdated, or packaged in a way that didn’t match Node’s folder‑based plugin structure. Extraction was inconsistent — sometimes missing files, sometimes wrong folder names.
!! ⚠️ The Problems We Hit
Repo structure mismatches:
Some plugins lived in source/…, others in plugins/vendor/…, others only as .tid bundles under packaged/.
Our initial mv paths often pointed to folders that didn’t exist in the current repo version.
''Collision errors'':
Re‑running the script without clearing old copies caused “Directory not empty” failures.
''Busy folder errors'':
Trying to mv into a folder that was open in a terminal or file manager triggered “Device or resource busy”.
plugin.info missing:
In some cases we staged the wrong level of the repo, so ~TiddlyWiki saw the folder but not the plugin.
!! 🛠 The Fixes We Put in Place
Switched from HTML extraction to direct ~GitHub repo staging — pulling the actual folder‑based plugin source from the correct path in each repo.
Path verification — inspecting each repo with tree before adding it to the script, so we knew exactly where plugin.info lived.
Collision‑proof staging function — removing any existing copy before moving the new one in.
rsync for repo‑root plugins — avoiding “busy” errors by copying contents instead of replacing the folder.
Provenance logging — recording the repo URL and commit hash for every staged plugin.
---
✅ The Outcome
You now have a clean, working plugin base in /home/andy/TWplugins with correct folder names and plugin.info files.
The wiki starts without warnings, and all staged plugins appear in the control panel.
The process is repeatable — re‑running the script will refresh plugins without manual cleanup.
! Purpose
How to install plugins in ~TiddlyWiki Node.js Edition
!! ''1. Recon the Repo''
Clone to a temp dir:
```bash
tmpdir=$(mktemp -d)
git clone --depth 1 <repo-url> "$tmpdir/repo"
tree -L 3 "$tmpdir/repo"
Locate plugin.info
— note the exact relative path from repo root.
Common patterns:
source/
plugins//
repo root (rare)
Ignore .tid files under packaged/
— those are single‑file bundles for browser import, not Node.
!! ‘‘2. Add to stage-plugins.sh’’
Use the verified path as src_path and your desired folder name under $PLUGIN_BASE as dest_path:
stage_plugin "<repo-url>" "<src_path>" "<vendor>/<plugin-name>"
Example:
stage_plugin "https://github.com/kookma/TW-Favorites.git" \
"source/favorites" "kookma/favorites"
!! ‘‘3. Collision‑Proof the Function’’
Make sure your stage_plugin:
Removes any existing $dest_path
before staging.
Logs repo URL + commit hash for provenance.
Uses rsync instead of mv for repo‑root plugins to avoid “Device or resource busy”.
!! ‘‘4. Stage the Plugin’’
Run:
./stage-plugins.sh
Check the log:
cat "$PLUGIN_BASE/install-log-YYYY-MM-DD.txt"
Confirm the commit hash and that the folder contains plugin.info.
!! ‘‘5. Enable in tiddlywiki.info’’
Add the plugin to the “plugins” array:
"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem",
"vendor/plugin-name"
]
!! ‘‘6. Restart and Verify’’
Restart your wiki:
tiddlywiki . --listen port=8099
Open Control Panel → Plugins → Installed → confirm it appears without warnings.
!! ‘‘7. Housekeeping’’
Remove temp dirs:
bash
find /tmp -maxdepth 1 -type d -name 'tmp.*' -user "$USER" -mtime +0 -exec rm -rf {} +
Prune old logs if desired.
Archive unused plugins to $PLUGIN_BASE/_archive.
!! ‘‘Golden Rules’’
Never guess paths — always inspect the repo first.
Never stage .tid bundles for Node — use folder form with plugin.info.
Always log provenance — Future‑you will thank you.
Test one plugin at a time — easier to isolate issues.