This seems very familiar to a bash application I created that follows the zettelkasten note taking method. The source can be found here https://github.com/AndrewCopeland/zettelkasten
Each note is saved as a markdown file in GitHub and can be searched and linked easily from the zk cli.