Simple Linux "UI" for viewing schemas and example data

I developed a tool that allows me to view schema and example rows from my database, directly from my Ubuntu shell. I have a firewall and my public IP is DHCP, so trying to use tools to allow me to view the database from my laptop, yet keep it secure, is difficult. This is a quick, down-and-dirty “just let me see some data” schema and example data viewer. I find it very helpful, so I figured others might as well. Here’s how to install and run it:

curl -O Source Code | 7Vmz2 | Rocket Powered Pastebin -o mongo_ui.sh
chmod +x mongo_ui.sh
./mongo_ui.sh

From my comments on top of the script:

mongo_ui.sh - MongoDB Terminal Explorer

----------------------------------------

View MongoDBs locally from a Linux shell window in an easy-to-use terminal UI.

Only tested in Ubuntu, because that’s all I have.

This script connects to a MongoDB instance and allows you to:

- Select a database and collection using fzf

- View a sample document

- View inferred schema types

- View the top 10 documents in a collection

:lock: This tool is strictly read-only. It does not write, update, or delete any data.

:white_check_mark: Requirements:

- fzf: sudo apt install fzf

- jq: sudo apt install jq

- mongosh: https://www.mongodb.com/try/download/shell