handoffdev
v0.1.1
Published
Mirror the current folder into a disposable testing copy.
Maintainers
Readme
HandoffDev
HandoffDev copies the folder you are currently in into another folder for testing.
It is built for workflows like Chrome extension development:
- Load one stable unpacked extension folder in Chrome.
- Keep working in whatever branch, worktree, or clone you want.
- Run
handoffdevto refresh the testing copy. - Reload the extension in Chrome.
Install
From npm, after the package is published:
npm install -g handoffdevFrom this repo right now:
npm install
npm linkAfter npm link, handoffdev is available in your shell.
Quick Start
Run it from inside the folder you want to mirror:
cd /path/to/your/project
handoffdevIf you already know the destination:
handoffdev ~/Documents/GitHub/"test dev"
handoffdev "~/Documents/GitHub/test dev"
handoffdev $HOME/Documents/GitHub/"test dev"
handoffdev "$HOME/Documents/GitHub/test dev"
handoffdev --clean ~/Documents/GitHub/"test dev"Main Commands
handoffdev
handoffdev <destination>
handoffdev --clean
handoffdev --clean <destination>
handoffdev <destination> --clean
handoffdev -- <destination>
handoffdev -h
handoffdev --h
handoffdev -help
handoffdev --helpWhat It Does
- Copies the contents of your current folder into a destination folder.
- Uses
rsync --delete, so the destination becomes a mirror of your current folder. - Always skips
.git/and.DS_Store. --cleanalso skips common local junk likenode_modules/and cache folders.- If the destination already has files in it, HandoffDev asks for confirmation before deleting anything.
Interactive Mode
- Running
handoffdevwith no destination opens an interactive prompt. - HandoffDev remembers your last 3 unique successful destinations per project.
- Git worktrees share the same recent history.
- If there is no history yet, it asks you to enter a path.
History is stored at:
~/Library/Application Support/HandoffDev/history.jsonPath Rules
~and$HOMEare supported.- Relative paths are resolved from the folder you run HandoffDev in.
- Empty destinations,
/, protected anchor folders, the current source folder, parents of the source folder, and children of the source folder are rejected. - On macOS,
GitHubandGithubare treated as the same path for safety checks and history matching.
$HOME vs $Home
Use $HOME or ~.
Do not use $Home. In zsh, $Home expands before HandoffDev starts, so HandoffDev cannot recover what you meant and the resulting path is rejected as unsafe.
Development
npm test