Skip to content

Plugins

oneRepo features a plugin interface to enable shared and reusable commands and functionality into the one command-line interface.

Plugins are objects comprised of three possible hooks.

KeyTypeDescription
startup(argv) => Promise<void> | <void>Run a function before any and all commands, after argument parsing.
shutdown(argv) => Promise<void> | <void>Run a function after any and all commands, after argument parsing.
yargs(yargs, visitor) => YargsA function that is given the CLI’s Yargs instance. Useful for adding custom commands and middleware.