Skip to content

feat(sandbox): add exclude/mode/quiet sync flags#59

Merged
BhautikChudasama merged 1 commit into
mainfrom
feat/sandbox-sync-flags
Jun 30, 2026
Merged

feat(sandbox): add exclude/mode/quiet sync flags#59
BhautikChudasama merged 1 commit into
mainfrom
feat/sandbox-sync-flags

Conversation

@pratikbin

Copy link
Copy Markdown
Contributor

What

Brings mc mirror-style flags to createos sandbox sync, mapped onto the underlying Mutagen v0.18.1 engine.

Flag Maps to Behavior
--exclude (repeatable) mutagen --ignore= Skip glob patterns, e.g. --exclude '*.log' --exclude node_modules
--mode two-way|one-way|mirror --sync-mode=two-way-safe|one-way-safe|one-way-replica Direction. mirror makes the sandbox identical and deletes extras (mc's mirror + --remove)
--quiet, -q CLI-side Suppress progress; block foreground until Ctrl+C; errors stay on stderr
--no-ignore-vcs overrides hardcoded --ignore-vcs Sync .git etc.

Friendly --mode names hide Mutagen's vocabulary. --mode validated up front (fails before any SSH / Mutagen work). Defaults unchanged: two-way, VCS skipped, progress shown.

Why

Asked for mc-mirror-like ergonomics on sync. Skipped mc flags with no honest Mutagen equivalent: --dry-run, --json, --watch (already always-on), --region/--enc/--max-workers/--older-than.

Docs

  • This repo: README.md updated; CLAUDE.md gains a 'Keeping the Website Docs in Sync' rule.
  • Docs site: separate PR in website-04.

Verify

go build / go vet / golangci-lint v2 (0 issues) / gosec (0 issues) all green. sync --help renders all 4 flags.

Bring mc-mirror-style flags to `sandbox sync`, mapped onto Mutagen:

- --exclude (repeatable) -> mutagen --ignore
- --mode two-way|one-way|mirror -> --sync-mode (mirror deletes extras on the sandbox)
- --quiet/-q -> suppress progress, block until Ctrl+C
- --no-ignore-vcs -> override the hardcoded --ignore-vcs

Defaults unchanged (two-way, VCS skipped, progress shown). Also document
the website-04 docs sync rule in CLAUDE.md.
@pratikbin

Copy link
Copy Markdown
Contributor Author

@BhautikChudasama BhautikChudasama merged commit 3b93fcc into main Jun 30, 2026
1 check passed
@BhautikChudasama BhautikChudasama deleted the feat/sandbox-sync-flags branch June 30, 2026 12:58
pratikbin added a commit that referenced this pull request Jun 30, 2026
Recovers fix commit dropped when #59 squash-merged a stale PR head. parseSyncArgs recovers flags placed after the sandbox positional (urfave/cli v2 limitation); pure mutagenCreateArgs + --quiet output sinks + regression tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants