UNPKG

logggai

Version:

AI-powered CLI for transforming your development work into professional content

28 lines 970 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logoutCommand = logoutCommand; const chalk = require("chalk"); const { clearConfig, isLoggedIn, getConfig } = require('../lib/config'); async function logoutCommand() { console.log(chalk.default.blue.bold('Logout from Logggai')); console.log(); if (!isLoggedIn()) { console.log(chalk.default.yellow('You are not logged in')); return; } const userEmail = getConfig('userEmail'); try { clearConfig(); console.log(chalk.default.green('Logout successful!')); if (userEmail) { console.log(chalk.default.gray(`Session closed for: ${userEmail}`)); } console.log(); console.log(chalk.default.gray('To login again: logggai login')); } catch (error) { console.log(chalk.default.red('Error during logout')); console.error(error); } } //# sourceMappingURL=logout.js.map