Skip to Content
🎉 Hyperse Wizard has been published.

Version Plugin

The Version Plugin provides version information for CLI applications built with Wizard.

Installation

npm install @hyperse/wizard-plugin-version

Quick Start

cli.ts
import { createWizard } from '@hyperse/wizard'; import { createVersionPlugin } from '@hyperse/wizard-plugin-version'; const cli = createWizard({ name: 'my-cli', description: 'My CLI application', version: '1.0.0', }); cli.use(createVersionPlugin()).parse(); // execute command // node ./cli.js --version // print version information // v1.0.0

API Reference

Parameters:
NameTypeDefault
optionsVersionPluginOptions
Returns:
Plugin<CommandNameToContext, MergeCommandNameToContext<CommandNameToContext, { version: object; }>, Flags>
  • VersionPluginOptions
NameTypeDefault
flagboolean

Whether to register the global version flag.

true
hiddenPrefixboolean

Whether to print the version with not hidden v prefix.

false
Last updated on