mongo-schema-cli
v0.0.1
Published
Utility command line tool for MongoDB collections queries. Based on mongo-schema-gen
Downloads
8
Maintainers
Readme
mongo-schema-cli
Utility command line tool for MongoDB collections queries. Based on mongo-schema-gen
Installation
$ npm install -g mongo-schema-cliDocs
Usage: mongogen [options] [command]
Commands:
keys [options] <mongoUrl> List all keys in use in database collection
schema [options] <mongoUrl> Show collection schema
used [options] <mongoUrl> Reports if key is in use in collection or not
stats [options] <mongoUrl> Reports collections stats including collection size, document counts and average document size
Options:
-h, --help output usage information
-V, --version output the version numberUsage
There are three commands available: lindaikeji top, lindaikeji read, lindaikeji open.
keys command
$ mongogen keys mongodb://localhost:27017/sample -c users
Prints an array of all the keys used in users collection
schema command
$ mongogen schema mongodb://localhost:27017/sample -c users
Prints a schema for users collection based on the data types of documents stored.
used command
$ mongogen used mongodb://localhost:27017/sample -c users -k name
Prints a boolean - true if key name is used in users collection, false if otherwise
stats command
$ mongogen stats mongodb://localhost:27017/sample -c users
Prints a JSON containing basic information about collection.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to add more features or fix bugs. Read more on contributing.
How can I thank you?
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!
Don't forget to follow me on twitter!
Thanks! Mustapha Babatunde Oluwaleke.
License
The source code is open-sourced software licensed under the MIT License.
