mailer/cli.ts

20 lines
472 B
TypeScript

import config from './deno.json' with { type: 'json' }
import { Command } from '@cliffy/command/command.ts'
import { cmd as send } from './cli/send.ts'
import { cmd as preview } from './cli/preview.ts'
const cli = new Command()
.name('cohamail')
.description('Mail cli for coh@bit.')
.version(config.version)
.command('preview', preview)
.command('send', send)
if (import.meta.main) {
if (Deno.args.length) {
cli.parse(Deno.args)
} else {
cli.showHelp()
}
}