Skip to content

Configuration

CMDHub stores everything in:

~/.cmdhub/config.json

The file is created automatically on first launch with permissions 0600 (readable only by your user). You normally interact with it through the CMDHub UI - changes are saved immediately whenever you modify a project or service.

{
"globalProxySettings": {
"enabled": true,
"tld": "test"
},
"projects": [
{
"id": "abc123",
"name": "My App",
"rootDirectory": "/Users/you/projects/myapp",
"icon": "app.badge",
"domain": "myapp",
"services": [
{
"id": "svc1",
"name": "Frontend",
"command": "npm run dev",
"workingDirectory": "",
"port": 3000,
"subdomain": "frontend",
"envFile": ".env.local",
"env": {
"NODE_ENV": "development"
},
"dependencies": [],
"healthCheck": {
"type": "http",
"target": "http://localhost:3000",
"interval": 5,
"timeout": 3
}
}
]
}
]
}
KeyDescription
globalProxySettingsReverse proxy and DNS settings shared across all projects
projectsArray of project objects
FieldDescription
idAuto-generated UUID
nameDisplay name
rootDirectoryAbsolute path to the project root
iconSF Symbol name for the menu bar icon
domainBase domain used by the reverse proxy (e.g., myapp → *.myapp.test)
servicesArray of service objects
FieldDescription
commandShell command to run
workingDirectoryRelative to rootDirectory if not absolute; defaults to root
portPort the service listens on (used by proxy)
subdomainSubdomain prefix for the reverse proxy
envFilePath to a .env file (relative to rootDirectory)
envInline key-value environment variables
dependenciesArray of service IDs that must be running first
healthCheckHealth check configuration (see Health Checks)

Each service gets environment variables from two sources, merged in this order (later wins):

  1. .env file - path set in envFile, resolved relative to the project root
  2. Inline env - key-value pairs defined directly in the service config

Example:

"envFile": ".env.local",
"env": {
"PORT": "3000",
"API_URL": "http://localhost:4000"
}

CMDHub launches services through a login shell so that tools installed via Homebrew, nvm, rbenv, and other managers are on $PATH. It sources your shell profile (~/.zshrc, ~/.bash_profile, etc.) before running each service command.

If a command works in your terminal but not in CMDHub, check that the tool is available in a login shell:

Terminal window
/bin/zsh -l -c 'which your-command'

Because config.json is a plain JSON file in your home directory, you can back it up or track it in a dotfiles repo:

Terminal window
cp ~/.cmdhub/config.json ~/dotfiles/cmdhub-config.json

Project-specific settings (commands, ports, env var keys) are good candidates for version control. Avoid committing values that contain secrets.