You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mux): add package_manager and registry_url variables (#761)
## Summary
Add two new customization variables to the Mux module so users can
control how Mux is installed:
### `package_manager` (default: `"auto"`)
Choose which Node package manager installs Mux:
- **`auto`** (default) — auto-detects `npm` → `pnpm` → `bun` in order,
falling back to a direct tarball download when none is available
- **`npm`**, **`pnpm`**, **`bun`** — force a specific package manager
(fails if not found on PATH)
### `registry_url` (default: `"https://registry.npmjs.org"`)
Override the npm registry URL for private registries or mirrors. All
previously hardcoded `registry.npmjs.org` references have been replaced
with this variable. The `--registry` flag is passed to whichever package
manager is used, and the tarball fallback path also uses it.
## Changes
| File | What changed |
|---|---|
| `main.tf` | Added `package_manager` and `registry_url` variables with
validation; pass both to template |
| `run.sh` | Rewrote install logic: PM auto-detection loop,
`case`/`esac` dispatch with PM-specific flags, replaced all hardcoded
registry URLs with `${REGISTRY_URL}` |
| `mux.tftest.hcl` | Added 6 new test cases: PM selection
(npm/pnpm/bun), invalid PM validation, custom registry URL,
trailing-slash stripping |
| `main.test.ts` | Updated expected log messages to match new generic
wording |
| `README.md` | Updated description, added Custom Package Manager and
Custom Registry examples, updated Notes section |
## Version
Bumped **1.2.0 → 1.3.0** (minor: new backward-compatible features).
## Validation
- ✅ `terraform validate` — clean
- ✅ `terraform test` — **15 passed, 0 failed**
- ✅ `terraform fmt` — clean
---
Generated with [Mux](https://mux.coder.com) using Claude
Automatically install and run [Mux](https://github.com/coder/mux) in a Coder workspace. By default, the module installs `mux@next`from npm (with a fallback to downloading the npm tarball if npm is unavailable). Mux is a desktop application for parallel agentic development that enables developers to run multiple AI agents simultaneously across isolated workspaces.
11
+
Automatically install and run [Mux](https://github.com/coder/mux) in a Coder workspace. By default, the module auto-detects an available package manager (`npm`, `pnpm`, or `bun`) to install `mux@next` (with a fallback to downloading the npm tarball if none is found). You can also force a specific package manager via `package_manager` and point to a custom registry with `registry_url`. Mux is a desktop application for parallel agentic development that enables developers to run multiple AI agents simultaneously across isolated workspaces.
12
12
13
13
```tf
14
14
module "mux" {
15
15
count = data.coder_workspace.me.start_count
16
16
source = "registry.coder.com/coder/mux/coder"
17
-
version = "1.2.0"
17
+
version = "1.3.0"
18
18
agent_id = coder_agent.main.id
19
19
}
20
20
```
@@ -37,7 +37,7 @@ module "mux" {
37
37
module "mux" {
38
38
count = data.coder_workspace.me.start_count
39
39
source = "registry.coder.com/coder/mux/coder"
40
-
version = "1.2.0"
40
+
version = "1.3.0"
41
41
agent_id = coder_agent.main.id
42
42
}
43
43
```
@@ -48,7 +48,7 @@ module "mux" {
48
48
module "mux" {
49
49
count = data.coder_workspace.me.start_count
50
50
source = "registry.coder.com/coder/mux/coder"
51
-
version = "1.2.0"
51
+
version = "1.3.0"
52
52
agent_id = coder_agent.main.id
53
53
# Default is "latest"; set to a specific version to pin
54
54
install_version = "0.4.0"
@@ -63,7 +63,7 @@ Start Mux with `mux server --add-project /path/to/project`:
63
63
module "mux" {
64
64
count = data.coder_workspace.me.start_count
65
65
source = "registry.coder.com/coder/mux/coder"
66
-
version = "1.2.0"
66
+
version = "1.3.0"
67
67
agent_id = coder_agent.main.id
68
68
add-project = "/path/to/project"
69
69
}
@@ -78,7 +78,7 @@ The module parses quoted values, so grouped arguments remain intact.
Copy file name to clipboardExpand all lines: registry/coder/modules/mux/main.tf
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,23 @@ variable "install_version" {
67
67
default="next"
68
68
}
69
69
70
+
variable"package_manager" {
71
+
type=string
72
+
description="Package manager to install Mux. 'auto' detects npm, pnpm, or bun (falling back to tarball download). Set to 'npm', 'pnpm', or 'bun' to force a specific one."
0 commit comments