Yes, I built an open source tool called Dnote [0]. Basically, I can write down my microlessons as I learn them without leaving the terminal or browser. And it sends me a weekly digest to automate spaced repetition.
I used to use Evernote to write down my knowledge but I quickly found that I never look back at my notes, and quickly lost grasp of my knowledge. That's why I built the automated email digest.
My workflow is simple: when I learn something, I execute a command line program to write it down without leaving the terminal when I am coding. Every weekend, I receive a digest of what I learned in the past. This way, I can successfully maintain all the new knowledge I acquire.
Similarly to your requirements, I often search through my knowledge base in the terminal before doing a web search. Doing so saves me time because my knowledge base is already written in my own words that I understand well.