diff --git a/README.md b/README.md index 8d71de5..83ca65a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ shout ``` For more information: + ``` shout --help ``` @@ -40,7 +41,13 @@ shout --help ## Configuration -Open your `config.json` file and edit: +Open the `config.json` file by running: + +``` +shout config +``` + +The settings: __port__ The default port to be used. @@ -50,6 +57,7 @@ __public__ Set to either `true|false`. When set to `false`, a login will be required for connecting users. + ## User Management Go ahead and run `shout --help`: diff --git a/package.json b/package.json index abf8ea9..8621d69 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "A web IRC client", - "version": "0.10.4", + "version": "0.10.5", "author": "Mattias Erming", "preferGlobal": true, "bin": { diff --git a/src/cli/config.js b/src/cli/config.js new file mode 100644 index 0000000..365fbfc --- /dev/null +++ b/src/cli/config.js @@ -0,0 +1,13 @@ +var program = require("commander"); +var child = require("child_process"); + +program + .command("config") + .description("Open the config") + .action(function() { + child.spawn( + "sudo", + ["vim", process.cwd() + "/config.json"], + {stdio: "inherit"} + ); + }); diff --git a/src/cli/index.js b/src/cli/index.js index 325b6aa..4457847 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -1,6 +1,7 @@ var program = require("commander"); require("./start"); +require("./config"); require("./list"); require("./add"); require("./remove");