Skip to main content

Pair command plugin for mng - continuous file sync between agent and local directory

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

mng-pair

Continuous file synchronization between an agent and your local directory.

A plugin for mng that adds the mng pair command. Launch with mng pair <agent>.

Overview

mng pair watches for file changes on both sides and syncs them in real-time using unison. If both directories are git repositories, the command first synchronizes git state (branches and commits) before starting continuous file sync.

This is useful for iterative workflows where you want to edit alongside an agent, reviewing and modifying its work as it happens.

Requirements

  • unison (file synchronization tool)
    • macOS: brew install unison and brew install autozimu/formulas/unison-fsmonitor
    • Linux: sudo apt-get install unison (inotify provides file watching)

Usage

# Basic pairing with an agent
mng pair my-agent

# Pair to a specific local directory
mng pair my-agent --target ./local-dir

# One-way sync (agent to local only)
mng pair my-agent --sync-direction=forward

# One-way sync (local to agent only)
mng pair my-agent --sync-direction=reverse

# Prefer source files on conflicts
mng pair my-agent --conflict=source

# Filter to specific files
mng pair my-agent --include "*.py" --exclude "__pycache__/*"

# Pair a subdirectory of the agent
mng pair my-agent:/subdir --target ./local-dir

# Skip the git requirement
mng pair my-agent --no-require-git

Options

Sync behavior

  • --sync-direction MODE -- both (bidirectional, default), forward (agent to local), reverse (local to agent)
  • --conflict MODE -- Conflict resolution for bidirectional sync: newer (most recent mtime, default), source, target
  • --include PATTERN / --exclude PATTERN -- Glob patterns for selective sync (repeatable). .git is always excluded.

Git handling

  • --require-git / --no-require-git -- Require both sides to be git repos (default: enabled)
  • --uncommitted-changes MODE -- How to handle uncommitted changes during initial git sync: stash, clobber, merge, fail (default)

Press Ctrl+C to stop the sync.

Limitations

  • Only local agents are supported (remote agents not yet implemented)
  • Clock skew between machines can affect the newer conflict mode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mng_pair-0.1.3.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mng_pair-0.1.3-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file mng_pair-0.1.3.tar.gz.

File metadata

  • Download URL: mng_pair-0.1.3.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mng_pair-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5a4fb3bd500a94cb5a3b71ee13bc943af0a0d1529f22678e8e035cffd9d0febc
MD5 cad30cf03618db6f5d8c433a29286b85
BLAKE2b-256 60f20e5595c96beda6973b340eb29b5e26497d6f6ea36d412add93500f975623

See more details on using hashes here.

Provenance

The following attestation bundles were made for mng_pair-0.1.3.tar.gz:

Publisher: publish.yml on imbue-ai/mng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mng_pair-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mng_pair-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mng_pair-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f36cc2a28becf4c531dccaec3db81358ec663c7d278a401a2a43fcec82fbe040
MD5 fef07ead8b1a35cbd9d3f6777a4c3a67
BLAKE2b-256 fa434122f42c31208e4f0d28e33b938758fa116fdf9a81005238fc7ac36011c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mng_pair-0.1.3-py3-none-any.whl:

Publisher: publish.yml on imbue-ai/mng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page