#1680·yargs

Global epilogue

Author: astorijeCreated Jun 26, 2020Updated Aug 2, 2026
Labelstriagedfeature request

Given the (very) simplified example:

typescript
yargs
  .scriptName('foo')
  .options({ baz: {} })
  .command('bar', 'The bar command')
  .epilogue('Epilogue goes here').argv;

foo --help displays the epilogue:

foo [command]

Commands:
  foo bar  The bar command

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --baz

Epilogue goes here

but foo bar --help does not:

foo bar

The bar command

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --baz

In this sense, defining epilogue at the top-level acts differently compared to a top-level options.

It would be very helpful to be able to display the epilogue for all commands, instead of repeating it for all commands. I understand changing the default behavior would be breaking (though that would be my preference, but that's up to you), maybe an option as second argument?