feat(cli): add main cli

This commit is contained in:
Julien Oculi 2024-03-29 16:25:29 +01:00
parent 0131a7369e
commit 3e128cf80d

17
cli.ts Normal file
View 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()
}
}