0.0.3 • Published 10 months ago

mongokit v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

mongokit

A command line toolkit for interacting with MongoDB.

Click here to support my work

Install

npm install -g mongokit

Connect your database

There are two options for connecting the mongokit commands to your own database.

CLI option

Use the option --uri and set it to the connection string for your database when running a command.

Example:

--uri mongodb://localhost:27017

Environment variable

Set the environment variable MONGO_URI to the connection string for your database before running commands.

Example:

export MONGO_URI=mongodb://localhost:27017

Or on Windows:

set MONGO_URI=mongodb://localhost:27017

Run commands

There is a full suite of commands you can run. Here's an example to get a whole collection as JSON data:

mongokit get collection <collection-name>

To see the full list of commands to get and set data:

mongokit --help

Run commands in development

Clone the repo and then install dependencies:

cd mongokit
npm install

Run commands:

npx ts-node src/cli.ts get dbs
0.0.3

10 months ago

0.0.2

12 months ago

0.0.1

12 months ago

1.0.0

5 years ago