5 releases
new 0.1.4 | Mar 20, 2025 |
---|---|
0.1.3 | Feb 6, 2025 |
0.1.2 | Dec 26, 2024 |
0.1.1 | Nov 13, 2024 |
0.1.0 | Oct 23, 2024 |
#677 in Database interfaces
55KB
1K
SLoC
nu_plugin_mongo
A nushell plugin to interactive with mongodb.
Sometimes I want to explore mongodb data, but I don't want to open mongo
shell or python
to query mongodb data.
I want to have more lite weight tool to explore data. So here is the plugin.
Demo
Note
- All I want to do is query and explore data, so the plugin includes query commands only.
- You might note that the command prefix is
mongoc
, notmongo
. Because I don't want to make the name conflict with official lagacy mongo cli.
Usage
- First, you need to have latest nushell installed(Of cause it's a nushell plugin).
- Then you can install from
cargo
cargo install nu_plugin_mongo
- Add and use the plugin:
plugin add <nu_plugin_mongo_path>; plugin use mongo
- Then you will gain some
mongoc
commands to play with.
Full help
Operate with mongodb
You must use one of the following subcommands. Using this command as-is will only produce this help message.
Usage:
> mongoc
Subcommands:
mongoc count (plugin) - count mongodb documents
mongoc delete-many (plugin) - delete many mongodb documents
mongoc delete-one (plugin) - delete one mongodb document
mongoc drop (plugin) - drop a mongodb collection
mongoc estimated (plugin) - estimated mongodb documents count
mongoc find (plugin) - find mongodb documents
mongoc find-one (plugin) - find mongodb documents
mongoc list (plugin) - list mongodb connections
mongoc list-colls (plugin) - list all available collection names
mongoc list-indexes (plugin) - find mongodb documents
mongoc open (plugin) - open mongodb connection, the url must contains default databse
mongoc remove (plugin) - remove mongodb handles
mongoc select (plugin) - select current mongodb handle
Flags:
-h, --help: Display the help message for this command
Input/output types:
╭───┬─────────┬────────╮
│ # │ input │ output │
├───┼─────────┼────────┤
│ 0 │ nothing │ string │
╰───┴─────────┴────────╯
Dependencies
~37–68MB
~1.5M SLoC