Add "ns" alias for vector search
Implement RAG search using ollama + sqlite-vec
Limit listing of notes by only note.md files
This is a script that helps you with taking notes and looking them up later.
It uses a simple system of putting notes in individual directories under ~/Notes
.
The directory names look like 20241116091658-some_note
, and each contains at least
one note.md
file.
The script doesn't have any user interface itself, but relies on a combination of
fzf and your default $EDITOR
.
The previous iteration of this tool used to store notes in MIME envelopes, but that created problems with opening the same note simultaneously from multiple places. So this version uses plain directories.
notes.sh
file from this repo somewhere to your $PATH
Then add the following aliases to your ~/.bashrc
:
# Type "ne" to look up and edit an existing note, or create a new one
alias ne="notes.sh -l | fzf --tac --with-nth=\"2..-1\" --preview \"notes.sh -p {}\" --print-query --bind 'alt-enter:print-query' | xargs -o -d \"\n\" -n 2 notes.sh -f"
# RAG search with ollama (requires sqlite-vec)
alias ns="FZF_DEFAULT_COMMAND='echo' fzf --disabled --bind \"change:reload-sync:notes.sh -s {q} || true\" --tac --with-nth=\"2..-1\" --preview \"notes.sh -p {}\" --print-query --bind 'alt-enter:print-query' | xargs -o -d \"\n\" -n 2 notes.sh -f"
To add a new note:
ne
And then continue typing the note name and press Alt-Enter to create a new one.
To open a previously created note:
ne
Then select a note you want to open and press Enter.
Distributed under the terms of the BSD License