@boost/cli
An interactive command line program builder, powered by React and Ink.
import { Program } from '@boost/cli';
import BuildCommand from './commands/Build';
import CleanCommand from './commands/Clean';
const program = new Program({
bin: 'boost',
name: 'Boost',
version: '1.2.3',
});
program.register(new BuildCommand());
program.register(new CleanCommand());
await program.runAndExit(process.argv);
Features
- Supports common argument features like commands, options, flags, parameters, and more.
- Export a stand-alone or command-based CLI program binary.
- Write declarative commands with decorators, or imperative commands with static properties.
- Write shorthand proxy commands for small one offs.
- Renders interface using React and Ink at 16 FPS, or output simple strings.
- Outputs beautiful help, usage, error, and index menus.
- Buffers console logs to avoid render tearing.
- Apply middleware to the argv list, or to the parsed arguments.
- Customize output colors using Boost-based terminal themes.
Installation
yarn add @boost/cli react
Documentation
Index
Classes
Functions
Interfaces
Namespaces
Type Aliases
- ArgList
- Argv
- CLIErrorCode
- Categories
- CategoryItemMap
- CommandConfigMap
- CommandMetadataMap
- CommandPath
- ExitCode
- ExitHandler
- ListType
- Middleware
- MiddlewareArguments
- MiddlewareCallback
- OptionConfig
- OptionConfigMap
- Options
- ParamConfig
- ParamConfigList
- Params
- PartialConfig
- PrimitiveType
- ProgramBootstrap
- RunResult
- ScalarType
- StyleType
- TaskContext
- ThemePalette
- UnknownOptionMap
- ValueType
- Writeable
Variables
Type Aliases
ArgList
Argv
CLIErrorCode
Categories
CategoryItemMap
Type parameters
- T
CommandConfigMap
CommandMetadataMap
CommandPath
ExitCode
ExitHandler
ListType
Middleware
MiddlewareArguments
MiddlewareCallback
OptionConfig
OptionConfigMap
Options
Type parameters
- T: object
ParamConfig
Abstract type for easier typing.
ParamConfigList
Params
Type parameters
- T: PrimitiveType[]
PartialConfig
Type parameters
- T
PrimitiveType
ProgramBootstrap
RunResult
ScalarType
StyleType
TaskContext
Type parameters
ThemePalette
UnknownOptionMap
ValueType
Writeable
Type parameters
- T
Abstract type for easier typing.