mongodb/mongo-tools ? reverse-engineered prompt
Reverse engineered prompt
Build me a Go based set of MongoDB command line tools that feel like the standard database utilities.
I want separate commands for dumping and restoring data, importing JSON, CSV, or TSV into a collection, exporting a collection to JSON or CSV, viewing BSON files in a readable format, working with GridFS files, and monitoring a running MongoDB server with stats and activity output.
Please make it practical to build from the repo, with a simple build script that produces binaries in a bin folder, and make sure the commands have helpful help text and sensible flags. Keep the code organized so each tool can live on its own, but share common MongoDB connection and option handling where possible.
If anything about current MongoDB behavior or Go best practices has changed, look up the current docs online and follow that. Also include tests or at least a clear way to run them, and make sure the whole thing works cleanly on modern systems.
Are you gonna build this?
make sure you review the code using coderabbit