feat(cli): add main cli
This commit is contained in:
parent
0131a7369e
commit
3e128cf80d
17
cli.ts
Normal file
17
cli.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import config from './deno.json' with { type: 'json' }
|
||||
import { Command } from '@cliffy/command/command.ts'
|
||||
import { cmd: send } from './cli/send.ts'
|
||||
|
||||
const cli = new Command()
|
||||
.name('cohamail')
|
||||
.description('Mail cli for coh@bit.')
|
||||
.version(config.version)
|
||||
.command('send', send)
|
||||
|
||||
if (import.meta.main) {
|
||||
if (Deno.args.length) {
|
||||
cli.parse(Deno.args)
|
||||
} else {
|
||||
cli.showHelp()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue