https://github.com/zoid-archive/webterm
Expose terminal via browser for AI to interact with CLI commands using playwright MCP
https://github.com/zoid-archive/webterm
Last synced: about 1 year ago
JSON representation
Expose terminal via browser for AI to interact with CLI commands using playwright MCP
- Host: GitHub
- URL: https://github.com/zoid-archive/webterm
- Owner: zoid-archive
- Created: 2025-05-16T10:12:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-17T07:22:43.000Z (about 1 year ago)
- Last Synced: 2025-06-11T17:56:09.705Z (about 1 year ago)
- Language: TypeScript
- Size: 44.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webterm
A web-based terminal application built with React, TypeScript, and Xterm.js. The project consists of a UI package (using Vite and React) and a server package (using WebSockets and Node.js).
## Project Structure
```
/
├── packages/
│ ├── ui/ # React frontend with Xterm.js terminal
│ └── server/ # Node.js WebSocket server with node-pty
```
## Getting Started
### Prerequisites
- Node.js
- Bun (for package management and UI development)
### Installation
```bash
bun install
```
### Running the Application
To run both the UI and server concurrently:
```bash
bun run dev
```
This will start:
- UI server at http://localhost:5173 (Vite dev server)
- WebSocket server at ws://localhost:5174
## Individual Package Commands
### UI Package
```bash
bun run --filter '@webterm/ui' dev
```
### Server Package
```bash
bun run --filter '@webterm/server' dev
```
## Note on Server Runtime
The server is running with Node.js and not Bun due to a known issue with Bun causing crashes when using node-pty. This is related to an open issue: https://github.com/oven-sh/bun/issues/19688
## Features
- Interactive web-based terminal
- WebSocket-based real-time communication
- Cross-platform support (Windows, macOS, Linux)
- Automatic terminal resizing
- Connection status indicator
- Custom working directory via URL parameter (`cwd`)
### Using Custom Working Directory
You can specify a custom working directory for the terminal by using the `cwd` URL parameter:
```
http://localhost:5173?cwd=/absolute/path/to/your/project
```
This allows you to start the terminal in any directory on your system, making it convenient for working with specific projects.
## License
[MIT](LICENSE)