Skip to main content
Glama
logout.command.ts1.06 kB
/** * @fileoverview Logout command - alias for 'auth logout' * Provides a convenient shorthand for logging out. * * This is a thin wrapper that delegates to AuthCommand. */ import { Command } from 'commander'; import { AuthCommand } from './auth.command.js'; /** * LogoutCommand - Shorthand alias for 'tm auth logout' * Reuses AuthCommand's logout functionality to avoid code duplication. */ export class LogoutCommand extends Command { private authCommand: AuthCommand; constructor(name?: string) { super(name || 'logout'); this.authCommand = new AuthCommand(); this.description('Logout from Hamster (alias for "auth logout")'); this.addHelpText( 'after', ` Examples: $ tm logout # Clear credentials and logout ` ); this.action(async () => { // Delegate to AuthCommand's executeLogout await this.authCommand.executeLogout(); }); } /** * Register this command on a program */ static register(program: Command): LogoutCommand { const cmd = new LogoutCommand(); program.addCommand(cmd); return cmd; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eyaltoledano/claude-task-master'

If you have feedback or need assistance with the MCP directory API, please join our Discord server