Working as a frontend dev for a large e-commerce company, I find myself switching between different features quite frequently. It's pretty much a given, as soon as I start a new ticket at work or even a new personal project, I press cmd+n in my editor and start taking down any relevant notes I come across. The problem however is as soon as I have to switch to something else, I just end up saving the file to my desktop. I have to hope I don't forget the filename or that it even existed.
Recently I was looking for a better way to keep track of my notes. Sure there's Google drive, native desktop note taking apps, or even git submodules but I was looking for something simpler. I would like to have a persistent file open in my IDE, right next to the files I'm working on, but it couldn't live in the same directory as the current project. And I would need a way to easily switch between notes without opening and closing different files.
I decided to write a CLI as a wrapper around a single git repository. The repo would act like a scratchpad. For every project, feature or idea I would create a new branch with a blank file, treating it as a new page in the scratchpad. I could then create symbolic references to each branch with a semantic name that would make it easier to remember which page to flip to when switching work; just like placing a bookmark.
The source code and full documentation is available at https://github.com/bsawyer/scratchpad
If you have run into a similar problem I hope you find this script useful and would certainly appreciate any feedback.
Top comments (0)