Help Plugin
The Help Plugin provides comprehensive help information for CLI applications built with Wizard.
Installation
npm install @hyperse/wizard-plugin-help
Quick Start
// @filename: @hyperse/wizard-plugin-help/dist/index.d.ts
import { , , } from '@hyperse/wizard';
import { } from '@hyperse/wizard-plugin-help';
const = ('evolve', {
: 'plugins.evolvePlugin.description',
}).({
: {
: ,
: 'evolveName',
: 'plugins.evolvePlugin.flags.evolveName',
},
});
const = ('migrate', {
: 'plugins.migratePlugin.description',
}).({
: {
: ,
: 'evolveName',
: 'plugins.migratePlugin.flags.migrateName',
},
});
const = ({
: 'hps_cli',
: 'cli.helpCli.description',
: 'cli.helpCli.version',
: helpCliMessages,
: () => {
.('CLI errorHandler \n', );
},
})
.(
({
: true,
: true,
: {
: {
: {
: '🎉🎉🎉Wizard cli is published by hps🎉🎉🎉',
: '@2025 wizard-plugin-help English version',
},
},
: {
: {
: '🎉🎉🎉Wizard cli 正在发布🎉🎉🎉',
: '@2025 wizard-plugin-help 中文版本',
},
},
},
})
)
.(
({
: () => 'test plugin',
: buildPluginMessages,
: () => {
return .(
('build', {
: 'plugins.buildPlugin.description',
: 'plugins.buildPlugin.example',
: 'plugins.buildPlugin.help',
})
.({
: {
: ,
: 'projectCwd',
: 'p',
: 'plugins.buildPlugin.flags.projectCwd',
},
: {
: ,
: 't',
: true,
: true,
: 'plugins.buildPlugin.flags.type',
},
: {
: ,
: 'plugins.buildPlugin.flags.timeout',
},
})
.(, )
);
},
})
)
.flag('version', {
: ,
: false,
: 'v',
: 'plugins.versionPlugin.description',
});
// execute command
// node ./cli.js -h
- English
- Chinese
API Reference
Parameters:Name | Type | Default |
---|---|---|
options | HelpPluginOptions |
Plugin<object, MergeCommandNameToContext<object, { help: object & { flags: { [x: string]: never; noColor: boolean; logLevel: "Error" | "Warn" | "Info" | "Debug" | "Verbose" | undefined; hpsAppEnv: string; hpsEnvPath: string | undefined; projectCwd: string; }; }; }>, FlagsWithBuiltin, FlagsWithBuiltin>
- HelpPluginOptions
Last updated on