diff --git a/locales/en.json b/locales/en.json index 257f18b..8f9205a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -348,5 +348,7 @@ "unexpectedFileFormat": "We weren't expecting the format {format}. Kindly submit a detailed report of the issue to our support team.", "failedCalculateBlake3Hash": "Failed to calculate the Blake3 hash. Please try again!", "failedDeployFleekFunction": "Failed to deploy the Fleek Function. Please try again!", - "warnProvideValidDomainName": "Please provide a valid domain name." + "warnProvideValidDomainName": "Please provide a valid domain name.", + "cmdAuthLoginDescription": "Authenticate the CLI session using the Fleek Platform Web app. Open the URL in your favourite browser to initiate the browser-based login process. Select your preferred authentication method and return to CLI once completed.", + "cmdAuthLogoutDescription": "Ends your active CLI session, securing your account. Disables access to personal features such as storage and site deployment until re-authentication." } diff --git a/src/commands/auth/index.ts b/src/commands/auth/index.ts index 2b16513..11864d8 100644 --- a/src/commands/auth/index.ts +++ b/src/commands/auth/index.ts @@ -6,10 +6,10 @@ import { t } from '../../utils/translation'; import { loginActionHandler } from './login'; import { logoutActionHandler } from './logout'; -export default (program: Command) => { - program +export default (cmd: Command) => { + cmd .command('login') - .description(t('loginToFlkPlt', { status: t('loginTo') })) + .description(t('cmdAuthLoginDescription')) .action(() => { const uiAppUrl = getDefined('UI__APP_URL'); const authApiUrl = getDefined('SDK__GRAPHQL_API_URL'); @@ -22,10 +22,12 @@ export default (program: Command) => { uiAppUrl, authApiUrl, }); - }); + }) + .addHelpCommand(); - program + cmd .command('logout') - .description(t('loginToFlkPlt', { status: t('logoutOf') })) - .action(logoutActionHandler); + .description(t('cmdAuthLogoutDescription')) + .action(logoutActionHandler) + .addHelpCommand(); };