diff --git a/src/cli.ts b/src/cli.ts index eae6a9c..55df2fd 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,14 +1,13 @@ #!/usr/bin/env node import { parse } from "@bomb.sh/args"; -import { animateBanner, staticBanner } from "./banner.js"; +import { animateBanner } from "./banner.js"; const args = parse(process.argv.slice(2), { boolean: ["json", "all", "fresh", "help"], alias: { h: "help" }, }); -const usage = `${staticBanner} -usage: +const usage = `usage: fid list every knot on the network --json machine-readable output --all include localhost/dev junk knots @@ -16,13 +15,13 @@ usage: `; const [command] = args._; +if (!args.json) await animateBanner(); // keep --json pipe-clean + if (args.help || !command) { console.log(usage); process.exit(command ? 0 : 1); } -if (!args.json) await animateBanner(); // keep --json pipe-clean - switch (command) { case "list": await (await import("./commands/list.js")).run(args);