tm-serve
v0.2.1
Published
Serve local .user.js files for Tampermonkey installation
Downloads
216
Readme
tm-serve
Development server for Tampermonkey userscripts. A CLI tool to serve, sync, and manage local .user.js files.
how to use
bunx tm-serveCommands
dev — Development server (default)
Starts an HTTP server for a single script with file watching.
tm-serve dev ./my-script.user.js
tm-serve ./my-script.user.js # "dev" can be omitted
tm-serve # default: script.user.js- Creates a template
.user.jsfile if it doesn't exist - Starts an HTTP server serving your userscript
- Opens your browser — Tampermonkey shows the install dialog
- Watches for file changes and reloads on save
push — Install scripts to browser
Serves multiple .user.js files and opens an index page in the browser. Click each link to install via Tampermonkey.
tm-serve push --all # all *.user.js under current directory
tm-serve push scripts/a.user.js scripts/b.user.js # specific filesimport — Import from backup
Extracts .user.js files from a Tampermonkey backup ZIP and writes them to scripts/.
Shows a diff and prompts for confirmation when an existing file differs.
tm-serve import ~/Downloads/tampermonkey-backup.zipinit — Initialize project
Creates a scripts/ directory and a sample userscript.
tm-serve initOptions
PORTenv var: server port (default:4889)
Requirements
- macOS (uses
dittofor ZIP extraction in theimportcommand)
