Skip to content

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.

On macOS:

Terminal window
brew install dnote

On Linux (the install script also lists Windows support):

Terminal window
curl -s https://www.getdnote.com/install | sh

You 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.

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.

Terminal window
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:

Terminal window
go env GOPATH GOMODCACHE | dnote add go

dnote view does three things depending on how many arguments you give it:

Terminal window
dnote view # list all books
dnote view go # list the notes in the "go" book, with their ids
dnote view go 1 # show a single note

dnote find runs a full-text search across every book, or one book with -b:

Terminal window
dnote find "channels"
dnote find "goroutines" -b go-concurrency

Notes are edited or removed by the id shown in dnote view <book>. Books are addressed by name.

Terminal window
dnote edit 3 -c "Use buffered channels when the producer shouldn't block"
dnote edit 3 -b go-concurrency # move note 3 to another book
dnote edit go-concurrency -n go-conc # rename a book
dnote remove 5

remove asks for confirmation unless you pass -y.

  • Pick a naming scheme for books early (go, go-concurrency, go-testing) so dnote view stays 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>/api and dnote sync. Without a server, everything stays local.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)