Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌲 Spruce Lab

The browser companion to the spruce CLI — paste file names, flip the same transforms, preview before/after live.

Open the app →

platform deps privacy

What it does

Spruce Lab mirrors the spruce CLI in your browser, with two preview modes:

✏️ Rename mode

Live before→after preview through the exact CLI pipeline: strip → case → separator → prefix → numbering → date prefix → suffix

📦 Tidy mode

Preview what spruce tidy --strategy category would do — every file sorted into its category folder (images/, documents/, …) with per-folder stats.

Features

  • 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 mv script (with mkdir -p in 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

Run it

No build step, no install. Serve the folder with any static server:

python3 -m http.server 8080
# open http://localhost:8080

Or just double-click index.html — it's a single self-contained file (plus the manifest + icons, which are optional).

GitHub Pages

This repo publishes from main. To go live:

  1. Push this repo to GitHub (e.g. as spruce-lab).
  2. Repo Settings → Pages → Source: Deploy from a branchmain / / (root).

It's already live at sunji-droid.github.io/spruce-lab.

Keyboard

Key Action
Ctrl/Cmd + Enter Copy the new names / paths

Built with

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).

About

Spruce Lab — the browser companion to the spruce CLI: paste file names, apply the same transforms, preview before/after live.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages