hono
hono copied to clipboard
Hono CLI framework
What is the feature you are proposing?
I think hono primitives would work wonderfully for a minimal CLI framework:
import { Cli } from "hono/cli"
const cli = new Cli({
name: "git"
})
// this should also leverage the validator api for flags parsing
cli.command("commit", (c) => {
const { message } = c.cmd.flag()
// ...
})
cli.command("checkout [branch]", (c) => {
const branch = c.cmd.arg("branch")
// ...
})
if (import.meta.main) {
await cli.run()
}
I think there is a space for this, as current cli frameworks for typescript are quite lacklusters (imo)
I think you should create your framework similar to Hono's API since it is out of the scope of the web standard server-side framework.
Of course, I think it's an interesting idea!
Hi @pomdtr
As @EdamAme-x said, this is out of the scope of Hono.
Closing.