Skip to content

mise dotfiles watch ​

Save tracked files as they change

Runs in the foreground and saves a checkpoint once a changed file has been quiet for history.watch.debounce. A file that keeps changing does not delay the others and is still saved every history.watch.max_interval. The watcher also rescans every tracked path at startup, every history.watch.reconcile, and when the configuration changes. Entries tracked with --no-autosave are not watched.

With an origin connected, the watcher also syncs according to the history.sync setting. In sync mode it pushes within history.sync_interval of a save, fetches every history.fetch_interval, and applies incoming changes when there are no conflicts. In fetch-only mode it only fetches; in manual mode it does not use the network. A failed sync is retried with backoff while saving continues. --once runs one rescan and one sync, then exits.

The built-in history-watch service runs this for you:

[bootstrap.services.mise-history]
builtin = "history-watch"

Exits 0 when history is disabled or another watcher is already running, and 1 when Git is unusable, the store cannot be opened, or no watch can be installed. A failed save is retried with backoff and never drops the pending changes, and a save that would overlap another history operation is deferred. With --once, nothing is retried: a save that fails or is deferred, or a sync that fails, exits 1.

Flags ​

  • --once — Rescan and sync once, then exit (for timers and cron)
  • -J --json — Print one JSON object per line instead of log lines
  • -h --help — Print help

Examples ​

Watch and save until stopped

mise dot watch

Rescan and sync once, for a timer

mise dot watch --once

Print JSON lines instead of log lines

mise dot watch --json
MIT LicenseCopyright © 2026jdx.dev