Skip to content

Commit b37e766

Browse files
chapterjasonclaude
andcommitted
Switch web-shell session backend from tmux to dtach
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e82a9df commit b37e766

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ that hosts the devcontainers these features get installed into — see
1717
| `claude-code` | `ghcr.io/sourecode/devcontainer-features/claude-code:2` | Installs the Claude Code CLI via the official native installer into `/usr/local/bin`. Declares `~/.claude` and `~/.claude.json` as persistence targets via the `home-persist` manifest. Requires Node.js — automatically pulls in the `nvm` feature via `dependsOn`. |
1818
| `rtk` | `ghcr.io/sourecode/devcontainer-features/rtk:2` | Installs [rtk](https://github.com/rtk-ai/rtk), an LLM token-reducing CLI proxy, into `/usr/local/bin`. Auto-patches Claude Code via `postCreateCommand` so the hook is written against the live `~/.claude`, not the image. |
1919
| `context-mode` | `ghcr.io/sourecode/devcontainer-features/context-mode:2` | Installs the [`context-mode`](https://github.com/mksglu/context-mode) Claude Code plugin via `postCreateCommand`, so the plugin lands in `~/.claude/plugins` (which `home-persist` symlinks into the persistence volume when installed). |
20-
| `web-shell` | `ghcr.io/sourecode/devcontainer-features/web-shell:1` | Installs [web-shell](https://github.com/SoureCode/web-shell) (persistent browser terminal backed by `tmux`) from the GitHub release tarball and registers it as a systemd unit + Coder workspace app. Requires Node.js — automatically pulls in the `nvm` feature via `dependsOn`. |
20+
| `web-shell` | `ghcr.io/sourecode/devcontainer-features/web-shell:1` | Installs [web-shell](https://github.com/SoureCode/web-shell) (persistent browser terminal backed by `dtach`) from the GitHub release tarball and registers it as a systemd unit + Coder workspace app. Requires Node.js — automatically pulls in the `nvm` feature via `dependsOn`. |
2121
| `home-persist` | `ghcr.io/sourecode/devcontainer-features/home-persist:1` | Symlinks declared `$HOME` paths into a per-owner persistence volume at `/mnt/home-persist`. Features and users contribute paths via JSON manifests in `/etc/devcontainer-persist.d/`; an `onCreateCommand` resolver materializes the symlinks on every create. |
2222
| `nvm` | `ghcr.io/sourecode/devcontainer-features/nvm:2` | Installs [nvm](https://github.com/nvm-sh/nvm) system-wide at `/usr/local/share/nvm` and optionally a Node version (defaults to LTS), with `node`/`npm`/`npx` symlinked into `/usr/local/bin`. No yarn. |
2323

src/web-shell/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# web-shell devcontainer feature
22

33
Installs [web-shell](https://github.com/SoureCode/web-shell) — a persistent
4-
browser terminal backed by `tmux` — inside a devcontainer and registers it
4+
browser terminal backed by `dtach` — inside a devcontainer and registers it
55
as a Coder workspace app.
66

7-
`web-shell` is a Node.js + xterm.js service. Every session is a `tmux` session
8-
on the server, so shells survive Node restarts. This feature:
7+
`web-shell` is a Node.js + xterm.js service. Every session is attached to a
8+
`dtach` socket on the server, so shells survive Node restarts. This feature:
99

10-
- Installs OS deps (`tmux`, `build-essential`, `python3`, `curl`, `jq`).
10+
- Installs OS deps (`dtach`, `build-essential`, `python3`, `curl`, `jq`).
1111
- Downloads the release tarball from `SoureCode/web-shell` and `npm install -g`s
1212
it against the Node toolchain provided by the
1313
[`nvm`](../nvm) feature (`dependsOn`).

src/web-shell/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "web-shell",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"name": "web-shell",
5-
"description": "Installs web-shell (persistent browser terminal backed by tmux) from the GitHub release tarball into the global Node install, and registers a systemd unit so the service starts automatically on container boot. Also publishes the service as a Coder workspace app.",
5+
"description": "Installs web-shell (persistent browser terminal backed by dtach) from the GitHub release tarball into the global Node install, and registers a systemd unit so the service starts automatically on container boot. Also publishes the service as a Coder workspace app.",
66
"documentationURL": "https://github.com/SoureCode/devcontainer-features/tree/master/src/web-shell",
77
"options": {
88
"version": {

src/web-shell/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ WS_PORT="${PORT:-4000}"
1919
WS_HOST="${HOST:-127.0.0.1}"
2020
WS_AUTH_TOKEN="${AUTHTOKEN:-}"
2121

22-
# 1. OS deps: tmux for the terminal multiplexer, build-essential + python3
22+
# 1. OS deps: dtach as the detachable session backend, build-essential + python3
2323
# because node-pty compiles native bindings, plus curl/jq for release lookup.
2424
APT_PKGS=""
25-
for pkg in tmux build-essential python3 ca-certificates curl jq; do
25+
for pkg in dtach build-essential python3 ca-certificates curl jq; do
2626
if ! dpkg -s "$pkg" >/dev/null 2>&1; then
2727
APT_PKGS="$APT_PKGS $pkg"
2828
fi

terraform/web-shell/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ if [ -z "$${WANTED_VERSION}" ]; then
2323
exit 1
2424
fi
2525

26-
# Install prereqs: tmux is required at runtime; build-essential + python3 cover
26+
# Install prereqs: dtach is required at runtime; build-essential + python3 cover
2727
# node-pty's native build step when a prebuilt binding isn't available.
2828
need=()
29-
for pkg in tmux build-essential python3; do
29+
for pkg in dtach build-essential python3; do
3030
dpkg -s "$pkg" >/dev/null 2>&1 || need+=("$pkg")
3131
done
3232
if [ $${#need[@]} -gt 0 ]; then

test/web-shell/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
# shellcheck disable=SC1091
77
source dev-container-features-test-lib
88

9-
check "tmux installed" which tmux
9+
check "dtach installed" which dtach
1010
check "web-shell binary in /usr/local/bin" test -x /usr/local/bin/web-shell
1111
check "systemd unit present" test -f /etc/systemd/system/web-shell.service
1212
check "unit contains PORT env" grep -q '^Environment=PORT=' /etc/systemd/system/web-shell.service

0 commit comments

Comments
 (0)