Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spencerjibz/mongocli-client
SIMPLE CLI MONGO CLIENT FOR WINDOWS, LINUX AND MACOS
https://github.com/spencerjibz/mongocli-client
colorjs commanderjs inquirerjs mongodb mongodb-driver mongoose nodejs
Last synced: 26 days ago
JSON representation
SIMPLE CLI MONGO CLIENT FOR WINDOWS, LINUX AND MACOS
- Host: GitHub
- URL: https://github.com/spencerjibz/mongocli-client
- Owner: spencerjibz
- License: mit
- Created: 2019-02-23T07:04:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-18T23:31:27.000Z (over 3 years ago)
- Last Synced: 2024-04-25T11:02:48.920Z (7 months ago)
- Topics: colorjs, commanderjs, inquirerjs, mongodb, mongodb-driver, mongoose, nodejs
- Language: JavaScript
- Homepage:
- Size: 5.09 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## MongoCli-client
[![Run tests](https://github.com/spencerjibz/mongoCli-client/actions/workflows/node.js.yml/badge.svg)](https://github.com/spencerjibz/mongoCli-client/actions/workflows/node.js.yml)A simple command-line client for mongodb built on top of mongoose and the native mongodb-driver.It was designed to simplify usage of mongodb and its tools(shell). Once installed globally. No need for a GUI client.
### Requirements for usage
- Nodejs (v7 and higher) installed
- Mongodb (local, v3.6 and less)
### Installation
Before you install, ensure you have nodejs v7.xx and higher.Command-line tool is available on the npm registry.
``` npm install mongocli-client -g ```
### Features
- All CRUD(Create,Read,Update and Delete) operations with Mongodb
- Connection and management of the remote database via the remote command below
### Usage
``` Usage: app [options] [command]
Options:
-h, --help output usage information
Commands:
start|s starts the mongo service for windows platform or
checks if the service is running on other platforms
kill|k stops the mongodb service
list|ls lists the databases available for usage
documents|docs [options] returns all the documents in specific collection in a database
find|f [options] finds the specific document from the name database
list-collection|cols list all the collections in the preferred database
del|-d [options] deletes specified document from the database
remote|re connects to a remote database ie mlab or mongoaltas or
local mongo shell
eval|ev [options] run mongo shell commmand parsed as arguements
delcol|rmc [options] deletes the named collection
mkCol|ccol [options] create collection
delAll|dAll [options] deletes all the documents in the specific collection
add [options] add documents or an array of documents into the collection
update|up [options] updated a specific document
dropDb drops the specified database
stats returns of the statistics of the named database
mkDb creates the specified database
```
![](https://raw.githubusercontent.com/spencerjibz/mongoCli-client/master/assets/general.gif)
### key Facts on Usage
**Note**: For all the CRUD commands to work, ensure mongodb is running on the computer
1.**Start Command**:
For windows users, you should know the path to the mongo-bin directory. You'll be prompted to insert it Its better if you installed mongodb manually.
![](https://raw.githubusercontent.com/spencerjibz/mongoCli-client/master/assets/startCommand.gif)
2.**Remote Command**:
This command was designed to connect to a remote database or the local mongo shell. you'll be prompted to insert connection string.
if no connection is inserted, the App connects you to the mongoShell. Note: windows users must insert the mongo-bin path when prompted for this command to work. The command is illustrated in gif below.
![](https://raw.githubusercontent.com/spencerjibz/mongoCli-client/master/assets/remoteCommand.gif)
3.**CRUD operation illustration**
These operations illustrated below are only possible if mongodb service is running.
![](https://raw.githubusercontent.com/spencerjibz/mongoCli-client/master/assets/Crd.gif)
Enjoy the rest of the features
### Testing
Ensure that mongodb is running before running the command below.
``` npm test ```### License
[MIT](https://github.com/spencerjibz/mongoCli-client/blob/master/LICENSE)