🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@lrilai/webterm

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrilai/webterm

Web-based terminal multiplexer — run multiple terminal sessions in the browser

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
6
-53.85%
Maintainers
1
Weekly downloads
 
Created
Source

WebTerm - Web Terminal Multiplexer

A web-based terminal multiplexer inspired by tmux. Run multiple terminal sessions in your browser with split panes, session persistence, and AI CLI tool support.

WebTerm Screenshot

Features

  • 🖥️ Multi-pane terminal - Split horizontally/vertically, resize by dragging
  • ⌨️ tmux-like keybindings - Familiar Ctrl+B prefix shortcuts
  • 🎨 Cyberpunk theme - Beautiful terminal aesthetic with GlitchCN/UI
  • 💾 Session persistence - Save and restore your terminal layouts
  • 📡 Real-time communication - WebSocket with binary protocol for low latency
  • 🤖 AI CLI support - Optimized for Claude Code, Gemini CLI, Codex
  • 🔄 Broadcast mode - Type in multiple panes simultaneously

Quick Start

Prerequisites

  • Node.js 20+ (LTS recommended)
  • npm 10+ or pnpm
  • Windows 10+, macOS, or Linux

Installation

# Clone the repository
git clone https://github.com/yourusername/webterm.git
cd webterm

# Install dependencies
npm install

# Build shared types
npm run build:shared

# Start development servers
npm run dev

The application will be available at:

  • Frontend: http://localhost:5173
  • Backend API: http://localhost:3000
  • WebSocket: ws://localhost:3000/ws

Production Build

# Build all packages
npm run build

# Start backend server
cd backend && npm start

Keybindings

All keybindings use the Ctrl+B prefix (press Ctrl+B, release, then press the command key):

KeybindingAction
Ctrl+B %Split pane vertically
Ctrl+B "Split pane horizontally
Ctrl+B ←↑↓→Navigate between panes
Ctrl+B xClose current pane
Ctrl+B zZoom/unzoom pane
Ctrl+B cCreate new window
Ctrl+B nNext window
Ctrl+B pPrevious window
Ctrl+B SSave session
Ctrl+B ?Show keybindings help

Copy/paste shortcuts (no prefix needed):

  • Ctrl+Shift+C - Copy selected text
  • Ctrl+Shift+V - Paste from clipboard

Project Structure

webterm/
├── backend/               # Node.js backend
│   └── src/
│       ├── api/           # WebSocket & REST handlers
│       ├── db/            # SQLite database
│       ├── models/        # Data models
│       ├── services/      # Business logic
│       └── utils/         # Utilities
├── frontend/              # React frontend
│   └── src/
│       ├── components/    # React components
│       ├── hooks/         # Custom hooks
│       ├── services/      # API clients
│       ├── stores/        # Zustand stores
│       └── styles/        # CSS & Tailwind
├── shared/                # Shared TypeScript types
│   └── types/
└── specs/                 # Feature specifications

Tech Stack

LayerTechnology
FrontendReact 19, TypeScript, Vite, Tailwind CSS
Terminalxterm.js with WebGL renderer
BackendNode.js, TypeScript
PTYnode-pty (powers VS Code terminal)
DatabaseSQLite (better-sqlite3)
WebSocketws
UIGlitchCN/UI (shadcn-based)

API

WebSocket Protocol

Connect to ws://localhost:3000/ws?sessionId={optional} for real-time terminal I/O.

Binary messages (for terminal I/O):

  • Format: [type:1][paneIdLength:1][paneId:N][payload:M]
  • Types: 0x01 INPUT, 0x02 OUTPUT

JSON messages (for control):

  • resize, create, close, split, focus, broadcast

REST API

EndpointMethodDescription
/healthGETHealth check
/api/v1/sessionsGETList sessions
/api/v1/sessionsPOSTCreate session
/api/v1/sessions/:idGETGet session
/api/v1/sessions/:idPATCHUpdate session
/api/v1/sessions/:idDELETEDelete session
/api/v1/sessions/:id/savePOSTSave session
/api/v1/system/infoGETSystem info

Configuration

Environment variables:

VariableDefaultDescription
PORT3000Backend server port
HOSTlocalhostBackend bind address
WEBTERM_DB_PATH./data/webterm.dbSQLite database path
LOG_LEVELinfoLogging level
MAX_PANES_PER_WINDOW16Maximum panes per window

Development

# Run linting
npm run lint

# Run type checking
npm run typecheck

# Run tests
npm test

# Format code
npm run format

Performance

WebTerm is optimized for low-latency terminal interaction:

  • Input latency: < 50ms (binary WebSocket protocol)
  • Render: 60fps (WebGL renderer)
  • Scrollback: 10,000 lines per pane
  • Bundle size: ~400KB gzipped
  • Memory: < 200MB typical usage

License

MIT License - see LICENSE for details.

Acknowledgments

Keywords

terminal

FAQs

Package last updated on 23 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts