#mongo-db #nushell #nushell-plugin #interactive #open

bin+lib nu_plugin_mongo

A nushell plugin to interactive with mongodb

3 releases

new 0.1.2 Dec 26, 2024
0.1.1 Nov 13, 2024
0.1.0 Oct 23, 2024

#760 in Database interfaces

Download history 136/week @ 2024-10-19 21/week @ 2024-10-26 10/week @ 2024-11-02 112/week @ 2024-11-09 22/week @ 2024-11-16 3/week @ 2024-11-23 1/week @ 2024-11-30 3/week @ 2024-12-07 144/week @ 2024-12-21

148 downloads per month

MIT and maybe CC-PDDC

54KB
914 lines

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, not mongo. Because I don't want to make the name conflict with official lagacy mongo cli.

Usage

  1. First, you need to have latest nushell installed(Of cause it's a nushell plugin).
  2. Then you can install from cargo
cargo install nu_plugin_mongo
  1. Add and use the plugin: plugin add <nu_plugin_mongo_path>; plugin use mongo
  2. Then you will gain some mongoc commands to play with.

Full help

> mongoc

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 find - find mongodb documents
  mongoc find-one - find mongodb documents
  mongoc list - list mongodb connections
  mongoc list-colls - list all available collection names
  mongoc list-indexes - find mongodb documents
  mongoc open - open mongodb connection, the url must contains default databse
  mongoc remove - remove mongodb handles
  mongoc select - select current mongodb handle

Flags:
  -h, --help: Display the help message for this command

Input/output types:
  ╭───┬─────────┬────────╮
  │ # │  input  │ output │
  ├───┼─────────┼────────┤
  │ 0 │ nothing │ string │
  ╰───┴─────────┴────────╯

Dependencies

~35–71MB
~1.5M SLoC