Shared web console for Codex, Claude, and shell sessions, built with xterm.js.
- Uses
@xterm/xtermplus the requested addons:attach,clipboard,fit,image,ligatures,progress,search,serialize,unicode-graphemes,unicode11,web-links,webgl. - Keeps PTY processes alive on the server when a browser tab closes.
- Lets multiple devices attach to the same session simultaneously.
- Auto-grows shared PTY geometry for larger viewers and scales smaller viewers down in the browser.
- Supports multiple concurrent monitored sessions in one dashboard.
- Uses One Half Dark colors and prefers
BlexMono Nerd FontwithMicrosoft YaHei UIfallback.
npm install
npm run devDevelopment:
- Frontend:
http://<host>:5173 - Backend:
http://<host>:3000
Production:
npm run build
npm startProduction serves the built client from the backend on port 3000.
Windows packaging is provided through Node SEA.
npm run package:exeOutput:
dist-exe/windows-x64/WebShell.exedist-exe/windows-x64/webshell.config.json
The packaged executable extracts its runtime files to .webshell-runtime next to the exe on first launch. You can keep editing webshell.config.json beside the exe to change preset names and default command lines.
Preset names and command lines are loaded from webshell.config.json by default.
Example:
{
"presets": {
"codex": {
"name": "Codex",
"commandLine": "codex"
},
"claude": {
"name": "Claude",
"commandLine": "claude"
},
"shell": {
"name": "Shell",
"commandLine": ""
},
"custom": {
"name": "Custom",
"commandLine": ""
}
}
}namecontrols the preset name shown in the UI.commandLinecontrols the default launch command for that preset.descriptionis optional. If omitted, the built-in description is kept.- Set
WEBSHELL_CONFIGto load a different config file path.
- Closing a web page detaches the viewer only. It does not terminate Codex, Claude, or the shell session.
- Terminals stop only when you explicitly press
Terminateor call the terminate API. - Exited sessions can be removed from the control plane with
Remove.
- Each session has one canonical PTY size on the server.
- When a larger viewer connects, the session can auto-grow.
- Smaller viewers render the same session through client-side scaling.
- If you want to explicitly shrink the PTY to the current viewport, use
Use Viewport Size.
This avoids disconnect-driven reflow while still keeping different device sizes usable.
Install BlexMono Nerd Font on client devices for the intended terminal look. If it is not available, the UI falls back gracefully to Microsoft YaHei UI, Microsoft YaHei, Cascadia Mono, SFMono-Regular, Consolas, and monospace.
WORKSPACE_ROOT: default working directory for new sessions.WEBSHELL_SHELL: override the server shell executable.WEBSHELL_CONFIG: override the preset config file path.WEBSHELL_CLIENT_DIST: override the built frontend directory.
GET /api/presetsGET /api/sessionsGET /api/sessions/:sessionIdPOST /api/sessionsPOST /api/sessions/:sessionId/viewers/:viewerId/sizePOST /api/sessions/:sessionId/geometryPOST /api/sessions/:sessionId/terminateDELETE /api/sessions/:sessionId


