The browser companion to the spruce CLI — paste file names, flip the same transforms, preview before/after live.
Spruce Lab mirrors the spruce CLI in your browser, with two preview modes:
Live before→after preview through the exact CLI pipeline: strip → case → separator → prefix → numbering → date prefix → suffix
Preview what spruce tidy --strategy category would do — every file sorted
into its category folder (images/, documents/, …) with per-folder stats.
- Inline diffs — removed parts struck through in red, added parts in green
- Collision detection — duplicate targets become
name_1,name_2… with ⚠ warnings, exactly like the CLI - Safety warnings — duplicate input lines, >180/>255-char names, and Windows-reserved characters/names (
CON,a<b>.txt, trailing dots) - Shell script export — one click to copy or download a ready-to-run
mvscript (withmkdir -pin tidy mode) — review before running! - Category + bucket badges using the same mapping as the CLI
- Stats bar — files, renamed/folders, conflicts, top categories
- CLI bridge — the bottom bar shows the exact
spruce rename …/spruce tidy …command for your current settings - Presets — sample mess, camera roll, downloads chaos, code workspace
- Sort & dedupe input buttons for batch prep
- Shareable URLs — settings + file list live in the URL hash; paste the link to share a config
- Light/dark theme toggle (persisted)
- PWA-ready — manifest + icons, installable from the address bar
- Export — copy new names, copy old→new mapping, download
.txt, download.sh - Zero dependencies, 100% local — no network calls, nothing leaves your browser
No build step, no install. Serve the folder with any static server:
python3 -m http.server 8080
# open http://localhost:8080Or just double-click index.html — it's a single self-contained file (plus
the manifest + icons, which are optional).
This repo publishes from main. To go live:
- Push this repo to GitHub (e.g. as
spruce-lab). - Repo Settings → Pages → Source: Deploy from a branch →
main// (root).
It's already live at sunji-droid.github.io/spruce-lab.
| Key | Action |
|---|---|
Ctrl/Cmd + Enter |
Copy the new names / paths |
Vanilla HTML/CSS/JS. No frameworks, no CDNs, no tracking. Because a file tool should be as lean as the files it tidies.
Built by Kabo Merapelo Onamile (mkonamile@gmail.com).