@youneed/cli-plugin-man
v0.1.0
Published
Man-page plugin: a man command emitting roff documentation from the catalogue.
Downloads
16
Readme
@youneed/cli-plugin-man
Man-page plugin for @youneed/cli. Registers a man command that
emits roff/troff documentation generated from the app's command catalogue —
the offline man(1) format (sections, .TP entries) you ship as a .1 file or
pipe straight to man.
import { Application } from "@youneed/cli";
import { man } from "@youneed/cli-plugin-man";
Application({
name: "ops",
version: "1.0.0",
description: "Operations toolkit",
commands: [/* … */],
plugins: [man()],
}).run();
// ops man > ops.1 → man ./ops.1Distinct from --help: man produces the offline page format, while
@youneed/cli-plugin-help renders the interactive
in-terminal usage.
Exports
man(options?)— the plugin. Registers themancommand.generateMan(host, exclude?)— produce the roff man page for a host as a string (themancommand itself is normally excluded).- Type:
ManOptions.
Options
command— name of the registered command. Default"man".
