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

1.0.0 • Public • Published

@artus-cli/artus-cli

artus-cli

NPM version NPM quality NPM download Continuous Integration Test coverage Oss Insight Analytics

artus-cli aims to provide a modern command-line-apps framework.

  • Powerful, powered by artusjs.
  • Modern, TypeScript and IoC ready.
  • Customizable, command inheritance, and support Plugin and Framework (wrap it as a upper layer CLI).
  • Community, enjoy the eco-friendliness, use the same plugin with your artusjs web apps.

How it looks

import { DefineCommand, Option, Command } from '@artus-cli/artus-cli';

@DefineCommand({
  command: 'dev',
  description: 'Run the development server',
  alias: [ 'd' ],
})
export class DevCommand extends Command {
  @Option({
    alias: 'p',
    default: 3000,
    description: 'server port',
  })
  port: number;

  async run() {
    console.info('port: %s', this.port);
  }
}

Run it with:

$ my-cli dev --port 8080

Document

https://artus-cli.github.io

Package Sidebar

Install

npm i @artus-cli/artus-cli

Weekly Downloads

942

Version

1.0.0

License

MIT

Unpacked Size

79.2 kB

Total Files

42

Last publish

Collaborators

  • thonatos
  • wanghx
  • atian25