Skip to content

Commit bd1c4c5

Browse files
authored
feat(coder/modules/mux): update defaults and add-project (#677)
## Summary - Default `subdomain` to `true` so Mux uses subdomain routing by default. - Default `display_name` to `Mux`. - Make `add-project` optional (`null` by default) and pass `--add-project` to `mux server` when set. - Bump mux module README example version to `1.0.8`. ## Notes Changing the `subdomain` default may affect workspaces without wildcard subdomain support configured (they can explicitly set `subdomain = false`). ## Testing - `terraform validate` (registry/coder/modules/mux) - `terraform test -verbose` (registry/coder/modules/mux) --- Generated with Mux (AI coding agent).
1 parent 8d53725 commit bd1c4c5

2 files changed

Lines changed: 42 additions & 28 deletions

File tree

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
---
2-
display_name: mux
2+
display_name: Mux
33
description: Coding Agent Multiplexer - Run multiple AI agents in parallel
44
icon: ../../../../.icons/mux.svg
55
verified: true
66
tags: [ai, agents, development, multiplexer]
77
---
88

9-
# mux
9+
# Mux
1010

11-
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 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.
1212

1313
```tf
1414
module "mux" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/mux/coder"
17-
version = "1.0.7"
17+
version = "1.0.8"
1818
agent_id = coder_agent.main.id
1919
}
2020
```
2121

22-
![mux](../../.images/mux-product-hero.webp)
22+
![Mux](../../.images/mux-product-hero.webp)
2323

2424
## Features
2525

2626
- **Parallel Agent Execution**: Run multiple AI agents simultaneously on different tasks
2727
- **Mux Workspace Isolation**: Each agent works in its own isolated environment
28-
- **Git Divergence Visualization**: Track changes across different mux agent workspaces
28+
- **Git Divergence Visualization**: Track changes across different Mux agent workspaces
2929
- **Long-Running Processes**: Resume AI work after interruptions
3030
- **Cost Tracking**: Monitor API usage across agents
3131

@@ -37,7 +37,7 @@ module "mux" {
3737
module "mux" {
3838
count = data.coder_workspace.me.start_count
3939
source = "registry.coder.com/coder/mux/coder"
40-
version = "1.0.7"
40+
version = "1.0.8"
4141
agent_id = coder_agent.main.id
4242
}
4343
```
@@ -48,48 +48,62 @@ module "mux" {
4848
module "mux" {
4949
count = data.coder_workspace.me.start_count
5050
source = "registry.coder.com/coder/mux/coder"
51-
version = "1.0.7"
51+
version = "1.0.8"
5252
agent_id = coder_agent.main.id
5353
# Default is "latest"; set to a specific version to pin
5454
install_version = "0.4.0"
5555
}
5656
```
5757

58+
### Open a Project on Launch
59+
60+
Start Mux with `mux server --add-project /path/to/project`:
61+
62+
```tf
63+
module "mux" {
64+
count = data.coder_workspace.me.start_count
65+
source = "registry.coder.com/coder/mux/coder"
66+
version = "1.0.8"
67+
agent_id = coder_agent.main.id
68+
add-project = "/path/to/project"
69+
}
70+
```
71+
5872
### Custom Port
5973

6074
```tf
6175
module "mux" {
6276
count = data.coder_workspace.me.start_count
6377
source = "registry.coder.com/coder/mux/coder"
64-
version = "1.0.7"
78+
version = "1.0.8"
6579
agent_id = coder_agent.main.id
6680
port = 8080
6781
}
6882
```
6983

7084
### Use Cached Installation
7185

72-
Run an existing copy of mux if found, otherwise install from npm:
86+
Run an existing copy of Mux if found, otherwise install from npm:
7387

7488
```tf
7589
module "mux" {
7690
count = data.coder_workspace.me.start_count
7791
source = "registry.coder.com/coder/mux/coder"
78-
version = "1.0.7"
92+
version = "1.0.8"
7993
agent_id = coder_agent.main.id
8094
use_cached = true
8195
}
8296
```
8397

8498
### Skip Install
8599

86-
Run without installing from the network (requires mux to be pre-installed):
100+
Run without installing from the network (requires Mux to be pre-installed):
87101

88102
```tf
89103
module "mux" {
90104
count = data.coder_workspace.me.start_count
91105
source = "registry.coder.com/coder/mux/coder"
92-
version = "1.0.7"
106+
version = "1.0.8"
93107
agent_id = coder_agent.main.id
94108
install = false
95109
}
@@ -101,6 +115,6 @@ module "mux" {
101115

102116
## Notes
103117

104-
- mux is currently in preview and you may encounter bugs
118+
- Mux is currently in preview and you may encounter bugs
105119
- Requires internet connectivity for agent operations (unless `install` is set to false)
106120
- Installs `mux@next` from npm by default (falls back to the npm tarball if npm is unavailable)

registry/coder/modules/mux/main.tf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,43 +17,43 @@ variable "agent_id" {
1717

1818
variable "port" {
1919
type = number
20-
description = "The port to run mux on."
20+
description = "The port to run Mux on."
2121
default = 4000
2222
}
2323

2424
variable "display_name" {
2525
type = string
26-
description = "The display name for the mux application."
27-
default = "mux"
26+
description = "The display name for the Mux application."
27+
default = "Mux"
2828
}
2929

3030
variable "slug" {
3131
type = string
32-
description = "The slug for the mux application."
32+
description = "The slug for the Mux application."
3333
default = "mux"
3434
}
3535

3636
variable "install_prefix" {
3737
type = string
38-
description = "The prefix to install mux to."
38+
description = "The prefix to install Mux to."
3939
default = "/tmp/mux"
4040
}
4141

4242
variable "log_path" {
4343
type = string
44-
description = "The path for mux logs."
44+
description = "The path for Mux logs."
4545
default = "/tmp/mux.log"
4646
}
4747

4848
variable "add-project" {
4949
type = string
50-
description = "Path to add/open as a project in mux (idempotent)."
51-
default = ""
50+
description = "Optional path to add/open as a project in Mux on startup."
51+
default = null
5252
}
5353

5454
variable "install_version" {
5555
type = string
56-
description = "The version or dist-tag of mux to install."
56+
description = "The version or dist-tag of Mux to install."
5757
default = "next"
5858
}
5959

@@ -80,13 +80,13 @@ variable "group" {
8080

8181
variable "install" {
8282
type = bool
83-
description = "Install mux from the network (npm or tarball). If false, run without installing (requires a pre-installed mux)."
83+
description = "Install Mux from the network (npm or tarball). If false, run without installing (requires a pre-installed Mux)."
8484
default = true
8585
}
8686

8787
variable "use_cached" {
8888
type = bool
89-
description = "Use cached copy of mux if present; otherwise install from npm"
89+
description = "Use cached copy of Mux if present; otherwise install from npm"
9090
default = false
9191
}
9292

@@ -96,7 +96,7 @@ variable "subdomain" {
9696
Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder.
9797
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
9898
EOT
99-
default = false
99+
default = true
100100
}
101101

102102
variable "open_in" {
@@ -115,13 +115,13 @@ variable "open_in" {
115115

116116
resource "coder_script" "mux" {
117117
agent_id = var.agent_id
118-
display_name = "mux"
118+
display_name = var.display_name
119119
icon = "/icon/mux.svg"
120120
script = templatefile("${path.module}/run.sh", {
121121
VERSION : var.install_version,
122122
PORT : var.port,
123123
LOG_PATH : var.log_path,
124-
ADD_PROJECT : var.add-project,
124+
ADD_PROJECT : var.add-project == null ? "" : var.add-project,
125125
INSTALL_PREFIX : var.install_prefix,
126126
OFFLINE : !var.install,
127127
USE_CACHED : var.use_cached,

0 commit comments

Comments
 (0)