Watcher CLI
Every data-hub-watcher command, subcommand, and flag in one place: init, watch, upload, config, service, state, and self-update.
This page lists the flags and subcommands for data-hub-watcher, generated from the Click CLI in the watcher package. For step-by-step guides, see Install and update the watcher, Run as a Windows service, and Roll out watcher releases.
Command reference
This catalog comes from the installed CLI’s help text and lists every command, argument, and option.
Global flags
These options apply to every data-hub-watcher command (watcher 1.4.5).
Flags
--config PATHDATA_HUB_CONFIG_PATHpathOverride config file path.
--verbosebooleanEnable debug logging.
--versionbooleanShow the version and exit.
data-hub-watcher config
View and manage the watcher config file.
data-hub-watcher config edit
data-hub-watcher config open
Flags
--editortextEditor command (e.g. --editor code).
data-hub-watcher config path
data-hub-watcher config set-environment
Arguments
ENVIRONMENTrequiredchoice (staging | production | preview)Flags
--api-base-urltextAPI base URL for the target environment. Required the first time you switch to an environment; reused from config on later switches.
--api-keytextAPI key for the target environment.
--show-keybooleanEcho the API key as typed (useful on Windows terminals).
--no-registerbooleanFail instead of registering a new watcher if none is stored for the target env.
data-hub-watcher config show
data-hub-watcher config validate
data-hub-watcher init
Interactive setup wizard + API registration.
Flags
--show-keybooleanEcho the API key as it is typed/pasted. Useful on Windows terminals where hidden input is unreliable for paste.
data-hub-watcher self-update
Check the server for a newer watcher release and upgrade in place. Designed for unattended use — schedule via Windows Task Scheduler (e.g. weekly) so lab PCs converge on the latest published version without operator intervention.
Flags
--checkbooleanPrint the server-reported target version without performing the upgrade.
--forcebooleanRun the upgrade subprocess even if the local version already matches the target.
data-hub-watcher service
Windows service management.
data-hub-watcher service install
Flags
--env-path FILEfilePath to the .env file. Defaults to ~/.data-hub/.env.<environment>.
data-hub-watcher service reinstall
Flags
--env-path FILEfilePath to the .env file. Defaults to ~/.data-hub/.env.<environment>.
data-hub-watcher service start
data-hub-watcher service status
data-hub-watcher service stop
data-hub-watcher service uninstall
data-hub-watcher state
Inspect or reset the local upload history.
data-hub-watcher state forget
Flags
--prefixrequiredtextFolder under the watch directory to forget, e.g. alice/.
--yesbooleanSkip the confirmation prompt.
data-hub-watcher upload
Upload files to Data Hub (manual trigger). One-shot mode: pass both --file and --run-id to upload a single file. Queue mode: omit both to process the server-side upload queue.
Flags
--file PATHpathSpecific file to upload.
--run-idtextAssociate upload with a specific run.
--dry-runbooleanLog what would be uploaded without uploading.
data-hub-watcher watch
Start watching for new files. If the watcher's registration was deleted on Data Hub, a running watcher stops and exits with code 3, and one that is started refuses to start and exits with code 3 as well. Either way it says to run 'data-hub-watcher init' to register again.
Flags
--dry-runbooleanValidate and log but don't start monitoring.
Interactive setup notes
init and config edit ask for values in the terminal. Those prompts aren’t CLI flags, so they don’t appear in the catalog.
API keys must start with dhub_. The watcher removes zero-width and non-breaking space characters, which some Windows clipboards add to a pasted key. See Install and update the watcher → Configure.
Upload examples
Upload files once, without running the watcher:
data-hub-watcher upload --file /path/to/file.csv --run-id RUN001
data-hub-watcher upload
data-hub-watcher upload --dry-runPass both --file and --run-id to upload one file. Leave out both to work through the server’s upload queue, the way a manual-mode watcher does.
Switching environments
config set-environment can take --api-base-url, --api-key, --show-key, and --no-register, and so can config edit when the environment changes. Switching to a preview deployment needs --api-base-url the first time. See Watcher configuration → Switching environments.
Windows service notes
service commands need Windows and the windows-service install extra. Use --env-path on service install and service reinstall when the service should load a .env file other than the default one. Run as a Windows service has the full details.
Self-update examples
data-hub-watcher self-update
data-hub-watcher self-update --check
data-hub-watcher self-update --forceHow the upgrade works depends on how you installed the watcher. See Install and update the watcher → Manual update.