@sugarat/cli-plugin-config
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@sugarat/cli-plugin-config

Expand the config command for commander

Quick Started

install

npm install @sugarat/cli-plugin-config

register

import definePlugin from '@sugarat/cli-plugin-config'
import { Command } from 'commander'

const programInstance = new Command()

const defaultConfig = {}
const configPlugin = definePlugin('.sugarat/.clirc', defaultConfig)

configPlugin.command(programInstance)

programInstance.parse(process.argv)

then you cli will have config command

图片

CRUD

command get <key>
command set <key> <value>
command del <key>
command ls

图片

Package Sidebar

Install

npm i @sugarat/cli-plugin-config

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

11 kB

Total Files

6

Last publish

Collaborators

  • atqq