diff --git a/bin/docpub.js b/bin/docpub.js index e3fbf71..749e950 100755 --- a/bin/docpub.js +++ b/bin/docpub.js @@ -18,6 +18,25 @@ program .option('--config-path ', 'path for the config') .option('-v --verbose', 'verbose output'); +program.on('--help', () => { + console.log(' Overriding config'); + console.log(' To override any config option use full option path converted to --kebab-case'); + console.log(''); + + console.log(' Examples:'); + console.log(' docpub --username user@example.com'); + console.log(' docpub --token abcdefghijklmn12345'); + console.log(''); + console.log(' You can also use environment variables converted to snake_case with'); + console.log(' docpub_ prefix'); + console.log(''); + console.log(' Examples:'); + console.log(' docpub_url=my-awesome-docs.zendesk.com docpub'); + console.log(' docpub_token=abcdefghijklmn12345 docpub'); + console.log(''); + console.log(' If both cli flag and env var are used, cli flag takes precedence') ; +}); + program.parse(process.argv); const docpub = new Docpub(program);