UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

22 lines 817 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.userShow = void 0; const alwayscli_1 = require("@alwaysai/alwayscli"); const chalk = require("chalk"); const infrastructure_1 = require("../../infrastructure"); const util_1 = require("../../util"); exports.userShow = (0, alwayscli_1.CliLeaf)({ name: 'show', description: 'Show the currently logged in user', async action() { const authenticationClient = (0, infrastructure_1.CliAuthenticationClient)(); if (authenticationClient.isSignedIn()) { const { email } = await authenticationClient.getInfo(); (0, util_1.echo)(`Logged in as ${chalk.bold(email)}`); } else { (0, util_1.echo)('Not logged in'); } } }); //# sourceMappingURL=show.js.map