Skip to content

Configuration

Git Watchtower can be configured through a wizard, config file, CLI flags, or environment variables. CLI flags take precedence over the config file for the current session.

On first run, Git Watchtower prompts you to configure settings interactively. Re-run it any time with:

Terminal window
git-watchtower --init

Settings are saved to .watchtowerrc.json in your project directory.

SettingDescriptionDefault
server.modeServer mode: static, command, or nonestatic
server.portDev server port (1-65535)3000
server.staticDirDirectory to serve (static mode)public
server.commandDev server command (command mode)""
server.restartOnSwitchRestart server on branch switchtrue
web.enabledEnable web dashboardfalse
web.portWeb dashboard port (1-65535)4000
remoteNameGit remote nameorigin
autoPullAuto-pull when current branch has updatestrue
gitPollIntervalHow often to check for git updates (1000-300000ms)5000
soundEnabledAudio alerts for updatestrue
visibleBranchesNumber of branches shown in list (1-50)7
casinoModeEnable casino modefalse
{
"server": {
"mode": "command",
"command": "npm run dev",
"port": 3000,
"restartOnSwitch": true,
"staticDir": "public"
},
"web": {
"enabled": true,
"port": 4000
},
"remoteName": "origin",
"autoPull": true,
"gitPollInterval": 5000,
"soundEnabled": true,
"visibleBranches": 7
}

All settings can be overridden from the command line:

FlagDescription
-m, --mode <mode>Server mode: static, command, or none
-p, --port <port>Server port (default: 3000)
-n, --no-serverShorthand for --mode none
--static-dir <dir>Directory for static file serving (default: public)
-c, --command <cmd>Command to run in command mode (e.g., "npm run dev")
--restart-on-switchRestart server on branch switch (default)
--no-restart-on-switchDon’t restart server on branch switch
FlagDescription
-r, --remote <name>Git remote name (default: origin)
--auto-pullAuto-pull on current branch updates (default)
--no-auto-pullDisable auto-pull
--poll-interval <ms>Git polling interval in ms (default: 5000)
FlagDescription
--soundEnable sound notifications (default)
--no-soundDisable sound notifications
--visible-branches <n>Number of branches to display (default: 7)
--casinoEnable casino mode
FlagDescription
-w, --webLaunch web dashboard alongside TUI
--web-port <port>Web dashboard port (default: 4000)
FlagDescription
--initRun the configuration wizard
-v, --versionShow version number
-h, --helpShow help message
Terminal window
PORT=8080 git-watchtower
GIT_POLL_INTERVAL=10000 git-watchtower

Git Watchtower includes opt-in anonymous usage analytics. Telemetry preferences are stored separately from project config in ~/.git-watchtower/config.json. No data is collected unless you explicitly opt in.