Node.js has included a persistent history with it’s REPL (real-eval-print loop)
for quite some time now. It’s a fantastic quality of life feature, and it even
The other day, I got to wondering, where the heck does this history even live?
Turns out, it’s just living in a text file in your home directory, similar to
zsh handles it.
The file in question is,
It contains a history, sans any sort of time of execution, of the commands
you’ve entered into the Node.js REPL. The most recent entries are at the top of
Since it’s just a simple text file, if you ever did want to clear the file out,
you could do so by running:
echo > ~/.node_repl_history