Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e8f4a3e
Add local cmux config packs prototype
lawrencecchen May 23, 2026
c256f10
Fix cmux pack template layout JSON
lawrencecchen May 23, 2026
aa0bbec
Fix cmux pack precedence and watching
lawrencecchen May 23, 2026
a88b046
Fix cmux pack trust and watcher behavior
lawrencecchen May 23, 2026
ecbfbca
Watch missing cmux pack recovery paths
lawrencecchen May 23, 2026
0d2252b
Fix pack icon sources for built-in buttons
lawrencecchen May 23, 2026
91bfed0
Fix shared pack dependency cycle handling
lawrencecchen May 23, 2026
586b51c
Keep single-source action resolver compatibility
teamleaderleo Sep 21, 2026
de04369
docs: localize local pack schema descriptions
teamleaderleo Sep 21, 2026
68a8344
fix(config): keep pack reference value nonisolated
teamleaderleo Sep 21, 2026
a1f94fb
fix(config): align pack URL schema validation
teamleaderleo Sep 21, 2026
43784b3
test(config): expect built-in action source provenance
teamleaderleo Sep 21, 2026
63f9fea
fix(config): keep pack reference Swift 6.0 compatible
teamleaderleo Sep 21, 2026
153181e
fix(config): bound pack loading and merge action overlays
teamleaderleo Sep 21, 2026
9647eb0
test(config): cover pack overlays and load bounds
teamleaderleo Sep 21, 2026
a248a59
fix(config): localize pack validation errors
teamleaderleo Sep 21, 2026
abde35d
fix(config): ship pack error translations
teamleaderleo Sep 21, 2026
2af8d1f
config: bound every pack reference
teamleaderleo Sep 21, 2026
b28160e
test missing pack reference budget
teamleaderleo Sep 21, 2026
f77848d
test exact missing pack budget
teamleaderleo Sep 21, 2026
7e16aaa
Merge origin/main into pack-local-slice
teamleaderleo Sep 24, 2026
fccc0ca
Normalize project.pbxproj ordering for ConfigPackErrors.xcstrings
teamleaderleo Sep 24, 2026
e5e4cbe
Merge origin/main into pack-local-slice
teamleaderleo Sep 24, 2026
ffe115f
config: attribute registry built-in buttons to their declaring config
teamleaderleo Sep 24, 2026
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
359 changes: 320 additions & 39 deletions Sources/CmuxConfig.swift

Large diffs are not rendered by default.

553 changes: 552 additions & 1 deletion cmuxTests/CmuxConfigTests.swift

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions examples/cmux-pack-template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# cmux Pack Template

Prototype pack for sharing cmux actions, commands, and UI defaults.

Fork or clone a pack into the project, then load it from a project config:

```json
{
"packs": ["./packs/team-defaults"]
}
```

cmux resolves a directory pack to `cmux.pack.json`, so the example above loads `./packs/team-defaults/cmux.pack.json`.

