UNPKG

@wonderwhy-er/desktop-commander

Version:

MCP server for terminal operations and file editing

28 lines (27 loc) 1.18 kB
/** * Integration file showing how to integrate REPL functionality * with the Claude Server Commander */ import { initializeREPLManager, replCommandHandler } from './handlers/replCommandHandler.js'; /** * Integrates REPL functionality with the server * @param server - Server instance * @param terminalManager - Terminal manager instance */ export function integrateREPL(server, terminalManager) { // Initialize the REPL manager with the terminal manager initializeREPLManager(terminalManager); // Register REPL commands with the server server.registerCommands({ // REPL language sessions (Python, Node.js, Bash) 'repl.create': replCommandHandler.createREPLSession, 'repl.execute': replCommandHandler.executeREPLCode, 'repl.list': replCommandHandler.listREPLSessions, 'repl.close': replCommandHandler.closeREPLSession, 'repl.closeIdle': replCommandHandler.closeIdleREPLSessions, // SSH specific commands 'ssh.create': replCommandHandler.createSSHSession, 'ssh.execute': replCommandHandler.executeSSHCommand }); console.log('REPL and SSH functionality integrated successfully'); }