clivate
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.2 • Public • Published

CLIvate (WARNING - this project is not yet ready for production)

CLIvate - a typescript CLI tool generator

Installation

yarn add --dev clivate

Usage

Custom project commands

  • create config ts/json
  • specify search pattern
  • how to call (yarn clivate (command))

Package with bin

  • import clivate
  • register commands
  • build and publish

Adding package extensions

  • requires ts-node, don't prebuild
  • parse a config

Writing commands

import { CommandDescription, CommandName, CommandPrompts } from "clivate";

@CommandName("test")
@CommandDescription("a test command")
@CommandPrompts([{
  name:'prompt1',
  type:'confirm'
}])
class TestCommand extends Command {
  handler() {
    console.log("running test");
    run = true;
  }
  • command name
  • description
  • prompts
  • command args
  • handler
  • conditional prompts
  • calling another command
  • Non-root internal commands
  • Loading asynchronous prompt data.

Readme

Keywords

none

Package Sidebar

Install

npm i clivate

Weekly Downloads

0

Version

1.0.0-alpha.2

License

MIT

Unpacked Size

758 kB

Total Files

119

Last publish

Collaborators

  • johnhhorton