Files
converge/README.md
T
jbrechtel eb77e7c0e6 Support multiple repositories per execution
- Add RepoConfig type for per-repo path/remote/branch
- Options now holds [RepoConfig] instead of single repo
- YAML config file support (--config) for multi-repo setup
- --repo still works for quick single-repo usage
- Concurrent watchers via async (one thread per repo)
- --debounce flag overrides config file value
2026-05-11 09:48:26 -04:00

2.0 KiB

Converge

Auto-sync one or more git repositories by watching for file changes, automatically committing them, and pulling from a remote.

Converge notifies the user via libnotify / notify-send whenever a merge conflict occurs during automatic pulling.

Usage

Single repository

# Watch the current directory (defaults)
./scripts/run

# Watch a specific repo
./scripts/run -- --repo /path/to/repo --branch master --debounce 10000

Multiple repositories (config file)

# Create a config file
cp converge.example.yaml converge.yaml
# Edit to list your repos
vim converge.yaml

# Run with config
./scripts/run -- --config converge.yaml

Options

Option Default Description
-c, --config FILE Path to YAML config file listing repositories
-r, --repo PATH . (cwd) Path to a single git repository
-d, --debounce MS 5000 Debounce window in milliseconds (overrides config)
--remote NAME origin Remote name (single-repo mode)
-b, --branch NAME main Branch to pull (single-repo mode)

Config file format

repos:
  - path: /absolute/or/relative/path
    remote: origin    # optional, defaults to "origin"
    branch: main      # optional, defaults to "main"
  - path: /another/repo

debounce_ms: 5000     # optional, defaults to 5000

Development

All development tools run inside Docker via the hs wrapper script.

# Build (format + compile)
./scripts/build

# Run tests
./scripts/test

# Run the tool
./scripts/run

# Install to ~/.local/bin
./scripts/install

Design

  • Language: Haskell (GHC 9.10.3 via lts-24.38)
  • File watching: fsnotify
  • Concurrency: one watcher thread per repository via async
  • Notifications: shell out to notify-send (libnotify)
  • Configuration: YAML config file for multi-repo, CLI flags for single-repo
  • Daemonization: TBD (likely systemd service)