Files

93 lines
2.9 KiB
Plaintext
Raw Permalink Normal View History

2026-01-17 16:17:24 +02:00
SYNC-PROJECT(1) Project Sync Toolkit SYNC-PROJECT(1)
NAME
sync-project.sh - Sync projects between remote servers and local machine
SYNOPSIS
sync-project.sh [OPTIONS]
DESCRIPTION
Downloads a project from a remote server and optionally generates helper
scripts for ongoing synchronization. Uses tar for initial sync and rsync
for subsequent syncs.
2026-01-17 16:49:25 +02:00
Server project path defaults to ~/public_leo if left empty. Paths starting
with ~ are automatically resolved to full paths via SSH.
New servers are automatically trusted (StrictHostKeyChecking=accept-new).
2026-01-17 16:17:24 +02:00
OPTIONS
-h, --help
Display this help and exit.
--files-only
Quick sync mode. Downloads files only, excluding node_modules and
vendor directories. Does not create helper scripts, sftp.json, or
upload lazygit.
--sftp-only
Setup mode for SFTP workflow. Creates helper scripts but skips
lazygit upload and .gitignore modifications.
2026-01-23 17:37:04 +02:00
--git
Git clone mode. Clones the repository from the remote server using
SSH with password authentication. Uploads lazygit to the server and
marks it as assume-unchanged (both locally and on server). Only
generates ssh.sh helper script.
2026-01-17 16:17:24 +02:00
MODES
Default mode:
2026-01-17 16:49:25 +02:00
- Syncs terminal info (xterm-ghostty or xterm-kitty)
2026-01-17 16:17:24 +02:00
- Downloads all project files
- Creates .vscode/sftp.json
- Generates all helper scripts
- Uploads lazygit to server
- Updates .gitignore
--sftp-only mode:
- Downloads all project files
- Creates .vscode/sftp.json
- Generates: local-remote.sh, remote-local.sh, sftp-watch.sh, ssh.sh
- No lazygit, no .gitignore updates
--files-only mode:
- Downloads project files (excludes node_modules, vendor)
- No helper scripts
- No configuration files
2026-01-23 17:37:04 +02:00
--git mode:
- Clones git repository via SSH with password
- Uploads lazygit to server
- Marks lazygit as assume-unchanged (server + local)
- Generates: ssh.sh only
- No tar archive, no sftp.json, no other scripts
2026-01-17 16:17:24 +02:00
EXAMPLES
Full setup with all scripts:
./sync-project.sh
Quick file sync only:
./sync-project.sh --files-only
SFTP workflow without git tools:
./sync-project.sh --sftp-only
2026-01-23 17:37:04 +02:00
Clone git repository from server:
./sync-project.sh --git
2026-01-17 16:17:24 +02:00
GENERATED SCRIPTS
remote-local.sh Pull files from server
local-remote.sh Push files to server
ssh.sh SSH with --db, --git, --todo flags
sftp-watch.sh Continuous sync with watchexec
watch-build.sh Build and deploy automation
split-conflicts.sh Git conflict resolver
REQUIREMENTS
sshpass, rsync, tar, ssh/scp
Optional: watchexec (for watch scripts)
FILES
.sync-credentials Pre-defined config (optional)
.vscode/sftp.json VS Code SFTP config (generated)