Dnote: keeping Go notes from the command line

Dnote is a small command-line notebook written in Go. You
add one-line (or longer) notes to named “books” from the terminal, then list or full-text
search them later. It’s handy for the snippets you keep re-learning: a go test flag, a
go mod command, how a channel pattern works. Notes live in a local SQLite database
(~/.local/share/dnote/dnote.db by default); syncing between machines is optional and goes
through a Dnote server you host yourself.
Installation
Section titled “Installation”On macOS:
brew install dnoteOn Linux (the install script also lists Windows support):
curl -s https://www.getdnote.com/install | shYou can also download a binary for your platform from the
CLI releases page and put it on your PATH.
Check it worked with dnote version.
Adding notes
Section titled “Adding notes”A book is just a named group of notes, and it’s created the first time you add a note to it.
Pass the content with -c; without it, Dnote opens your editor.
dnote add go -c "Use the fmt package for formatted I/O"dnote add go-concurrency -c "Use channels to pass data between goroutines"Stdin works too, which is useful for saving command output:
go env GOPATH GOMODCACHE | dnote add goViewing notes
Section titled “Viewing notes”dnote view does three things depending on how many arguments you give it:
dnote view # list all booksdnote view go # list the notes in the "go" book, with their idsdnote view go 1 # show a single noteSearching
Section titled “Searching”dnote find runs a full-text search across every book, or one book with -b:
dnote find "channels"dnote find "goroutines" -b go-concurrencyEditing and removing
Section titled “Editing and removing”Notes are edited or removed by the id shown in dnote view <book>. Books are addressed by
name.
dnote edit 3 -c "Use buffered channels when the producer shouldn't block"dnote edit 3 -b go-concurrency # move note 3 to another bookdnote edit go-concurrency -n go-conc # rename a bookdnote remove 5remove asks for confirmation unless you pass -y.
- Pick a naming scheme for books early (
go,go-concurrency,go-testing) sodnote viewstays readable. - Keep each note to one idea. Short notes are easier to find with
dnote find. - If you want notes on more than one machine, set up the self-hosted server, then run
dnote login --apiEndpoint <your server>/apianddnote sync. Without a server, everything stays local.
Further reading
Section titled “Further reading”© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)