New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wmdev

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wmdev

Web dashboard for workmux — browser UI with embedded terminals, PR monitoring, and CI integration

latest
Source
npmnpm
Version
0.7.0
Version published
Maintainers
1
Created
Source

wmdev

Web dashboard for workmux. Provides a browser UI with embedded terminals, PR status monitoring, and CI integration on top of workmux's worktree + tmux orchestration.

https://github.com/user-attachments/assets/fa13366d-e758-4221-94bf-13a5738bf7e7

What is workmux?

workmux is a CLI tool that orchestrates git worktrees and tmux. It pairs each worktree with a tmux window, provisions files (copy/symlink), runs lifecycle hooks, and has first-class AI agent support. A single workmux add creates the worktree, opens a tmux window with configured panes, and starts your agent. workmux merge merges the branch, deletes the worktree, closes the window, and cleans up branches.

workmux is configured via .workmux.yaml in the project root. See the workmux README for full documentation.

What wmdev adds

wmdev is a web UI that wraps workmux. It delegates core worktree lifecycle operations to the workmux CLI and adds browser-based features on top:

ResponsibilityHandled by
Create/remove/merge worktreesworkmux (wmdev calls workmux add, workmux rm, workmux merge)
Pane layout and agent launch (default profile)workmux (uses .workmux.yaml pane config)
Open/focus a worktree's tmux windowworkmux (workmux open)
List worktrees and agent statusworkmux (workmux list, workmux status)
File provisioning and lifecycle hooksworkmux (.workmux.yaml files and post_create)
Port allocation for worktree serviceswmdev (when portStart is set in .wmdev.yaml) or workmux (via post_create hook)
Browser terminal (xterm.js ↔ tmux)wmdev
Service health monitoring (port polling)wmdev
PR status tracking and badgeswmdev (polls gh pr list)
CI check status and failed log viewingwmdev (calls gh run view)
Send prompts / PR comments to agentswmdev (via tmux load-buffer)
Docker sandbox container lifecyclewmdev (manages docker run/rm directly)

Quick start

# 1. Install prerequisites
cargo install workmux          # or: brew install raine/workmux/workmux
sudo apt install tmux           # or: brew install tmux
curl -fsSL https://bun.sh/install | bash

# 2. Install wmdev
bun install -g wmdev

# 3. Set up your project
cd /path/to/your/project
workmux init                   # creates .workmux.yaml with sensible defaults

# 4. (Optional) Create a .wmdev.yaml for dashboard-specific config
#    See Configuration below

# 5. Start the dashboard
wmdev                          # UI on http://localhost:5111
wmdev --port 8080              # custom port

Configuration

wmdev uses two config files in the project root:

  • .workmux.yaml — workmux's own config. Controls worktree directory, pane layout, agent selection, file provisioning, lifecycle hooks, merge strategy, and more. See the workmux docs.
  • .wmdev.yaml — dashboard-specific config. Controls service health checks, worktree profiles, linked repos for PR monitoring, and Docker sandbox settings.

.wmdev.yaml schema

# Project name displayed in the sidebar header and browser tab title.
# Falls back to "Dashboard" if omitted.
name: string

# Services to monitor — each maps a display name to a port env var.
# The dashboard polls these ports and shows health status badges.
# When portStart is set, wmdev auto-allocates ports for new worktrees
# and writes them to .env.local (no post_create hook needed).
services:
  - name: string             # Display name (e.g. "BE", "FE")
    portEnv: string          # Env var holding the port (e.g. "BACKEND_PORT")
    portStart: number        # (optional) Base port for slot 0 (e.g. 5111)
    portStep: number         # (optional) Increment per worktree slot (default: 1)

# Profiles define the environment when creating a worktree via the dashboard.
profiles:
  default:                   # Required — used when no profile is specified
    name: string             # Profile identifier
    systemPrompt: string     # (optional) Instructions for the AI agent.
                             # Supports ${VAR} placeholders expanded from .env.local.
    envPassthrough: string[] # (optional) Env vars to pass to the agent process

  sandbox:                   # (optional) Docker-based sandboxed profile
    name: string             # Profile identifier
    image: string            # Docker image name (must be pre-built)
    systemPrompt: string     # (optional) Agent instructions (supports ${VAR})
    envPassthrough: string[] # (optional) Host env vars forwarded into the container
    extraMounts:             # (optional) Additional bind mounts
      - hostPath: string     # Host path (supports ~ for $HOME)
        guestPath: string    # (optional) Mount point inside container (defaults to hostPath)
        writable: boolean    # (optional) true = read-write, false/omit = read-only

# Monitor PRs from other GitHub repos and show their status alongside
# worktree branches that share the same branch name.
linkedRepos:
  - repo: string             # GitHub repo slug (e.g. "org/repo")
    alias: string            # (optional) Short label shown in the UI

Defaults

If .wmdev.yaml is missing or empty:

services: []
profiles:
  default:
    name: default
linkedRepos: []

Example

name: My Project

services:
  - name: BE
    portEnv: BACKEND_PORT
    portStart: 5111
    portStep: 10
  - name: FE
    portEnv: FRONTEND_PORT
    portStart: 5112
    portStep: 10

profiles:
  default:
    name: default

  sandbox:
    name: sandbox
    image: my-sandbox
    envPassthrough:
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
    extraMounts:
      - hostPath: ~/.codex
        guestPath: /root/.codex
        writable: true
    systemPrompt: >
      You are running inside a sandboxed container.
      Backend port: ${BACKEND_PORT}. Frontend port: ${FRONTEND_PORT}.

linkedRepos:
  - repo: myorg/related-service
    alias: svc

