https://github.com/yayayahei/skills/tree/main/terminal-in-chrome
This skill manages the local backend server for the Web Terminal Chrome Extension, which injects a fully functional, resizable local terminal into any website via xterm.js.
/server): A lightweight Node.js backend running locally (ws://localhost:8989) that spawns the actual terminal process (bash or zsh) using node-pty./extension): A Chrome extension that injects xterm.js into websites and connects back to the local server via WebSockets.Trigger phrases: "start web terminal", "run terminal server", "start terminal backend"
Action:
Navigate to the server directory and start the Node.js server in the background.
cd server
npm start
The server will run on port 8989.
Trigger phrases: "stop web terminal", "kill terminal server", "stop terminal backend"
Action:
Find the process running on port 8989 and kill it.
lsof -i :8989
kill -9 <PID>
Trigger phrases: "web terminal status", "is terminal running?", "check terminal server"
Action:
Check if port 8989 is in use to determine if the server is running.
lsof -i :8989
If the user asks how to use the extension, provide these steps:
chrome://extensions/extension folder from this project (web-terminal-extension/extension).Ctrl + \ or Cmd + J` to toggle the terminal.共 1 个版本