From 9f11eba0a4f726cc150b05c0f4b528bf25513e6f Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Fri, 26 Jan 2024 15:16:53 +0100 Subject: [PATCH] fix(core): Point users to the official documentation when they use `n8n --help` (#8440) --- packages/cli/package.json | 1 + packages/cli/src/help.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 packages/cli/src/help.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index c1fe1774c6685..3255c3b7ca838 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -16,6 +16,7 @@ "types": "dist/index.d.ts", "oclif": { "commands": "./dist/commands", + "helpClass": "./dist/help", "bin": "n8n" }, "scripts": { diff --git a/packages/cli/src/help.ts b/packages/cli/src/help.ts new file mode 100644 index 0000000000000..a95a3381e0211 --- /dev/null +++ b/packages/cli/src/help.ts @@ -0,0 +1,11 @@ +import { Help } from '@oclif/core'; + +// oclif expects a default export +// eslint-disable-next-line import/no-default-export +export default class CustomHelp extends Help { + async showRootHelp() { + console.log( + 'You can find up to date information about the CLI here:\nhttps://docs.n8n.io/hosting/cli-commands/', + ); + } +}