Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:04:14 +08:00
commit 70c36b5eff
248 changed files with 47482 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import { Command, Flags } from '@oclif/core'
export default class {{COMMAND_NAME}} extends Command {
static description = '{{DESCRIPTION}}'
static examples = [
'<%= config.bin %> <%= command.id %> --name World',
'<%= config.bin %> <%= command.id %> --name "John Doe" --verbose',
]
static flags = {
name: Flags.string({
char: 'n',
description: 'Name to use',
required: true,
}),
verbose: Flags.boolean({
char: 'v',
description: 'Show verbose output',
default: false,
}),
force: Flags.boolean({
char: 'f',
description: 'Force operation',
default: false,
}),
}
static args = {}
async run(): Promise<void> {
const { flags } = await this.parse({{COMMAND_NAME}})
if (flags.verbose) {
this.log('Verbose mode enabled')
}
this.log(`Hello, ${flags.name}!`)
if (flags.force) {
this.log('Force mode: proceeding without confirmation')
}
}
}