If you’re using MongoDB you’re most likely working daily with its shell.
pretty() method to all queries, to make it easier to read the results.
After few manual types, I decided to use
pretty() by default.
To do so for a specific session:
(mongod-3.6.0) test> DBQuery.prototype._prettyShell = true
To enable it globally just add it to your
$ echo DBQuery.prototype._prettyShell = true >> ~/.mongorc.js
For local development, I use Tyler Brock’s mongo-hacker.
I recommend trying it even if you’re only interested in UX enhancement (there are many more great features…).
$ npm install -g mongo-hacker
If you’re interested in changing the mongo shell batch size checkout my previous til.