Skip to content

Command Line Interface for MongoDB. For learning purposes.

License

Notifications You must be signed in to change notification settings

KenanBek/mongocli

Repository files navigation

Gopher with MongoDB

MongoCLI

Command Line Interface for MongoDB. MongoCLI.

Status: development in progress

Features

  • mongocli ping - check database connection, ping
  • mongocli dbs - list existing database names
  • mongocli colls or mongocli colls -d <db name> - list collection names
  • mongocli count <coll name> - count documents in the collection
  • mongocli list <coll name> - 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
  1. Test & Build
make test
make test/e2e
make build

Note: test coverage is not full.

  1. Run Mongo with Docker
docker run --name mongodb -p 27017:27017 mongo
  1. Use
mongocli ping

Releases

No releases published

Packages

No packages published