Skip to content

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebTerm

A mobile-friendly web terminal for exe.dev VMs. Built with Go, xterm.js, and WebSockets.

WebTerm on mobile

Features

Terminal

  • Full PTY-backed bash shell over WebSocket via tmux
  • Session picker on launch — resume existing tmux sessions or start new ones
  • Multiple concurrent sessions with automatic naming
  • xterm.js with 256-color support, clickable links, 5000-line scrollback
  • Proper UTF-8 handling (emoji, Unicode symbols, etc.)
  • Auto-reconnect on disconnect

Mobile-first UI

  • Quick-action bar: Tab, Esc, Ctrl, d-pad, |, ~, /
  • D-pad button: touch and swipe in any direction to send arrow keys (↑↓←→), with auto-repeat on hold
  • Two-tap Ctrl submenu: tap Ctrl then pick C/D/Z/L/A/E/R/U/W
  • Buttons don't steal focus — on-screen keyboard stays open
  • interactive-widget=resizes-content viewport meta + flexbox layout so the terminal resizes when the keyboard opens

Gestures

  • Swipe right → Tab (autocomplete)
  • Swipe left → Alt+B (back one word)
  • Swipe up → previous command (only when scrolled to bottom)
  • Tap on cursor row → reposition cursor (sends arrow keys, like iTerm2)

Command history & bookmarks

  • Commands are saved to SQLite automatically
  • Searchable history panel (⏱ button)
  • Bookmark commands with labels (★ button)
  • Tap any history/bookmark entry to paste it into the terminal

Running

make build
./webterm -listen :8000

Or as a systemd service:

sudo cp srv.service /etc/systemd/system/webterm.service
sudo systemctl daemon-reload
sudo systemctl enable --now webterm

Then visit https://<vmname>.exe.xyz:8000/.

Code layout

cmd/srv/          entrypoint
srv/
  server.go       HTTP handlers, WebSocket PTY, REST API
  templates/      HTML (single page)
  static/         CSS + JS (xterm.js frontend)
db/
  migrations/     SQLite schema (history, bookmarks)
  db.go           open + migrate

Tech

About

a web terminal for that is *mobile friendly* and has features like a command history browser, bookmarking commands, and gestures like swipe-to-auto-complete.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages