import { Command } from "@cliffy/command"; import db from "./db.ts"; import store from "./commands/store.ts"; import list from "./commands/list.ts"; import select from "./commands/select.ts"; await new Command() .name("cookidoo") .version("0.1.0") .description("Recipe CLI") .action(function () { this.showHelp(); }) .command("store ", "Store a recipe in the database") .action((_options, recipeId: string) => store(db, recipeId)) .command("list", "Liste stored recipes") .action(() => list(db)) .command("select", "Select recipes for course list") .action(() => select(db)) .parse(Deno.args); db.close();