https://github.com/artus-cli/artus-cli
CLI framework with modern features
https://github.com/artus-cli/artus-cli
artus artusjs cli command-line
Last synced: 11 months ago
JSON representation
CLI framework with modern features
- Host: GitHub
- URL: https://github.com/artus-cli/artus-cli
- Owner: artus-cli
- License: mit
- Created: 2022-12-09T03:23:42.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-29T04:06:40.000Z (about 2 years ago)
- Last Synced: 2024-11-07T09:53:22.651Z (over 1 year ago)
- Topics: artus, artusjs, cli, command-line
- Language: TypeScript
- Homepage:
- Size: 203 KB
- Stars: 48
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @artus-cli/artus-cli

[](https://npmjs.org/package/@artus-cli/artus-cli)
[](https://npmjs.org/package/@artus-cli/artus-cli)
[](https://npmjs.org/package/@artus-cli/artus-cli)
[](https://github.com/artus-cli/artus-cli/actions/workflows/ci.yml)
[](https://codecov.io/gh/artus-cli/artus-cli)
[](https://ossinsight.io/analyze/artus-cli/artus-cli)
`artus-cli` aims to provide a modern command-line-apps framework.
- **Powerful**, powered by [artusjs](https://github.com/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
```ts
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:
```bash
$ my-cli dev --port 8080
```
## Document
https://artus-cli.github.io