diff --git a/cli/deps.ts b/cli/deps.ts index a099f46516..ecca5a5fce 100644 --- a/cli/deps.ts +++ b/cli/deps.ts @@ -3,7 +3,7 @@ export { setClient } from "https://deno.land/x/windmill@v1.95.1/mod.ts"; export * from "https://deno.land/x/windmill@v1.95.1/windmill-api/index.ts"; // cliffy -export { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.2/command/command.ts"; +export { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.2/command/mod.ts"; export { Table } from "https://deno.land/x/cliffy@v1.0.0-rc.2/table/table.ts"; export { colors } from "https://deno.land/x/cliffy@v1.0.0-rc.2/ansi/colors.ts"; export { Secret } from "https://deno.land/x/cliffy@v1.0.0-rc.2/prompt/secret.ts"; diff --git a/cli/main.ts b/cli/main.ts index dea84793ca..a6b271c474 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -34,12 +34,16 @@ export const VERSION = "v1.138.0"; let command: any = new Command() .name("wmill") + .action(() => + log.info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`) + ) .description("A simple CLI tool for windmill.") + .globalOption( "--workspace ", "Specify the target workspace. This overrides the default workspace." ) - .globalOption("-d --debug", "Show debug logs") + .globalOption("--debug --verbose", "Show debug/verbose logs") .globalOption( "--show-diffs", "Show diff informations when syncing (may show sensitive informations)" @@ -90,7 +94,6 @@ let command: any = new Command() }) ) .command("completions", new CompletionsCommand()); - if (Number.parseInt(VERSION.replace("v", "").replace(".", "")) > 1700) { command = command.command("push", push).command("pull", pull); } @@ -98,7 +101,7 @@ if (Number.parseInt(VERSION.replace("v", "").replace(".", "")) > 1700) { export let showDiffs = false; try { const LOG_LEVEL = - Deno.args.includes("--debug") || Deno.args.includes("-d") + Deno.args.includes("--verbose") || Deno.args.includes("--debug") ? "DEBUG" : "INFO"; // const NO_COLORS = Deno.args.includes("--no-colors"); diff --git a/cli/sync.ts b/cli/sync.ts index d64f958bbe..d05a47f617 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -825,6 +825,9 @@ async function push( } const command = new Command() + .action(() => + log.info("2 actions available, pull and push. Use -h to display help.") + ) .command("pull") .description( "Pull any remote changes and apply them locally. Use --raw for usage without local state tracking."