# gamecollection-cli

> CLI tool to maintain your game collection

Latest version **2.3.0** (published 2018-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gamecollection-cli
pnpm add gamecollection-cli
yarn add gamecollection-cli
bun add gamecollection-cli
```

Provides the command `gamecollection`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2018-06-28 |
| First published | 2017-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 6 |
| Unpacked size | 46.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Patrick Kraaij |
| Maintainers | patrickkraaij |

## Links

- npm: https://www.npmjs.com/package/gamecollection-cli
- Repository: https://github.com/patrickkraaij/gamecollection-cli
- Homepage: https://github.com/patrickkraaij/gamecollection-cli#readme
- Issues: https://github.com/patrickkraaij/gamecollection-cli/issues
- npm.io page: https://npm.io/package/gamecollection-cli

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^3.1.1
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [commander](https://npm.io/package/commander.md) ^2.11.0
- [thegamesdb](https://npm.io/package/thegamesdb.md) ^0.1.2
- [gamecollection-mongodb](https://npm.io/package/gamecollection-mongodb.md) ^0.3.0

## Recent versions

- 2.3.0 (latest) — 2018-06-28
- 2.2.0 — 2018-06-15
- 2.1.0 — 2018-06-07
- 2.0.0 — 2018-05-22
- 1.1.0 — 2017-10-16
- 1.0.0 — 2017-08-04

## README

gamecollection-cli
==================

![npm](https://img.shields.io/npm/v/gamecollection-cli.svg)
![node](https://img.shields.io/node/v/gamecollection-cli.svg)
![Codacy branch grade](https://img.shields.io/codacy/grade/962dc9309d404914af7d241c664208b8/master.svg)
![Codacy coverage](https://img.shields.io/codacy/coverage/962dc9309d404914af7d241c664208b8.svg)
![npm](https://img.shields.io/npm/dt/gamecollection-cli.svg)

Gamecollection-cli is a command line tool to store all your owned games into a MongoDB database. It retrieves data from thegamesdb.net.

## Table of Contents

1. [Configuration](#configuration)
2. [Installation](#installation)
3. [Commands](#commands)
4. [Examples](#examples)
5. [Contributing](#contributing)

## Configuration
<a name="configuration"></a>
Create a hidden file called `.gamecollection.config.js` in your home directory to make a connection to your MongoDB database.

``` shell
$ touch ~/.gamecollection.config.js
```

``` javascript
// .gamecollection.config.js
module.exports = {
  url: 'mongodb://[username:password@]host1[:port1][/[database][?options]]',
  db: 'nameOfYourDatabase',
  collection: 'games'
};
```

## Installation
<a name="installation"></a>
``` shell
$ yarn global add gamecollection-cli
```
or
``` shell
$ npm install -g gamecollection-cli
```

## Commands
<a name="commands"></a>
```
list [options]    Retrieve all the games from the database
add <game>        Search for a game and add it to the database
remove|rm <game>  Remove a game from the database
repair|rp         Repair your game collection
export|ex         Export your game collection to a JSON file and save it on disk
import|im         Import your game collection from a JSON file located on disk
```

## Examples
<a name="examples"></a>
``` shell
$ gamecollection list
$ gamecollection list -p
$ gamecollection list | grep Mario
$ gamecollection add Super Mario World
$ gamecollection remove Super Mario World
$ gamecollection repair
$ gamecollection export
$ gamecollection import
```
## Contributing
<a name="contributing"></a>
When contributing, please respect the ESLint rules. Check if you got any errors by running `npm run lint`.

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