# mongotools

> Work In Progress - MongoTools will provide simple command line interface to import/export/clear Mongo documents.

Latest version **0.0.1** (published 2014-05-29) · UNLICENSE license · 0 weekly downloads

## Install

```sh
npm install mongotools
pnpm add mongotools
yarn add mongotools
bun add mongotools
```

Provides the command `mongotools`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-05-29 |
| First published | 2014-05-29 |
| Weekly downloads | 0 |
| License | UNLICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thierry 'Akarun' Lagasse |
| Maintainers | akarun |
| Keywords | mongodb, cli, shell, tools |

## Links

- npm: https://www.npmjs.com/package/mongotools
- Repository: https://github.com/ThierryLag/MongoTools
- Issues: https://github.com/ThierryLag/MongoTools/issues
- npm.io page: https://npm.io/package/mongotools

## Dependencies (1)

- [commander](https://npm.io/package/commander.md) 2.2

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-05-29

## README

# MongoTools

> **Warning !** Work in progress. This package isn't ready for production.

MongoTools is a little shell script that provide command line interface to
manage Mongo documents.

With a simple command, you can import, export, clean a Mongo database.  
Use this script directly in you shell or add it to grunt or git-hooks.

## Installation

You can download the script from [Github](https://raw.githubusercontent.com/ThierryLag/MongoTools/bash-version/mongotools.sh) :

* With CURL :

	    curl -s https://raw.githubusercontent.com/ThierryLag/MongoTools/bash-version/mongotools.sh -o mongotools.sh

* With WGET : 

		wget https://raw.githubusercontent.com/ThierryLag/MongoTools/bash-version/mongotools.sh
		
_Make sure the script is executable:_  

		chmod a+x mongotools.sh

## Settings

Edit the variables below at the beginning of the script :

* `DB_NAME='your-mongo-db'` : name of you mongo database
* `DB_COLLECTIONS=( 'your-documents' 'another' )` : array of documents to import/export/clear
* `DATAS_PATH='./_datas'` : path where the script store the datas.

## Usage

* **Make actions on MongoDB** :

        ./mongotools.sh [-o] (actions list)

    Execute each listed action in order you want:
    
    * export: export database collection in JSON
    * import: import collection from JSON
    * clear: remove all collections from database

    Example: `./mongotools.sh export clear import` :  
    export collections, then clear DB and finally re-import !

* **Display usage message** :

        ./mongotools.sh [-h]

* **Display script version** :

        ./mongotools.sh [-v | --version]
        
## License

BashTools is free and unencumbered public domain software.  
For more information, see <http://unlicense.org/> or the accompanying LICENSE file.

---
_Source: https://npm.io/package/mongotools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
