mailer/cli.ts

20 lines
461 B
TypeScript
Raw Normal View History

2024-03-29 16:25:29 +01:00
import config from './deno.json' with { type: 'json' }
2024-07-15 12:10:57 +02:00
import { Command } from '@cliffy/command'
2024-03-29 16:30:33 +01:00
import { cmd as send } from './cli/send.ts'
2024-04-03 17:56:38 +02:00
import { cmd as preview } from './cli/preview.ts'
2024-03-29 16:25:29 +01:00
const cli = new Command()
.name('cohamail')
.description('Mail cli for coh@bit.')
.version(config.version)
2024-04-03 17:56:38 +02:00
.command('preview', preview)
2024-03-29 16:25:29 +01:00
.command('send', send)
if (import.meta.main) {
if (Deno.args.length) {
cli.parse(Deno.args)
} else {
cli.showHelp()
}
}