4110963c9fc48c82e7f56916f3043bc67acad11a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
webterm (Go)
webterm serves terminal sessions over HTTP/WebSocket, with a dashboard mode for multiple sessions and Docker-aware tiles.
Features
- Web terminal with reconnect support
- Session dashboard with live SVG screenshots
- Docker watch mode (
webterm-command/webterm-themelabels) - Docker compose manifest ingestion
- CPU sparkline tiles for compose services
- SSE activity updates for fast dashboard refresh
- Theme/font controls for terminal rendering
Install
Build from source
git clone https://github.com/rcarmo/webterm.git
cd webterm/go
mkdir -p bin
go build -o ./bin/webterm ./cmd/webterm
The command above produces go/bin/webterm; you can also build it from repo root with make build-go.
Quick start
Run a default shell session:
cd go
go run ./cmd/webterm
Run a specific command:
cd go
go run ./cmd/webterm -- htop
Then open http://localhost:8080.
Dashboard modes
Landing manifest
- name: Logs
slug: logs
command: docker logs -f my-service
theme: nord
cd go
go run ./cmd/webterm -- --landing-manifest ../landing.yaml
Docker watch
cd go
go run ./cmd/webterm -- --docker-watch
Containers with these labels become tiles:
webterm-command: command string, orautofor Docker execwebterm-theme: theme name (fallback isxtermpalette)
Compose manifest
cd go
go run ./cmd/webterm -- --compose-manifest ../docker-compose.yaml
Environment variables
WEBTERM_STATIC_PATH: override static asset directoryWEBTERM_DOCKER_USERNAME: user for Docker exec sessionsWEBTERM_DOCKER_AUTO_COMMAND: override auto command (/bin/bashdefault)WEBTERM_SCREENSHOT_FORCE_REDRAW: force redraw before screenshots (true/1/yes/on)DOCKER_HOST: Docker daemon endpoint override
Development (Makefile-first)
make install-dev
make check
make race
make test
Frontend bundle tasks:
make build
make build-fast
make bundle-watch
Docker
docker build -t webterm .
docker run -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 webterm --docker-watch
The image sets WEBTERM_STATIC_PATH=/app/static and serves assets from go/webterm/static.
The Dockerfile uses a minimal Alpine runtime stage and only installs ca-certificates plus docker-cli.
Description
Languages
Go
51.5%
TypeScript
31%
JavaScript
14.8%
Shell
1.2%
Makefile
0.8%
Other
0.7%
