#Dock

Dock, sağ kenar çubuğuna terminal ve tarayıcı kontrolleri eklemenizi sağlar. Terminal kontrolleri komutları Ghostty destekli bölümlerde çalıştırırken tarayıcı kontrolleri web sayfalarını gömer. Feedler, loglar, kuyruklar, git durumu, geliştirme sunucuları, panolar veya ekibinizin her workspace yanında görmek istediği referans sayfaları için kullanın.

#Yapılandırma

cmux Dock yapılandırmasını şu sırayla arar:

  1. .cmux/dock.json geçerli repo, en yakın üst proje ve iç içe proje dizinleri için.
  2. ~/.config/cmux/dock.json kişisel varsayılan Dock için veya repo olmadığında.
Hem proje hem de global yapılandırma varsa proje yapılandırması geçerli olur. İç içe proje yapılandırmaları kendi dizin ağacına uygulanır. Proje yapılandırması yoksa Dock global yapılandırmayı kullanır. Hiçbir dosya yoksa Dock boş açılır.
Proje Dock yapılandırmaları komut başlatabilir. cmux, kontrolleri başlatmadan önce proje yapılandırmasına güvenmenizi ister.

#dock.json örneği

Dock dosyası controls dizisi içeren bir JSON nesnesidir. Takım arkadaşlarının aynı Dock’u paylaşmasını istediğinde proje kontrollerini .cmux/dock.json içine ekleyip commit et. Örnek komutları repoda gerçekten bulunan araçlarla değiştir.

.cmux/dock.json
{
  "controls": [
    {
      "id": "git",
      "title": "Git",
      "command": "lazygit",
      "height": 300
    },
    {
      "id": "logs",
      "title": "Logs",
      "command": "tail -f ./logs/development.log",
      "cwd": "."
    },
    {
      "id": "feed",
      "title": "Feed",
      "command": "cmux feed tui --opentui",
      "height": 320
    },
    {
      "id": "dashboard",
      "title": "Dashboard",
      "type": "browser",
      "url": "http://127.0.0.1:8877/sidebar",
      "chrome": false
    }
  ]
}

#Alanlar

AlanAçıklama
idKontrol için kararlı ve benzersiz kimlik. Kısa tutun ve başka bir komut için yeniden kullanmayın.
titleDock başlığında gösterilen etiket.
commandDock terminalinde çalıştırılacak komut. Terminal kontrolleri için gereklidir ve oturum açma kabuğunda başlatılır.
typeİsteğe bağlı kontrol türü: terminal (varsayılan) veya browser.
urlAçılacak sayfa. Tarayıcı kontrolleri için gereklidir.
chromeİsteğe bağlı tarayıcı arayüzü görünürlüğü. Varsayılan değer true'dur; false adres çubuğunu ve araç çubuğunu gizler, o bölmede Adres Çubuğuna Odaklan işlevini etkisiz kılar ve cmux browser goto/reload komutlarını kullanılabilir tutar.
cwdİsteğe bağlı çalışma dizini. Göreli yollar proje yapılandırmalarında proje kökünden, global yapılandırmalarda home dizininden çözümlenir.
heightİsteğe bağlı kontrol yüksekliği. height değeri olmayan kontroller kalan alanı paylaşır.
envYalnızca o kontrole geçirilen isteğe bağlı ortam değişkenleri.

#Ekiple paylaşma

Dock, komutlar repoya ait olduğunda source control ile paylaşılmak üzere tasarlanmıştır.

  • Repo'ya özel kontrolleri .cmux/dock.json içine koyun ve dosyayı commit edin.
  • Kişisel kontrolleri özellikle repo dışında ~/.config/cmux/dock.json içine koy ve bu dosyayı paylaşılan source control dışında tut.
  • dock.json içine secret koymayın. Secret değerleri shell'den, yerel bir env dosyasından veya mevcut geliştirme araçlarınızdan okuyun.

#Bir agent'tan kurmasını isteyin

Bir coding agent’ın Dock kontrolleri oluşturmasını istediğinde bu promptu kullan. Agent’a `cmux docs dock` çalıştırmasını, projeyi incelemesini ve tahmin etmeden önce sormasını söyler.

Agent prompt
Set up cmux Dock controls for the current context.

First, learn the feature before editing:
1. Run `cmux docs dock` if the cmux CLI is available. If it is not, read https://cmux.com/docs/dock.
2. Inspect the repository or current directory to understand the project type, scripts, package manager, dev servers, logs, task runners, test commands, and any existing TUI tools.
3. If the desired Dock is ambiguous, ask the user what they want monitored or controlled before writing files.

Dock is cmux's right-sidebar terminal and browser control area. A Dock config is JSON with a top-level `controls` array. Terminal controls run commands in Ghostty-backed sections using the user's login shell; browser controls embed URLs. Controls are useful for project dashboards, git/status views, dev server or build status, test watchers, log tails, queues, local services, or fixed web dashboards.

Choose where to write the config:
- In a repository or project directory, create or edit `.cmux/dock.json` so teammates can share it.
- For a personal default outside a repo, create or edit `~/.config/cmux/dock.json`.
- If both exist, project `.cmux/dock.json` is more specific for that project. Nested project configs apply to that directory tree; use the nearest relevant project config instead of writing unrelated controls globally.
- If there is no repo and no clear project root, use the global config only after confirming the user wants a personal Dock.

Schema:
{
  "controls": [
    {
      "id": "short-stable-id",
      "title": "Human label",
      "command": "safe command to run",
      "cwd": "optional/path",
      "height": 220,
      "env": { "NAME": "value" }
    },
    {
      "id": "dashboard",
      "title": "Dashboard",
      "type": "browser",
      "url": "http://127.0.0.1:3000",
      "chrome": false
    }
  ]
}

Rules:
- Keep ids stable, lowercase, and unique.
- `type` is optional: `terminal` is the default, or use `browser`.
- Terminal controls require `command`; browser controls require `url`.
- Browser controls default to `chrome: true`. Set `chrome: false` to hide browser chrome, including the address bar and toolbar; Focus Address Bar then does nothing for that pane, while `cmux browser goto` and `cmux browser reload` remain available.
- Use `cwd` for subdirectories; relative paths resolve from the config base.
- Use `height` only when a control needs a fixed amount of vertical space.
- Use `env` only for non-secret values needed by one control.
- Do not put secrets, tokens, or machine-specific private paths in a shared project config.
- Prefer commands that are safe to start repeatedly and make sense in a terminal.
- Do not invent unavailable scripts. Read package files, Makefiles, Procfiles, README docs, config files, and existing tooling first.
- Keep shared project Docks portable for teammates. Put personal or machine-specific controls in the global Dock.

Deliverable:
- Create or update the appropriate dock.json.
- Preserve existing useful controls unless the user asked to replace them.
- Validate that the JSON parses.
- Summarize what each control does and any commands the user should review before trusting the Dock config.