⚙️ Options
Sync-specific configuration options
See Configuration for the complete configuration system (hierarchy, file discovery, merging).
Repository Configuration
Repository URL
Specify the repository to sync from.
sync:
repo: "https://github.com/org/team-hooks"export GUARDY_SYNC_REPO="https://github.com/org/team-hooks"guardy sync --repo https://github.com/org/team-hooksVersion
Specific tag, branch, or commit to sync from.
sync:
version: "main"export GUARDY_SYNC_VERSION="main"guardy sync --version mainSource Path
Directory in remote repository to sync from.
sync:
source_path: "hooks"export GUARDY_SYNC_SOURCE_PATH="hooks"guardy sync --source-path hooksDestination Path
Local directory to sync files to.
sync:
dest_path: ".git/hooks"export GUARDY_SYNC_DEST_PATH=".git/hooks"guardy sync --dest-path .git/hooksFile Filtering
Include Patterns
Patterns for files to include in sync.
sync:
include:
- "pre-commit"
- "commit-msg"guardy sync --include "pre-commit,commit-msg"Exclude Patterns
Patterns for files to skip during sync.
sync:
exclude:
- "*.bak"
- "*.tmp"guardy sync --exclude "*.bak,*.tmp"Sync Behavior
Force Update
Bypass interactive mode and force update.
Default: false
sync:
force: trueexport GUARDY_SYNC_FORCE=trueguardy sync --forceAuto Update
Automatically update without confirmation.
Default: false
sync:
auto_update: trueexport GUARDY_SYNC_AUTO_UPDATE=trueInteractive Mode
Prompt before updating files.
Default: true
sync:
interactive: trueexport GUARDY_SYNC_INTERACTIVE=trueShow Diff
Display diffs before updating.
Default: true
sync:
show_diff: trueexport GUARDY_SYNC_SHOW_DIFF=trueDiff Context Lines
Number of context lines in diffs.
Default: 3
sync:
diff_context_lines: 3export GUARDY_SYNC_DIFF_CONTEXT=3Advanced Options
Git Timeout
Git operation timeout in seconds.
Default: 30
sync:
git_timeout_seconds: 60export GUARDY_SYNC_GIT_TIMEOUT=60Cache Directory
Cache directory path.
Default: .guardy/cache
sync:
cache_dir: ".guardy/cache"export GUARDY_SYNC_CACHE_DIR=".guardy/cache"Multi-Repository Configuration
For syncing multiple repositories, use the repolist configuration (config file only).
sync:
# Global settings apply to all repos
interactive: true
show_diff: true
git_timeout_seconds: 60
# Multiple repository configurations
repolist:
- name: "team-hooks"
repo: "https://github.com/org/team-hooks"
version: "main"
source_path: "hooks"
dest_path: ".git/hooks"
include:
- "pre-commit"
- "commit-msg"
protected: true
- name: "shared-config"
repo: "https://github.com/org/shared-config"
version: "v2.1.0"
source_path: "."
dest_path: ".guardy/shared"
exclude:
- "*.draft.*"Repository Config Fields
| Field | Description | Required |
|---|---|---|
name | Unique identifier for this repository | ✓ |
repo | Repository URL (HTTPS or SSH) | ✓ |
version | Tag, branch, or commit to sync | ✓ |
source_path | Directory in remote repo to sync from | ✓ |
dest_path | Local directory to sync files to | ✓ |
include | Patterns for files to include | ✗ |
exclude | Patterns for files to skip | ✗ |
protected | Make synced files read-only | ✗ |
Complete Example
sync:
# Single repository mode
repo: "https://github.com/org/guardy-config"
version: "main"
source_path: "config/shared"
dest_path: ".guardy"
# File filtering
include:
- "*.yml"
- "hooks/**"
exclude:
- "*.local.*"
# Behavior
interactive: true
show_diff: true
auto_update: false
force: false
# Advanced
git_timeout_seconds: 30
diff_context_lines: 3
cache_dir: ".guardy/cache"