UNPKG

@hivetechs/hive

Version:

HiveTechs Consensus - The world's most advanced AI-powered development assistant

43 lines (33 loc) โ€ข 1.11 kB
#!/usr/bin/env node const fs = require('fs'); const path = require('path'); const BIN_DIR = path.join(__dirname, '..', 'bin'); function cleanup() { console.log('๐Ÿงน Cleaning up HiveTechs Consensus...'); try { // Remove binary files const binaries = ['hive', 'hive.exe']; for (const binary of binaries) { const binaryPath = path.join(BIN_DIR, binary); if (fs.existsSync(binaryPath)) { fs.unlinkSync(binaryPath); console.log(`โœ… Removed ${binary}`); } } // Clean up any temporary files const tempFiles = fs.readdirSync(BIN_DIR).filter(f => f.endsWith('.tar.gz') || f.endsWith('.tmp') ); for (const file of tempFiles) { const filePath = path.join(BIN_DIR, file); fs.unlinkSync(filePath); console.log(`โœ… Removed temporary file: ${file}`); } console.log('๐Ÿ‘‹ HiveTechs Consensus uninstalled successfully'); } catch (error) { // Errors during uninstall are not critical console.log('โš ๏ธ Some cleanup tasks failed:', error.message); } } // Run cleanup cleanup();