2024-03-29 16:25:29 +01:00
|
|
|
import config from './deno.json' with { type: 'json' }
|
|
|
|
import { Command } from '@cliffy/command/command.ts'
|
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()
|
|
|
|
}
|
|
|
|
}
|