Data Hub

Watcher CLI

Every data-hub-watcher command, subcommand, and flag in one place: init, watch, upload, config, service, and self-update.

ForLab operators

Flags and subcommands for data-hub-watcher, generated from the Click CLI in the watcher package. For task walkthroughs see Install and update the watcher, Run as a Windows service, and Roll out watcher releases.

Command reference

The catalog below lists every command, argument, and option from the installed CLI help text.

Global flags

These options apply to every data-hub-watcher command (watcher 0.5.0).

Flags

--config PATHDATA_HUB_CONFIG_PATH
path

Override config file path.

--verbose
boolean

Enable debug logging.

--version
boolean

Show the version and exit.

data-hub-watcher config

View and manage the watcher config file.

data-hub-watcher config edit

Re-prompt each config field with current values as defaults.

data-hub-watcher config open

Open the config file in your editor, then re-validate.

Flags

--editor
text

Editor command (e.g. --editor code).

data-hub-watcher config path

Print the resolved config file path.

data-hub-watcher config set-environment

Switch the watcher to a different API environment.

Arguments

ENVIRONMENTrequired
choice (staging | production | preview)

Flags

--api-base-url
text

API base URL for the target environment. Required the first time you switch to an environment; reused from config on later switches.

--api-key
text

API key for the target environment.

--show-key
boolean

Echo the API key as typed (useful on Windows terminals).

--no-register
boolean

Fail instead of registering a new watcher if none is stored for the target env.

data-hub-watcher config show

Pretty-print the current config.

data-hub-watcher config validate

Validate the config file (offline, no network calls).

data-hub-watcher init

Interactive setup wizard + API registration.

Flags

--show-key
boolean

Echo 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

--check
boolean

Print the server-reported target version without performing the upgrade.

--force
boolean

Run the upgrade subprocess even if the local version already matches the target.

data-hub-watcher service

Windows service management.

data-hub-watcher service install

Install the watcher as a Windows service.

Flags

--env-path FILE
file

Path to the .env file. Defaults to ~/.data-hub/.env.<environment>.

data-hub-watcher service reinstall

Stop, uninstall, install, and start the watcher Windows service. Useful after upgrading the watcher wheel from an Administrator shell so the SCM picks up the new ``data_hub_watcher.service`` entrypoint without needing four separate ``service`` invocations.

Flags

--env-path FILE
file

Path to the .env file. Defaults to ~/.data-hub/.env.<environment>.

data-hub-watcher service start

Start the watcher Windows service.

data-hub-watcher service status

Show the watcher Windows service status.

data-hub-watcher service stop

Stop the watcher Windows service.

data-hub-watcher service uninstall

Uninstall the watcher Windows service.

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 PATH
path

Specific file to upload.

--run-id
text

Associate upload with a specific run.

--dry-run
boolean

Log what would be uploaded without uploading.

data-hub-watcher watch

Start watching for new files.

Flags

--dry-run
boolean

Validate and log but don't start monitoring.

Interactive setup notes

init and config edit prompt for values in the terminal. Those prompts are not CLI flags, so they do not appear in the catalog.

Keys must start with dhub_. The watcher strips zero-width and non-breaking-space characters that some Windows clipboards inject. See Install and update the watcher → Configure.

Upload examples

One-shot upload outside the watch loop:

data-hub-watcher upload --file /path/to/file.csv --run-id RUN001
data-hub-watcher upload
data-hub-watcher upload --dry-run

Pass both --file and --run-id, or omit both to process the server-side queue in manual mode.

Switching environments

config set-environment (and config edit when the environment changes) can take --api-base-url, --api-key, --show-key, and --no-register. Preview switches require --api-base-url the first time. See Watcher configuration → Switching environments.

Windows service notes

service commands require Windows and the windows-service install extra. Use --env-path on service install and service reinstall when the service should load a non-default .env file. Full details are in Run as a Windows service.

Self-update examples

data-hub-watcher self-update
data-hub-watcher self-update --check
data-hub-watcher self-update --force

Upgrade behavior depends on how you installed the watcher. See Install and update the watcher → Manual update.

On this page