Loading...
Loading...
Build a custom cmux sidebar from a plain-language request. Use when the user asks for a custom sidebar, a sidebar that shows their workspaces/tabs/PRs/clock, a vibe-coded sidebar, or anything involving files in ~/.config/cmux/sidebars/. Covers authoring the interpreted SwiftUI-style file, enabling the beta flag, selecting it, and iterating with hot reload.
npx skill4agent add manaflow-ai/cmux cmux-custom-sidebarcmux docs sidebars
curl -fsSL https://raw.githubusercontent.com/manaflow-ai/cmux/main/docs/custom-sidebars.mdcustomSidebars.beta.enabled~/.config/cmux/sidebars/<name>.swiftstructvar body.json.swiftcmux sidebar validate <name> # parse/interpret check with real data shapes
cmux sidebar select <name> # switch the sidebar to itcmux sidebar reloadworkspacescmux(...)Reorderable.prefix(20)cat > ~/.config/cmux/sidebars/mine.swift <<'SWIFT'
VStack(alignment: .leading, spacing: 8) {
Text("My sidebar").font(.title3).bold()
Text(clock.time).font(.caption).foregroundColor(.secondary)
Divider()
Reorderable(workspaces, move: "workspace.reorder") { w in
Button(action: { cmux("workspace.select", workspace_id: w.id) }) {
HStack {
Text(w.selected ? "●" : "○").foregroundColor(w.selected ? "#FF8800" : .secondary)
Text(w.title)
Spacer()
}.padding(4)
}
}
}
SWIFT
cmux sidebar validate mine && cmux sidebar select mineworkspacesidtitleselectedpinnedindexdirectoryportsportCountunreadtabstabCountdescriptioncolorbranchdirtyprprs{number, label, url, status, stale, branch}progress{value, label}latestMessagelatestPromptlatestAtremote{target, state, connected}workspaces[i].tabsidtitlefocusedpinneddirectorybranchdirtyportsclock{time, hour, minute, second, weekday, epoch}workspaceCountselectedTitleselectedIdunreadTotalif let b = w.branch { ... }w.pr != nil ? ... : ....onTapGesturecmux("<method>", param: value)cmuxworkspace.selectworkspace_idsurface.focussurface_idworkspace.reorderworkspace_idindexopenURL("https://...")cmux docs apiGroupListSectionViewThatFitsScrollViewHSplitViewTextLabelImage(systemName:)ButtonMenuProgressViewGaugeSpacerDivider.background.padding.frame.background.overlay.mask.contextMenu.onTapGesture.help.disabledletfuncforForEachif/elsefiltermapsortedprefix@StateTextFieldToggleSliderPickerstructViewsheetpopoverAsyncImagecmux(...)~/.config/cmux/sidebars/cmux sidebar validate <name>Button(action: { cmux(...) }) { ... }.onTapGesture { cmux(...) }Reorderable(data, move: "workspace.reorder")List.onMove.draggable