Parameter reference

ParameterTypeRequiredDescription
namestringnoProject name shown in the sidebar header and browser tab title. Defaults to "Dashboard"
services[].namestringyesDisplay name shown in the dashboard
services[].portEnvstringyesEnv var containing the service port (read from each worktree's .env.local)
services[].portStartnumbernoBase port for slot 0. When set, wmdev auto-allocates ports for new worktrees
services[].portStepnumbernoPort increment per worktree slot (default: 1). Slot 0 is reserved for main
profiles.default.namestringyesIdentifier for the default profile
profiles.default.systemPromptstringnoSystem prompt for the agent; ${VAR} placeholders expanded at runtime
profiles.default.envPassthroughstring[]noEnv vars passed through to the agent process
profiles.sandbox.namestringyes (if used)Identifier for the sandbox profile
profiles.sandbox.imagestringyes (if used)Docker image for containers
profiles.sandbox.systemPromptstringnoSystem prompt for sandbox agents; ${VAR} placeholders expanded at runtime
profiles.sandbox.envPassthroughstring[]noHost env vars forwarded into the Docker container
profiles.sandbox.extraMounts[].hostPathstringyesHost path to mount (~ expands to $HOME)
profiles.sandbox.extraMounts[].guestPathstringnoContainer mount path (defaults to hostPath)
profiles.sandbox.extraMounts[].writablebooleannotrue for read-write; omit or false for read-only
linkedRepos[].repostringyesGitHub repo slug (e.g. org/repo)
linkedRepos[].aliasstringnoShort label for the UI (defaults to repo name)

Auto-generated branch names

If your .workmux.yaml has auto_name.model configured, the create-worktree dialog will automatically generate a branch name from the prompt using that LLM. This is a workmux feature — wmdev detects it and enables the UI flow accordingly.

Architecture

Architecture diagram

Backend — Bun/TypeScript HTTP + WebSocket server (backend/src/server.ts):

  • REST API (/api/*) — CRUD for worktrees. Wraps the workmux CLI to create/remove/merge worktrees. Enriches each worktree with directory, assigned ports, service health, PR status, and agent state.
  • WebSocket (/ws/*) — Bidirectional terminal bridge between xterm.js in the browser and tmux sessions on the server.

Frontend — Svelte 5 SPA with Tailwind CSS and xterm.js (frontend/src/). Two-panel layout: worktree sidebar + embedded terminal. Polls the REST API for status updates. Responsive with mobile pane navigation.

Terminal streaming

Terminal streaming diagram

When a worktree is selected, the frontend opens a WebSocket to /ws/<worktree>. The backend spawns a PTY via script and attaches to a grouped tmux session — a separate view into the same windows. This allows the dashboard and a real terminal to view the same worktree simultaneously.

Output is buffered (up to 1 MB) so reconnecting clients receive recent history immediately.

Worktree profiles

ProfileWhat it does
defaultDelegates to workmux — uses the pane layout and commands from .workmux.yaml. wmdev doesn't manage panes or processes; workmux handles it all.
sandboxManaged by wmdev. Launches a Docker container, sets up agent + shell panes, and publishes service ports via docker run -p.

Docker sandbox containers

For sandbox profiles, wmdev manages Docker containers directly:

  • Launchdocker run -d -p <ports> with the configured image, mounts, and env vars. Runs as the host user (--user uid:gid) so file ownership matches.
  • Mounts — Worktree dir (rw), main repo .git (rw), main repo root (ro), ~/.claude (dir) and ~/.claude.json (settings file), plus any extraMounts. Conditionally mounts ~/.gitconfig, ~/.ssh, ~/.config/gh if they exist.
  • Environment — All .env.local vars + envPassthrough vars + HOME, TERM, IS_SANDBOX=1.
  • Cleanup — Containers are removed when the worktree is removed or merged.

Prerequisites

ToolMin versionPurpose
bun1.3.5+Runtime for backend and frontend
workmuxlatestWorktree + tmux orchestration
tmux3.xTerminal multiplexer
git2.xWorktree management
gh2.xPR and CI status (optional — needed for PR badges and CI logs)
docker28+Only needed for sandbox profile

Environment variables

VariableDefaultDescription
BACKEND_PORT5111Backend API port (also configurable via --port)

Keyboard shortcuts

ShortcutAction
Cmd+Up/DownNavigate between worktrees
Cmd+KCreate new worktree
Cmd+MMerge selected worktree
Cmd+DRemove selected worktree

API

MethodEndpointDescription
GET/api/configLoad dashboard config
GET/api/worktreesList all worktrees with status, ports, service health, and PR data
POST/api/worktreesCreate a worktree ({ branch?, profile?, agent?, prompt? })
DELETE/api/worktrees/:nameRemove a worktree
POST/api/worktrees/:name/openOpen/focus a worktree's tmux window
POST/api/worktrees/:name/mergeMerge worktree into main + cleanup
GET/api/worktrees/:name/statusGet agent status for a worktree
POST/api/worktrees/:name/sendSend a prompt to the agent's tmux pane
GET/api/ci-logs/:runIdFetch failed CI run logs
WS/ws/:worktreeTerminal WebSocket (xterm.js ↔ tmux)

Development

./dev.sh          # backend + frontend with hot reload, UI on :5112

Or start them separately:

# Terminal 1: backend (auto-reloads on save)
cd backend && bun run dev

# Terminal 2: frontend (Vite dev server)
cd frontend && bun run dev

The frontend dev server runs on port 5112 and proxies /api/* and /ws/* to the backend on 5111.

Keywords

workmux

FAQs

Package last updated on 04 Mar 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