// Hatchway CLI - Built with Rollup
import chalk from 'chalk';
import { h as hasStoredToken, c as clearToken } from './cli-auth-B4Do-N8Y.js';
import { l as logger } from './logger-6V5cBxba.js';
import 'node:http';
import 'node:url';
import 'node:os';
import 'node:child_process';
import './config-manager-DST6RbP8.js';
import 'conf';
import 'node:path';
import 'node:fs';

/**
 * Logout command - clear stored credentials
 *
 * Usage:
 *   hatchway logout
 *
 * This command clears the locally stored runner token.
 * The token remains valid on the server - you can revoke it
 * from the Hatchway dashboard if needed.
 */
async function logoutCommand() {
    logger.section('Hatchway Logout');
    if (!hasStoredToken()) {
        logger.info('Not currently logged in.');
        return;
    }
    clearToken();
    logger.success('Logged out successfully.');
    logger.info('');
    logger.info('Note: The runner token is still valid on the server.');
    logger.info('To revoke it, visit your Hatchway dashboard.');
    logger.info('');
    logger.info(`Run ${chalk.cyan('hatchway login')} to authenticate again.`);
}

export { logoutCommand };
//# sourceMappingURL=logout-BC4VFt8f.js.map
