So over the last few years as a developer I've experienced three instances of MacBook swollen battery syndrome. I do not know if I'm just scripting too much, too many projects with npx calls for React 🤪 , or just bad luck. Either way I've found over time I was manually copying over my BBEdit settings to my NAS so I could easily setup my replacement/loaner and in the process thought there has got to be a better way then manual and could this help anyone else 🤔 .
To resolve this headache and since I've enjoyed writing more in Node I thought it be fun to write a Node CLI. Currently this is very basic but in my free time (if ever 🙄 ) I'm thinking of building in launchd support that pushes to a repository and/or NAS.
NPM:
npm i bbedit-recoveryinstall dependencies
cd bbedit-recovery && npm iNPM link
After dependencies are added run:
npm linkIf you're done run to remove
npm unlinkThis package can take three CLI commands:
bbedit-recovery
bbedit-recoveror the shorthand:
bbrecby default with no options passed this will create a directory named bbedit-recovery and copy over all directories that are not empty and files. This location can be echoed with the pwd command in the terminal if you're unsure where files will go.
What's a CLI without options, right? Currently this takes two dest and name but I can assure you there will be more in the future.
You can specify where the files will be copied to by passing either the commands --name or the shorthand -n. This expects and tests for a directory. If a directory isn't valid it will error out.
Example:
bbedit-recover -dest /Users/$USER/supercalifragilisticexpialidociousshorthand:
bbrec -d /Users/$USER/supercalifragilisticexpialidociousIf you'd like to copy files to your Desktop directory:
bbedit-recover -d DesktopIf you'd like to copy files to your Documents directory:
bbedit-recover -dest Documentsewww.. a shorthand for Documents:
bbedit-recover -d DocsWell, I'm hurt that you do not like the name bbedit-recovery. Fine, so be it, there is an option to change it just for you:
bbedit-recover -dest /Users/$USER/Desktop/supercalifragilisticexpialidocious -name recoveryshorthand:
bbrec -d /Users/$USER/Desktop/supercalifragilisticexpialidocious -n recoverWhat's a CLI without a groovy terminal banner:
bbedit-recovery introDocumentation writing is soooo boring. If I add a feature and forget to update the README.md you can get a listing of the commands:
bbedit-recovery --help- Add exclusion parameters
- Run off a
launchd - Ability to push to a repo