Pack entries use the `cmux.json` action, command, and UI-default syntax. Project configs override pack entries with the same action id or command name. Pack paths are local files or directories only.
72 changes: 72 additions & 0 deletions examples/cmux-pack-template/cmux.pack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"actions": {
"team.tests": {
"type": "command",
"title": "Team Tests",
"subtitle": "Run the shared test command",
"command": "npm test",
"target": "currentTerminal",
"icon": { "type": "symbol", "name": "checkmark.circle" },
"keywords": ["test", "ci", "team"]
},
"team.dev-workspace": {
"type": "workspaceCommand",
"title": "Team Dev Workspace",
"commandName": "Team Dev"
}
},
"ui": {
"surfaceTabBar": {
"buttons": [
"newTerminal",
"newBrowser",
{ "action": "team.tests" },
{ "action": "team.dev-workspace" }
]
},
"newWorkspace": {
"contextMenu": [
"cmux.newWorkspace",
"team.dev-workspace",
"-",
"team.tests"
]
}
},
"commands": [
{
"name": "Team Dev",
"description": "Start the team's default dev layout.",
"workspace": {
"name": "Team Dev",
"layout": {
"direction": "horizontal",
"children": [
{
"pane": {
"surfaces": [
{
"type": "terminal",
"name": "App",
"command": "npm run dev"
}
]
}
},
{
"pane": {
"surfaces": [
{
"type": "terminal",
"name": "Tests",
"command": "npm test -- --watch"
}
]
}
}
]
}
}
}
]
}
30 changes: 30 additions & 0 deletions web/data/cmux.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@
"descriptionKey": "schemaDescriptions.activePaneBorderColor",
"description": "Optional border color drawn around the focused cmux pane in split workspaces."
},
"packs": {
"title": "packs",
"descriptionKey": "schemaDescriptions.packs.description",
"description": "Local cmux pack files or directories loaded before this configuration. Directories resolve to cmux.pack.json. Use a path string or an object with a path field.",
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^(?!\\s*$)(?!\\s*[hH][tT][tT][pP][sS]?://).+"
},
{
"type": "object",
"additionalProperties": false,
"required": ["path"],
"properties": {
"path": {
"type": "string",
"minLength": 1,
"pattern": "^(?!\\s*$)(?!\\s*[hH][tT][tT][pP][sS]?://).+",
"descriptionKey": "schemaDescriptions.packs.path",
"description": "Local file or directory path, relative to this configuration file unless absolute."
}
}
}
]
},
"default": []
},
"actions": {
"title": "actions",
"description": "Action registry used by the surface tab bar, Command Palette, shortcuts, and plus-button menu. Each entry supports type \"builtin\", \"command\", \"agent\" (any CLI agent name, e.g. claude, codex, opencode, or a custom binary, with optional args), \"workspaceCommand\", or \"workspace\" (inline workspace with name/cwd/color/env/setup/layout, plus optional restart). Inline workspace entries are auto-offered in the new-workspace plus-button menu; set newWorkspaceMenu true/false on any action to override. \"Save Workspace as Layout\" in the plus-button menu writes entries here.",
Expand Down
4 changes: 4 additions & 0 deletions web/messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "مثال على الإعدادات",
"metaTitle": "الإعدادات",
"schemaDescriptions": {
"packs": {
"description": "ملفات أو مجلدات حزم cmux المحلية التي تُحمّل قبل هذا الإعداد. تشير المجلدات إلى cmux.pack.json. استخدم مسارًا نصيًا أو كائنًا يحتوي على حقل path.",
"path": "مسار ملف أو مجلد محلي، نسبي إلى ملف الإعداد هذا ما لم يكن مطلقًا."
},
"paneBorderColor": "تجاوز لون فاصل ألواح cmux في مساحات العمل المقسمة. يؤثر هذا على حدود ألواح cmux، وليس على التقسيمات الداخلية في Ghostty.",
"activePaneBorderColor": "لون حدود اختياري يُرسم حول لوح cmux المركّز في مساحات العمل المقسمة.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Primjer konfiguracije",
"metaTitle": "Konfiguracija",
"schemaDescriptions": {
"packs": {
"description": "Lokalne datoteke ili direktoriji cmux paketa koji se učitavaju prije ove konfiguracije. Direktoriji upućuju na cmux.pack.json. Koristite tekstualnu putanju ili objekt s poljem path.",
"path": "Putanja lokalne datoteke ili direktorija, relativna u odnosu na ovu konfiguracijsku datoteku ako nije apsolutna."
},
"paneBorderColor": "Zamijenite boju razdjelnika cmux okana u podijeljenim radnim prostorima. Ovo utiče na granice cmux okana, ne na interne Ghostty podjele.",
"activePaneBorderColor": "Opcionalna boja ivice koja se crta oko fokusiranog cmux okna u podijeljenim radnim prostorima.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Eksempelkonfiguration",
"metaTitle": "Konfiguration",
"schemaDescriptions": {
"packs": {
"description": "Lokale cmux-pakkefiler eller mapper, der indlæses før denne konfiguration. Mapper peger på cmux.pack.json. Brug en stistreng eller et objekt med et path-felt.",
"path": "Lokal fil- eller mappesti, relativ til denne konfigurationsfil, medmindre den er absolut."
},
"paneBorderColor": "Tilsidesæt farven på cmux-rudeadskilleren i opdelte arbejdsområder. Dette påvirker cmux-rudegrænser, ikke Ghosttys interne opdelinger.",
"activePaneBorderColor": "Valgfri kantfarve, der tegnes omkring den fokuserede cmux-rude i opdelte arbejdsområder.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Beispielkonfiguration",
"metaTitle": "Konfiguration",
"schemaDescriptions": {
"packs": {
"description": "Lokale cmux-Paketdateien oder Verzeichnisse, die vor dieser Konfiguration geladen werden. Verzeichnisse verweisen auf cmux.pack.json. Verwenden Sie eine Pfadzeichenfolge oder ein Objekt mit einem path-Feld.",
"path": "Lokaler Datei- oder Verzeichnispfad, relativ zu dieser Konfigurationsdatei, sofern nicht absolut."
},
"paneBorderColor": "Überschreibt die Farbe des cmux-Fensterteilers in geteilten Workspaces. Dies betrifft cmux-Fenstergrenzen, nicht interne Ghostty-Aufteilungen.",
"activePaneBorderColor": "Optionale Rahmenfarbe, die in geteilten Workspaces um das fokussierte cmux-Fenster gezeichnet wird.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,10 @@
"settingsFileChords": "Use a string for a single shortcut or a two-item array for a chord. Example: [\"ctrl+b\", \"c\"] means press Ctrl+B, then C.",
"exampleConfig": "Example config",
"schemaDescriptions": {
"packs": {
"description": "Local cmux pack files or directories loaded before this configuration. Directories resolve to cmux.pack.json. Use a path string or an object with a path field.",
"path": "Local file or directory path, relative to this configuration file unless absolute."
},
"computerUse": {
"description": "Local computer-use tools and menu-bar visibility.",
"enabled": "Allow supported agent launches in cmux terminals to attach the local computer-use tools.",
Expand Down
4 changes: 4 additions & 0 deletions web/messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Configuración de ejemplo",
"metaTitle": "Configuración",
"schemaDescriptions": {
"packs": {
"description": "Archivos o directorios de paquetes cmux locales que se cargan antes de esta configuración. Los directorios se resuelven como cmux.pack.json. Usa una cadena de ruta o un objeto con un campo path.",
"path": "Ruta de archivo o directorio local, relativa a este archivo de configuración salvo que sea absoluta."
},
"paneBorderColor": "Sobrescribe el color del divisor de paneles de cmux en workspaces divididos. Afecta a los límites de paneles de cmux, no a las divisiones internas de Ghostty.",
"activePaneBorderColor": "Color de borde opcional que se dibuja alrededor del panel de cmux enfocado en workspaces divididos.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Exemple de configuration",
"metaTitle": "Configuration",
"schemaDescriptions": {
"packs": {
"description": "Fichiers ou dossiers de packs cmux locaux chargés avant cette configuration. Les dossiers sont résolus en cmux.pack.json. Utilisez une chaîne de chemin ou un objet avec un champ path.",
"path": "Chemin de fichier ou de dossier local, relatif à ce fichier de configuration sauf s’il est absolu."
},
"paneBorderColor": "Remplace la couleur du séparateur de volets cmux dans les espaces de travail divisés. Cela affecte les limites des volets cmux, pas les divisions internes de Ghostty.",
"activePaneBorderColor": "Couleur de bordure facultative dessinée autour du volet cmux focalisé dans les espaces de travail divisés.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Esempio di configurazione",
"metaTitle": "Configurazione",
"schemaDescriptions": {
"packs": {
"description": "File o directory di pacchetti cmux locali caricati prima di questa configurazione. Le directory vengono risolte in cmux.pack.json. Usa una stringa di percorso o un oggetto con un campo path.",
"path": "Percorso di file o directory locale, relativo a questo file di configurazione se non assoluto."
},
"paneBorderColor": "Sovrascrive il colore del divisore dei riquadri cmux negli spazi di lavoro divisi. Influisce sui bordi dei riquadri cmux, non sulle divisioni interne di Ghostty.",
"activePaneBorderColor": "Colore del bordo opzionale disegnato attorno al riquadro cmux focalizzato negli spazi di lavoro divisi.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,10 @@
"exampleConfig": "設定例",
"metaTitle": "設定",
"schemaDescriptions": {
"packs": {
"description": "この設定より先に読み込むローカルの cmux パックファイルまたはディレクトリ。ディレクトリ内の cmux.pack.json を読み込みます。パス文字列、または path フィールドを持つオブジェクトを指定します。",
"path": "ローカルファイルまたはディレクトリのパス。絶対パス以外は、この設定ファイルからの相対パスです。"
},
"computerUse": {
"description": "ローカルのコンピュータ操作ツールとメニューバー表示の設定です。",
"enabled": "cmux ターミナルで起動した対応エージェントが、ローカルのコンピュータ操作ツールを接続できるようにします。",
Expand Down
4 changes: 4 additions & 0 deletions web/messages/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "ឧទាហរណ៍កំណត់រចនាសម្ព័ន្ធ",
"metaTitle": "ការកំណត់រចនាសម្ព័ន្ធ",
"schemaDescriptions": {
"packs": {
"description": "ឯកសារ ឬថតកញ្ចប់ cmux ក្នុងម៉ាស៊ីន ដែលផ្ទុកមុនការកំណត់រចនាសម្ព័ន្ធនេះ។ ថតនឹងប្រើ cmux.pack.json។ ប្រើខ្សែអក្សរផ្លូវ ឬវត្ថុដែលមានវាល path។",
"path": "ផ្លូវឯកសារ ឬថតក្នុងម៉ាស៊ីន ដែលទាក់ទងនឹងឯកសារកំណត់រចនាសម្ព័ន្ធនេះ លុះត្រាតែជាផ្លូវដាច់ខាត។"
},
"paneBorderColor": "ប្ដូរពណ៌ខ្សែបំបែក pane របស់ cmux នៅក្នុង workspace ដែលបានបំបែក។ វាប៉ះពាល់ដល់ព្រំដែន pane របស់ cmux មិនមែនការបំបែកខាងក្នុងរបស់ Ghostty ទេ។",
"activePaneBorderColor": "ពណ៌ស៊ុមជាជម្រើស ដែលគូរជុំវិញ pane របស់ cmux ដែលកំពុងផ្តោត នៅក្នុង workspace ដែលបានបំបែក។",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "예시 설정",
"metaTitle": "설정",
"schemaDescriptions": {
"packs": {
"description": "이 설정보다 먼저 불러올 로컬 cmux 팩 파일 또는 디렉터리입니다. 디렉터리는 cmux.pack.json으로 해석됩니다. 경로 문자열 또는 path 필드가 있는 객체를 사용하세요.",
"path": "로컬 파일 또는 디렉터리 경로입니다. 절대 경로가 아니면 이 설정 파일을 기준으로 합니다."
},
"paneBorderColor": "분할된 작업 공간에서 cmux 창 구분선 색상을 재정의합니다. Ghostty 내부 분할이 아니라 cmux 창 경계에 적용됩니다.",
"activePaneBorderColor": "분할된 작업 공간에서 포커스된 cmux 창 주위에 그릴 선택적 테두리 색상입니다.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Eksempelkonfigurasjon",
"metaTitle": "Konfigurasjon",
"schemaDescriptions": {
"packs": {
"description": "Lokale cmux-pakkefiler eller mapper som lastes før denne konfigurasjonen. Mapper viser til cmux.pack.json. Bruk en stistreng eller et objekt med et path-felt.",
"path": "Lokal fil- eller mappesti, relativ til denne konfigurasjonsfilen med mindre den er absolutt."
},
"paneBorderColor": "Overstyr fargen på cmux-rutedeleren i delte arbeidsområder. Dette påvirker cmux-rutekanter, ikke Ghosttys interne delinger.",
"activePaneBorderColor": "Valgfri kantfarge som tegnes rundt den fokuserte cmux-ruten i delte arbeidsområder.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,10 @@
"exampleConfig": "Przykładowa konfiguracja",
"metaTitle": "Konfiguracja",
"schemaDescriptions": {
"packs": {
"description": "Lokalne pliki lub katalogi pakietów cmux wczytywane przed tą konfiguracją. Katalogi wskazują na cmux.pack.json. Użyj ciągu ścieżki lub obiektu z polem path.",
"path": "Lokalna ścieżka pliku lub katalogu, względna wobec tego pliku konfiguracyjnego, jeśli nie jest bezwzględna."
},
"paneBorderColor": "Zastępuje kolor separatora paneli cmux w podzielonych obszarach roboczych. Dotyczy granic paneli cmux, a nie wewnętrznych podziałów Ghostty.",
"activePaneBorderColor": "Opcjonalny kolor obramowania rysowany wokół aktywnego panelu cmux w podzielonych obszarach roboczych.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Exemplo de configuração",
"metaTitle": "Configuração",
"schemaDescriptions": {
"packs": {
"description": "Arquivos ou diretórios de pacotes cmux locais carregados antes desta configuração. Diretórios são resolvidos como cmux.pack.json. Use uma string de caminho ou um objeto com um campo path.",
"path": "Caminho de arquivo ou diretório local, relativo a este arquivo de configuração, a menos que seja absoluto."
},
"paneBorderColor": "Substitui a cor do divisor de painéis do cmux em workspaces divididos. Isso afeta as bordas dos painéis do cmux, não as divisões internas do Ghostty.",
"activePaneBorderColor": "Cor de borda opcional desenhada ao redor do painel cmux em foco em workspaces divididos.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@
"exampleConfig": "Пример конфигурации",
"metaTitle": "Конфигурация",
"schemaDescriptions": {
"packs": {
"description": "Локальные файлы или каталоги пакетов cmux, загружаемые перед этой конфигурацией. Каталоги указывают на cmux.pack.json. Используйте строку пути или объект с полем path.",
"path": "Путь к локальному файлу или каталогу, относительно этого файла конфигурации, если путь не абсолютный."
},
"paneBorderColor": "Переопределяет цвет разделителя панелей cmux в разделенных рабочих пространствах. Это влияет на границы панелей cmux, а не на внутренние разделения Ghostty.",
"activePaneBorderColor": "Необязательный цвет рамки, рисуемой вокруг сфокусированной панели cmux в разделенных рабочих пространствах.",
"automation": {
Expand Down
4 changes: 4 additions & 0 deletions web/messages/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,10 @@
"exampleConfig": "ตัวอย่างคอนฟิก",
"metaTitle": "การตั้งค่า",
"schemaDescriptions": {
"packs": {
"description": "ไฟล์หรือไดเรกทอรีแพ็ก cmux ในเครื่องที่โหลดก่อนการกำหนดค่านี้ ไดเรกทอรีจะอ้างถึง cmux.pack.json ใช้สตริงพาธหรือออบเจ็กต์ที่มีฟิลด์ path",
"path": "พาธไฟล์หรือไดเรกทอรีในเครื่อง ซึ่งสัมพันธ์กับไฟล์การกำหนดค่านี้ เว้นแต่เป็นพาธแบบสัมบูรณ์"
},
"paneBorderColor": "แทนที่สีตัวแบ่งพาเนลของ cmux ในเวิร์กสเปซที่แบ่งอยู่ การตั้งค่านี้มีผลกับขอบพาเนลของ cmux ไม่ใช่การแบ่งภายในของ Ghostty",
"activePaneBorderColor": "สีเส้นขอบเสริมที่วาดรอบพาเนล cmux ที่โฟกัสอยู่ในเวิร์กสเปซที่แบ่งอยู่",
"automation": {
Expand Down
Loading
Loading