Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenanbek/mongocli
Command Line Interface for MongoDB. For learning purposes.
https://github.com/kenanbek/mongocli
cli client command-line go golang mongoclient mongodb
Last synced: 3 months ago
JSON representation
Command Line Interface for MongoDB. For learning purposes.
- Host: GitHub
- URL: https://github.com/kenanbek/mongocli
- Owner: KenanBek
- License: apache-2.0
- Created: 2019-09-25T16:01:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-15T21:01:37.000Z (about 5 years ago)
- Last Synced: 2024-08-24T01:56:29.157Z (5 months ago)
- Topics: cli, client, command-line, go, golang, mongoclient, mongodb
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 11
- Watchers: 5
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Gopher with MongoDB](https://cdn.cp.adobe.io/content/2/dcx/8182b7fd-7661-4b81-8a2e-276c203ecfa3/rendition/preview.jpg/version/0/format/jpg/dimension/width/size/1200)
# MongoCLI
**C**ommand **L**ine **I**nterface for **Mongo**DB. **MongoCLI**.
Status: development in progress
## Features
- `mongocli ping` - check database connection, ping
- `mongocli dbs` - list existing database names
- `mongocli colls` or `mongocli colls -d ` - list collection names
- `mongocli count ` - count documents in the collection
- `mongocli list ` - list documents in the collection
- Use configuration file for default connection settings and database name: `~/mongocli.yml` (example configuration file included)
- Use command line args for connection settings: `mongocli ping -s localhost -p 27017 -d config` or `mongocli ping --server localhost --port 27017 --database config`## Usage
For now, MongoCLI distributed only via GitHub.
1. Clone repository
```
git clone https://github.com/KenanBek/mongocli.git
```2. Test & Build
```
make test
make test/e2e
make build
```Note: test coverage is not full.
3. Run Mongo with Docker
```
docker run --name mongodb -p 27017:27017 mongo
```4. Use
```
mongocli ping
```