import { Command } from "https://deno.land/x/cliffy@v0.25.2/command/command.ts"; import { version } from "./version.ts"; import { upgradeCommand } from "./cmd/upgrade.ts"; import { versionCommand } from "./cmd/version.ts"; import { fixCommand } from "./cmd/fix.ts"; import { serveCommand } from "./cmd/server.ts"; await new Command() .name("silverbullet") .description("Markdown as a platform") .version(version) .help({ colors: false, }) .usage(" | (see below)") // Main command .arguments("") .option("-p, --port ", "Port to listen on") .option("--password ", "Password for basic authentication") .action(serveCommand) .command("fix", "Fix a broken space") .arguments("") .action(fixCommand) .command("upgrade", "Upgrade Silver Bullet") .action(upgradeCommand) .command("version", "Get current version") .action(versionCommand) .parse(Deno.args);