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
## Summary
Improves documentation visual design and reorganizes workspace
documentation for better clarity.
## Visual Design Improvements
### Blockquotes
- Enhanced styling with support for GitHub-style alerts (Note, Tip,
Important, Warning, Caution)
- Color-coded left borders for each alert type
- Consistent border-radius throughout
### Border-Radius
- Restored consistent border-radius across all UI elements
(8px/6px/4px/3px)
- Fixed table border-radius rendering (switched from `border-collapse:
collapse` to `separate`)
- Applied to: blockquotes, code blocks, inline code, tables, details,
images, mermaid diagrams
### Server Configuration
- mdbook server now binds to 0.0.0.0 for remote access
## Documentation Organization
### Workspace Pages
- Created dedicated `docs/local.md` for local workspace details
- Simplified `docs/workspaces.md` to high-level overview
- Moved reviewing sections to main Workspaces page (applies to both
local and SSH)
New structure:
```
Workspaces (overview + reviewing workflows)
├── Local (git worktrees specifics)
├── SSH (remote workspaces)
├── Forking
└── Init Hooks
```
## Development Setup
- Added mdbook tools to nix devShell for easier local development
---
_Generated with `cmux`_
Local workspaces use [git worktrees](https://git-scm.com/docs/git-worktree) on your local machine. Worktrees share the `.git` directory with your main repository while maintaining independent working changes and checkout state.
4
+
5
+
## How Worktrees Work
6
+
7
+
A worktree is a separate directory on the same filesystem as the main repository that shares a `.git` but has independent working changes and checkout state. **All committed changes from any worktree are visible to all other worktrees including the main repository.**
8
+
9
+
It's important to note that a **worktree is not locked to a branch**. The agent can switch to new branches, enter a detached HEAD state, etc. When you create a workspace, the agent will begin at the selected branch but may switch freely in the course of the session. **We empower users to define their agent's branching strategy in AGENTS.md**
10
+
11
+
## Filesystem Layout
12
+
13
+
Local workspaces are stored in `~/.cmux/src/<project-name>/<workspace-name>`.
cmux supports multiple workspace backends for different use cases:
3
+
Workspaces in cmux provide isolated development environments for parallel agent work. Each workspace maintains its own Git state, allowing you to explore different approaches, run multiple tasks simultaneously, or test changes without affecting your main repository.
4
4
5
-
-**Local workspaces**: [git worktrees](https://git-scm.com/docs/git-worktree) on your local machine
6
-
-**SSH workspaces**: Regular git clones on a remote server accessed via SSH
5
+
## Workspace Types
7
6
8
-
The backend is selected based on your runtime configuration. Local workspaces use git worktrees which share the `.git` directory with your main repository, while SSH workspaces are independent git clones on the remote machine.
7
+
cmux supports two workspace backends:
9
8
10
-
## Basics of worktrees
9
+
-**[Local Workspaces](./local.md)**: Use [git worktrees](https://git-scm.com/docs/git-worktree) on your local machine. Worktrees share the `.git` directory with your main repository while maintaining independent working changes.
11
10
12
-
A worktree is a seperate directory on the same filesystem as the main repository that shares a `.git`
13
-
but has independent working changes and checkout state. **All committed changes from any worktree are
14
-
visible to all other worktrees including the main repository.**
11
+
-**[SSH Workspaces](./ssh.md)**: Regular git clones on a remote server accessed via SSH. These are completely independent repositories stored on the remote machine.
15
12
16
-
It's important to note that a **worktree is not locked to a branch**. The agent can switch to new
17
-
branches, enter a detached HEAD state, etc. When you create a workspace, the agent will
18
-
begin at the selected branch but may switch freely in the course of the session. **We empower users to define their agent's branching strategy in AGENTS.md**
13
+
## Choosing a Backend
19
14
20
-
## Reviewing code
15
+
The workspace backend is selected when you create a workspace:
21
16
22
-
Here are a few practical approaches to reviewing changes from workspaces,
23
-
depending on how much you want your agent to interact with `git`:
17
+
-**Local**: Best for fast iteration, local testing, and when you want to leverage your local machine's resources
18
+
-**SSH**: Ideal for heavy workloads, long-running tasks, or when you need access to remote infrastructure
19
+
20
+
## Key Concepts
21
+
22
+
-**Isolation**: Each workspace has independent working changes and Git state
23
+
-**Branch flexibility**: Workspaces can switch branches, enter detached HEAD state, or create new branches as needed
24
+
-**Parallel execution**: Run multiple workspaces simultaneously on different tasks
25
+
-**Shared commits**: Local workspaces (using worktrees) share commits with the main repository immediately
26
+
27
+
## Reviewing Code
28
+
29
+
Here are a few practical approaches to reviewing changes from workspaces, depending on how much you want your agent to interact with `git`:
24
30
25
31
-**Agent codes, commits, and pushes**: Ask agent to submit a PR and review changes in your git Web UI (GitHub, GitLab, etc.)
26
32
- Also see: [Agentic Git Identity](./agentic-git-identity.md)
27
33
- This is the preferred approach for `cmux` development but requires additional care with repository security.
28
34
-**Agent codes and commits**: Review changes from the main repository via `git diff <workspace-branch>`, push changes when deemed acceptable.
29
-
-**Agent codes**: enter worktree (click Terminal icon in workspace top bar), run `git add -p` and progressively accept changes into a commit.
30
-
31
-
## Reviewing functionality
32
-
33
-
Some changes (esp. UI ones) require the Human to determine acceptability. An effective approach
34
-
for this is:
35
-
36
-
1. Ask agent to commit WIP when its ready for Human review
37
-
1. Human, in main repository, checks out the workspace branch in a detached HEAD state: `git checkout --detach <workspace-branch>`
35
+
-**Agent codes**: Enter worktree (click Terminal icon in workspace top bar), run `git add -p` and progressively accept changes into a commit.
38
36
39
-
Note: this workflow uses the detached HEAD state because the branch is already
40
-
checked out in the workspace and you cannot check out the same branch multiple times
41
-
across worktrees.
37
+
## Reviewing Functionality
42
38
43
-
If you want faster iteration in between commits, you can hop into the worktree directory and run a
44
-
dev server (e.g. `bun dev`) there directly and observe the agent's work in real-time.
39
+
Some changes (especially UI ones) require the Human to determine acceptability. An effective approach for this is:
45
40
46
-
## Filesystem Layout
41
+
1. Ask agent to commit WIP when it's ready for Human review
42
+
2. Human, in main repository, checks out the workspace branch in a detached HEAD state: `git checkout --detach <workspace-branch>` (for local workspaces)
47
43
48
-
Local workspaces are stored in `~/.cmux/src/<project-name>/<workspace-name>`.
44
+
**Note**: For local workspaces, this workflow uses the detached HEAD state because the branch is already checked out in the workspace and you cannot check out the same branch multiple times across worktrees.
49
45
50
-
SSH workspaces are stored on the remote machine at `~/workspace/<project-name>/<workspace-name>` (or your configured remote path).
46
+
If you want faster iteration in between commits, you can hop into the workspace directory and run a dev server (e.g. `bun dev`) there directly and observe the agent's work in real-time.
51
47
52
-
Example layout:
48
+
---
53
49
54
-
```
55
-
~/.cmux/src/
56
-
cmux-main/
57
-
improved-auth-ux/
58
-
fix-ci-flakes/
59
-
```
50
+
See the specific workspace type pages for detailed setup and usage instructions.
0 commit comments