Install by running:
gem install mongogems
Needs Ruby installed.
Converts the MongoDB saved pipeline to a Mongo shell script
Example:
compass2mongosh --input=19031955.js --output=20091983.js
See notes for the filesystem path of the saved pipelines.
Generates a script to re-create indexes for a collection
Example:
mongoindex2file --uri='mongodb://localhost' -d test -c person -o person_idx.js
Fetches the log from the MongoDB instance and writes to a file
Example:
mongolog2file --uri='mongodb://localhost' -o mongod.log
Helps avoid repetitive work by saving the MongoDB URI. Subsequently invoking the shell with "mg s" will use the URI from the saved config.
Example:
mg config set uri 'mongodb://username:password@localhost'
mg s --eval 'db.getCollectionInfos()''
Paths for the MongoDB Compass Saved Aggregation Pipelines
- Windows:
%APPDATA%/MongoDB Compass/SavedPipelines
- macOS:
~/Library/Application Support/MongoDB Compass/SavedPipelines
- Linux:
~/.config/MongoDB Compass/SavedPipelines