Terminal-only host control-plane setup for the terminal-native development workflow.
This repository is intentionally separate from the dotfiles repo. It prepares the host-side tools and commands used to create, start, attach to, and deliberately recreate development containers. Homebrew is a prerequisite and is not installed by this repo.
This repo manages:
- The existing
~/Developer/dotfilesbaseline on the host. - Host-only terminal tools through Homebrew.
- Small host-side wrapper commands for DevPod CLI workflows.
- The control-plane layer for
terminal -> tmux -> devcontainer -> Neovim. - Optional host Ghostty configuration.
This repo does not manage:
- Installation of GUI applications such as Ghostty.
- DevPod GUI.
- Host shell dotfiles directly; those remain owned by
~/Developer/dotfiles. - Neovim configuration.
- SSH private keys.
- Docker Desktop, OrbStack, Docker Engine, or WSL provisioning.
- Project-specific devcontainer definitions.
This repository includes a basic .devcontainer/ definition, but it is not the runtime environment for the host control plane. The control-plane commands are still host commands.
The devcontainer exists as a test workspace for devcontainer-specific behaviour being developed here, especially checks such as:
- host-only wrappers refusing to run when
DEVCONTAINER=true; whereamireporting alinux | devcontainer | ...context;- authentication diagnostics seeing ordinary in-container tools such as Git, SSH and GitHub CLI.
The test container deliberately stays small. It uses a Microsoft Ubuntu 24.04 devcontainers base image pinned to linux/amd64, installs only basic diagnostic tools, sets DEVCONTAINER=true, and does not run this repo's host bootstrap.
Install these on the host before using this repo:
- Homebrew, used by
bootstrap.shto install the cross-platform terminal tool baseline. - Docker, Docker Desktop, OrbStack, or another Docker-compatible runtime supported by DevPod CLI.
- DevPod CLI, installed from the official CLI-only install path rather than the DevPod GUI cask.
This repo does not install these prerequisites. It also does not configure Rosetta 2 or x86 container support in virtualised environments.
git clone https://github.com/philbudden/dev-control-plane.git ~/Developer/dev-control-plane cd ~/Developer/dev-control-plane ./bootstrap.sh
bootstrap.sh expects Homebrew to already be installed. It first clones or updates ~/Developer/dotfiles and runs:
~/Developer/dotfiles/bootstrap.shThat applies the shared CLI, shell, Git, Starship and Neovim baseline from the same repo used inside devcontainers.
Then it runs this repo's host-only package layer:
brew bundle --file Brewfile
Then it links scripts from bin/ into ~/bin, ~/.local/bin, and the active Homebrew prefix's bin directory when there is no existing non-symlink file in the way. Linking all three locations keeps the commands visible across macOS, WSL2, Ubuntu login shells, and shells that only include one of the common user-bin directories.
It also links the host tmux configuration to:
~/.config/tmux/tmux.confIf that file already exists and is not a symlink, bootstrap leaves it alone.
Bootstrap also links the optional Ghostty configuration on macOS to ~/Library/Application Support/com.mitchellh.ghostty/config.ghostty and on other hosts to ${XDG_CONFIG_HOME:-$HOME/.config}/ghostty/config.ghostty. Ghostty does not need to be installed. An existing non-empty file, directory, or unrelated symlink is left untouched. An empty regular file is preserved as config.ghostty.empty-backup before linking, unless that backup already exists, in which case bootstrap skips it. Ghostty's macOS-specific configuration takes precedence over its XDG configuration if both exist.
DevPod CLI is also required for the wrapper commands, but it is not installed by this bootstrap. The current Homebrew devpod package is a cask for the DevPod UI app, so this repo deliberately avoids it. Install the CLI-only DevPod binary using the official DevPod CLI install instructions, then use this repo for the rest of the host terminal control plane.
The dotfiles location can be overridden when testing:
DOTFILES_DIR=~/Developer/dotfiles ./bootstrap.shThe dotfiles source can also be overridden:
DOTFILES_REPO=https://github.com/example/dotfiles.git ./bootstrap.sh
The shared baseline is installed from ~/Developer/dotfiles/Brewfile. It includes tools such as:
batfdfzfghjqlazygitneovimcopilot-cliripgrepstarshipstowunzipzipzoxide
Add shared CLI tools there, not here, so the host and devcontainer baselines do not drift.
This repo's Brewfile should contain only tools that make sense on the host/control plane but not in every devcontainer. The current host-only package is:
lazydockertmux
Host tmux is part of the host control-plane requirement because project sessions live on the host side of the DevPod attach workflow. It is deliberately not installed by the devcontainer dotfiles baseline.
DevPod CLI is intentionally absent from the Homebrew baseline until there is a CLI-only Homebrew package. Do not replace it with the DevPod GUI cask.
Create or start a DevPod workspace for the current directory:
dcu
Use an explicit workspace name:
dcu neovim-config
This runs:
devpod up . --id <name> --ide none --dotfiles https://github.com/philbudden/dotfiles.git --dotfiles-script bootstrap.sh
DevPod clones the dotfiles repository into the workspace and runs the selected install script during workspace setup, so newly created workspaces receive the shared terminal baseline without a separate manual bootstrap.
The dotfiles source follows the same default as host bootstrap and can be overridden for testing:
DCU_DOTFILES_REPO=https://github.com/example/dotfiles.git dcu DCU_DOTFILES_SCRIPT=install.sh dcu
Disable automatic dotfiles for a one-off workspace:
DCU_DOTFILES=false dcu
Attach to a DevPod workspace inside a single-window tmux session with the same name:
dca neovim-config
If the session already exists and has one window, dca marks it as a DevPod-backed project session and attaches to it:
tmux attach-session -t <name>
When dca is run from inside an existing tmux session, it uses tmux switch-client rather than nesting tmux inside tmux.
If the session does not already exist, dca creates one host tmux session with exactly one window:
1 nvim nvim inside dcssh <name>
The nvim window connects through dcssh, so it keeps the same DevPod SSH path, SSH agent forwarding, and GitHub/Copilot token bridging as a normal workspace shell. It initialises the workspace shell PATH before launching Neovim because DevPod command mode does not load the interactive shell startup files.
If Neovim exits or is missing inside the workspace, the window reports that outcome and falls back to a workspace shell. This keeps the session usable for repair without creating separate shell, edit, git, ai, review or run windows. LazyGit, GitHub Copilot CLI, CodeRabbit CLI and other tools are expected to be opened from Neovim's terminal-oriented UI.
If an existing session with the requested name has multiple windows, dca refuses to attach and leaves it untouched. This avoids closing old-style sessions that may still contain live processes. Finish or remove the old session, then run dca <name> again to create the new single-window layout.
Attach to a DevPod workspace with host authentication forwarded into the session:
dcssh neovim-config
This wraps:
devpod ssh --agent-forwarding=true --send-env GH_PROMPT_DISABLED <name>
When the host GitHub CLI token is usable by both GitHub CLI and GitHub Copilot CLI, dcssh also sends GH_TOKEN and COPILOT_GITHUB_TOKEN. Supported Copilot token types are GitHub OAuth tokens (gho_), GitHub App user tokens (ghu_), and fine-grained personal access tokens (github_pat_). Classic personal access tokens (ghp_) are not forwarded by default because Copilot CLI also reads GH_TOKEN and rejects classic PATs.
The command does not run gh auth login in the workspace and does not write GitHub credentials into the container image, dotfiles, or repository. If the host has COPILOT_GITHUB_TOKEN set to a supported token, that token is forwarded for Copilot. If the host GitHub CLI token is classic and no supported Copilot token is available, the workspace still opens with SSH agent forwarding but GitHub CLI and Copilot CLI do not receive token-based authentication from dcssh.
dcssh keeps routine attach output quiet. To see token-type decisions while debugging, run:
DCSSH_AUTH_DEBUG=true dcssh neovim-config
To deliberately forward a classic host GitHub token for GitHub CLI-only work, run:
DCSSH_FORWARD_CLASSIC_GH_TOKEN=true dcssh neovim-config
Use that override only when Copilot CLI is not expected to use the same shell environment.
Print the compact environment token used by the tmux status bar:
whereami
Typical output:
mac | devpod | neovim-config
wsl | host | ingest
linux | devcontainer | neovim-config
In normal project sessions this is called by tmux as:
whereami <tmux-session-name> <pane-current-path>
dca marks project sessions with a tmux session option so the status bar can show devpod for DevPod-backed sessions even though tmux itself is running on the host. For non-project sessions, the script falls back to the tmux session name, current Git repository basename or current directory basename.
Run read-only authentication diagnostics inside a DevPod workspace:
dcauth neovim-config
The check reports:
- basic workspace shell context;
- whether
SSH_AUTH_SOCKis present; - Git remotes and
git fetch --dry-run; ssh-add -l;- host GitHub token type and whether it is forwarded as
GH_TOKEN; - workspace
gh auth statuswhenGH_TOKENis present; - Copilot CLI presence/version and whether
COPILOT_GITHUB_TOKENis present and supported; - CodeRabbit CLI presence/version.
This command is deliberately diagnostic. It does not copy credentials, write tokens, run login flows, or change Git configuration. Use it before and after stopping/starting or deliberately recreating a workspace to see which authentication state survives.
The optional host configuration lives at config/ghostty/config.ghostty. It sets a 15-point font and the built-in Gruvbox Dark theme. Reload Ghostty with Cmd+Shift+, on macOS or restart it; terminals whose font size was manually adjusted can retain that size until a new terminal is opened. The configuration is linked even when Ghostty is absent, including on WSL2.
The configuration also enables ssh-env and ssh-terminfo. In a supported interactive shell with Ghostty shell integration active, an ordinary ssh user@host attempts to install the Ghostty terminfo on the remote host automatically, using tic there. Reload the config and open a new Ghostty terminal to ensure shell integration picks up the setting. Check with type ssh; Ghostty should provide a shell function. This only applies inside Ghostty, so hosts using other terminals, including WSL instances without Ghostty, need no Ghostty commands. See Ghostty SSH integration for requirements and troubleshooting.
The shell function does not cover programs or scripts that invoke SSH themselves, including DevPod. For a remote host reached that way, connect once with ordinary interactive ssh from Ghostty first, or manually install the entry with infocmp -x xterm-ghostty | ssh user@host 'tic -x -'. The manual command requires infocmp and the Ghostty terminfo locally and tic on the remote host.
The host tmux configuration lives at config/tmux/tmux.conf and is linked by bootstrap.
Key choices:
- Status left shows
platform | location | context, for examplemac | host | neovim-config. - Prefix remains the default
C-b, matching unconfigured remote tmux hosts. - Windows and panes start at
1. - Mouse mode is off.
- Copy mode uses vi keys.
C-b handC-b lmove to previous/next windows.C-b sopens the session/window tree.C-b pswitches back to the last client.C-b rreloads~/.config/tmux/tmux.conf.
Deliberately recreate a DevPod workspace:
dcr neovim-config
This runs:
devpod up <name> --recreate --ide none
Use this only when the devcontainer definition has changed or the workspace state is broken.
After bootstrap, verify the host control-plane tools:
devpod version tmux -V lazydocker --version command -v dcu command -v dca command -v dcr command -v dcauth gh --version rg --version fd --version bat --version zoxide --version
Then test the first workflow against a small project:
cd ~/Developer/neovim-config dcu neovim-config dca neovim-config
Inside the attached workspace, confirm the tmux session has one window named nvim and that Neovim opens inside the devcontainer.
Then check authentication propagation:
dcauth neovim-config
For a local wrapper regression test that does not require a real DevPod workspace, run:
bash tests/dca_single_window_test.sh
If backspace or clearing the screen does not work correctly on a remote machine when connecting from Ghostty, install the Ghostty terminfo entry on that machine. Run this on the local machine, replacing <remote-machine> with the SSH destination:
infocmp -x xterm-ghostty | ssh <remote-machine> 'tic -x -'
This requires infocmp and the Ghostty terminfo entry locally, and tic on the remote machine. It may be necessary even when automatic Ghostty SSH integration is enabled.