Initial commit: converge - auto-sync git repo watcher

This commit is contained in:
2026-05-11 09:40:25 -04:00
commit bf3329e5ce
12 changed files with 393 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
# Converge
Auto-sync a git repository 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
```bash
# Watch the current directory (defaults)
./scripts/run
# Watch a specific repo
./scripts/run -- --repo /path/to/repo --branch master
# Custom debounce (10 seconds)
./scripts/run -- --debounce 10000
```
### Options
| Option | Default | Description |
|--------|---------|-------------|
| `-r`, `--repo PATH` | `.` (cwd) | Path to the git repository |
| `-d`, `--debounce MS` | `5000` | Debounce window in milliseconds |
| `--remote NAME` | `origin` | Remote name to pull from |
| `-b`, `--branch NAME` | `main` | Branch to pull |
## Development
All development tools run inside Docker via the `hs` wrapper script.
```bash
# 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](https://hackage.haskell.org/package/fsnotify)
- **Notifications**: shell out to `notify-send` (libnotify)
- **Daemonization**: TBD (likely systemd service)