Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
135 changes: 0 additions & 135 deletions registry/coder/modules/cmux/run.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
display_name: cmux
display_name: mux
description: Coding Agent Multiplexer - Run multiple AI agents in parallel
icon: ../../../../.icons/cmux.svg
icon: ../../../../.icons/mux.svg
verified: false
tags: [ai, agents, development, multiplexer]
---

# cmux
# mux

Automatically install and run [cmux](https://github.com/coder/cmux) in a Coder workspace. By default, the module installs `@coder/cmux@latest` from npm (with a fallback to downloading the npm tarball if npm is unavailable). cmux is a desktop application for parallel agentic development that enables developers to run multiple AI agents simultaneously across isolated cmux workspaces.
Automatically install and run 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.

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```

## Features

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

Expand All @@ -32,21 +32,21 @@ module "cmux" {
### Basic Usage

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```

### Pin Version

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
# Default is "latest"; set to a specific version to pin
install_version = "0.4.0"
Expand All @@ -56,38 +56,38 @@ module "cmux" {
### Custom Port

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
port = 8080
}
```

### Use Cached Installation

Run an existing copy of cmux if found, otherwise install from npm:
Run an existing copy of mux if found, otherwise install from npm:

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
use_cached = true
}
```

### Skip Install

Run without installing from the network (requires cmux to be pre-installed):
Run without installing from the network (requires mux to be pre-installed):

```tf
module "cmux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/cmux/coder"
version = "1.0.2"
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
install = false
}
Expand All @@ -99,6 +99,6 @@ module "cmux" {

## Notes

- cmux is currently in preview and you may encounter bugs
- mux is currently in preview and you may encounter bugs
- Requires internet connectivity for agent operations (unless `install` is set to false)
- Installs `@coder/cmux` from npm by default (falls back to the npm tarball if npm is unavailable)
- Installs `mux@next` from npm by default (falls back to the npm tarball if npm is unavailable)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
testRequiredVariables,
} from "~test";

describe("cmux", async () => {
describe("mux", async () => {
await runTerraformInit(import.meta.dir);

testRequiredVariables(import.meta.dir, {
Expand All @@ -31,9 +31,9 @@ describe("cmux", async () => {
expect(output.exitCode).toBe(0);
const expectedLines = [
"📥 npm not found; downloading tarball from npm registry...",
"🥳 cmux has been installed in /tmp/cmux",
"🚀 Starting cmux server on port 4000...",
"Check logs at /tmp/cmux.log!",
"🥳 mux has been installed in /tmp/mux",
"🚀 Starting mux server on port 4000...",
"Check logs at /tmp/mux.log!",
];
for (const line of expectedLines) {
expect(output.stdout).toContain(line);
Expand All @@ -54,10 +54,10 @@ describe("cmux", async () => {

expect(output.exitCode).toBe(0);
const expectedLines = [
"📦 Installing @coder/cmux via npm into /tmp/cmux...",
"🥳 cmux has been installed in /tmp/cmux",
"🚀 Starting cmux server on port 4000...",
"Check logs at /tmp/cmux.log!",
"📦 Installing mux via npm into /tmp/mux...",
"🥳 mux has been installed in /tmp/mux",
"🚀 Starting mux server on port 4000...",
"Check logs at /tmp/mux.log!",
];
for (const line of expectedLines) {
expect(output.stdout).toContain(line);
Expand Down
Loading