2.3.0 • Published 6 years ago

gamecollection-cli v2.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

gamecollection-cli

npm node Codacy branch grade Codacy coverage npm

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
  2. Installation
  3. Commands
  4. Examples
  5. Contributing

Configuration

Create a hidden file called .gamecollection.config.js in your home directory to make a connection to your MongoDB database.

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

Installation

$ yarn global add gamecollection-cli

or

$ npm install -g gamecollection-cli

Commands

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

$ 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

When contributing, please respect the ESLint rules. Check if you got any errors by running npm run lint.