cohabit_mail/cli.ts

20 lines
472 B
TypeScript
Raw Permalink Normal View History

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()
}
}