diff --git a/deno.json b/deno.json index 6ccf1c23..72254ff1 100644 --- a/deno.json +++ b/deno.json @@ -86,6 +86,7 @@ "jsxImportSource": "https://esm.sh/preact@10.23.1" }, "imports": { + "@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7", "@silverbulletmd/silverbullet/syscall": "./plug-api/syscall.ts", "@silverbulletmd/silverbullet/syscalls": "./plug-api/syscalls.ts", "@silverbulletmd/silverbullet/types": "./plug-api/types.ts", @@ -138,7 +139,6 @@ "@std/path": "jsr:@std/path@^1.0.2", "@std/testing": "jsr:@std/testing@^0.225.3", "@std/yaml": "jsr:@std/yaml@^1.0.5", - "cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.4/", "crelt": "https://esm.sh/crelt@1.0.6", "denosass": "https://deno.land/x/denosass@1.0.6/mod.ts", "djwt": "https://deno.land/x/djwt@v3.0.2/mod.ts", diff --git a/silverbullet.ts b/silverbullet.ts index 4e4d68ed..ebcc4c86 100755 --- a/silverbullet.ts +++ b/silverbullet.ts @@ -1,5 +1,5 @@ import.meta.main = false; -import { Command } from "cliffy/command/command.ts"; +import { Command } from "@cliffy/command"; import { version } from "./version.ts"; @@ -20,14 +20,12 @@ await new Command() .name("silverbullet") .description("Note taking for knowledge hackers") .version(version) - .help({ - colors: false, - }) + .helpOption(false) .usage(" | (see below)") // Main command .arguments("[folder:string]") .option( - "--hostname, -L ", + "-L, --hostname ", "Hostname or address to listen on", ) .option("-p, --port ", "Port to listen on") @@ -57,7 +55,8 @@ await new Command() ) .action(serveCommand) // plug:compile - .command("plug:compile", "Bundle (compile) one or more plug manifests") + .command("plug:compile") + .description("Bundle (compile) one or more plug manifests") .arguments("<...name.plug.yaml:string>") .option("--debug", "Do not minifiy code", { default: false }) .option("--info", "Print out size info per function", { @@ -76,19 +75,22 @@ await new Command() .option("--runtimeUrl ", "URL to worker_runtime.ts to use") .action(plugCompileCommand) // plug:run - .command("plug:run", "Run a PlugOS function from the CLI") + .command("plug:run") + .description("Run a PlugOS function from the CLI") .arguments(" [function] [...args:string]") .option( - "--hostname, -L ", + "-L, --hostname ", "Hostname or address to listen on", ) .option("-p, --port ", "Port to listen on") .action(plugRunCommand) // upgrade - .command("upgrade", "Upgrade SilverBullet") + .command("upgrade") + .description("Upgrade SilverBullet") .action(upgradeCommand) // sync - .command("sync", "Synchronize two spaces") + .command("sync") + .description("Synchronize two spaces") .option( "--snapshot ", "Path to state file to use", @@ -100,7 +102,8 @@ await new Command() .arguments(" ") .action(syncCommand) // version - .command("version", "Get current version") + .command("version") + .description("Get current version") .action(versionCommand) .parse(Deno.args);