mise bootstrap dotfiles watch
- Usage:
mise bootstrap dotfiles watch [--once] [-J --json] - Effect: modifies state
- Source code:
src/cli/dotfiles/watch.rs
Save tracked files as they change
Runs in the foreground: installs filesystem watches for every autosaved tracked entry, saves a checkpoint once a changed file has been quiet for history.watch.debounce (a file that keeps changing never delays the others; history.watch.max_interval saves it regardless), and reconciles the whole set at startup, every history.watch.reconcile, and when the configuration changes. Manual-save entries are never watched.
With a connected setup repository the watcher also synchronizes per settings.history.sync: in sync mode it publishes within history.sync_interval after a save, fetches every history.fetch_interval, and applies incoming changes once the complete setup is conflict-free; in fetch-only mode it only fetches; in manual mode it does nothing on the network. A failed sync backs off and is retried while saving continues. --once runs one reconcile and one such synchronization.
The history-watch built-in service runs this for you:
[bootstrap.services.mise-history]
builtin = "history-watch"Exit codes: 0 when history is disabled or another watcher already runs; 1 when git is unusable, the store cannot open, or no watch can be installed. A capture that fails is retried with backoff and never drops the pending changes; one that would overlap another history operation is deferred.
Flags
--once— Reconcile and synchronize once and exit (for timers and cron)-J --json— One JSON object per line instead of log lines-h --help— Print help
Examples:
mise bootstrap dotfiles watch
mise bootstrap dotfiles watch --once # one reconcile, for a timer
mise bootstrap dotfiles watch --json