Skip to main content

Function: handleOpenCliRequest()

handleOpenCliRequest(argv, document, write?): Promise<boolean>

If argv requests the OpenCLI document (__opencli subcommand, optionally with upstream's -o/--out <file> flag), write it — JSON, 2-space indented, single trailing newline — to that file or to stdout, and return true. Otherwise return false without writing anything, so the caller can continue parsing argv as usual.

Parameters

argv

readonly string[]

document

() => OpenCliDocument

write?

(chunk) => void

Returns

Promise<boolean>