Extend and colorize MongoDB shell Databases 25.12.2015

Mongo-Hacker is extension to mongo's shell. Some of them

  • Sort document keys by default
  • Highlight querytime if verboseShell is enabled
  • Default indent is 2 spaces instead of tab
  • Custom prompt: hostname(process-version)[rs_status:set_name] db>
  • Always pretty print
  • Show DBs has aligned columns and shows less significant digits
  • Colorized query output for console/terminal windows supporting ANSI color codes

Install

mkdir ~/.mongo && cd ~/.mongo
git clone git@github.com:TylerBrock/mongo-hacker.git
cd mongo-hacker
make
make install

Connect to test DB

mongo testdb