Gamecollection-cli is a command line tool to store all your owned games into a MongoDB database. It retrieves data from thegamesdb.net.
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'
};
$ yarn global add gamecollection-cli
or
$ npm install -g gamecollection-cli
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
$ 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
When contributing, please respect the ESLint rules. Check if you got any errors by running npm run lint
.