
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@dipras/filesyncer
Advanced tools
Real-time file synchronization tool for remote development workflows. Automatically sync your local code to remote servers via SSH.
Real-time file synchronization tool for remote development workflows
FileSyncer is a CLI tool that enables developers to automatically sync files from their local environment to remote servers via SSH. Perfect for development workflows with VPS or remote servers.
.gitignore patterns and custom ignore rulesnpm install -g filesyncer
npm install --save-dev filesyncer
npx filesyncer init
npx filesyncer init
This creates a sync.json file:
{
"source": ".",
"destination": "/var/www/app",
"host": "example.com",
"username": "user",
"port": 22,
"privateKeyPath": "~/.ssh/id_rsa",
"ignorePatterns": ["node_modules/**", "dist/**", ".git/**"],
"useGitTracking": false,
"debounceMs": 1000,
"syncMethod": "rsync",
"excludeFromGitIgnore": true
}
Update sync.json with your server details:
{
"source": ".",
"destination": "/home/youruser/myapp",
"host": "your-server.com",
"username": "youruser",
"port": 22,
"privateKeyPath": "~/.ssh/id_rsa"
}
npx filesyncer watch
Now every time you save a file, it will automatically sync to the server! 🎉
init - Initialize Configurationfilesyncer init
filesyncer init --config custom-sync.json
watch - Start File Watcherfilesyncer watch
filesyncer watch --config custom-sync.json
Watch mode behavior:
deploy - One-Time Full Syncfilesyncer deploy
filesyncer deploy --config custom-sync.json
Deploy mode behavior:
| Option | Type | Default | Description |
|---|---|---|---|
source | string | "." | Source directory (local) |
destination | string | - | Destination path on remote server |
host | string | - | Remote server hostname/IP |
username | string | - | SSH username |
port | number | 22 | SSH port |
privateKeyPath | string | ~/.ssh/id_rsa | Path to SSH private key |
ignorePatterns | string[] | [] | Array of glob patterns to ignore |
useGitTracking | boolean | false | Only sync Git-tracked files |
debounceMs | number | 1000 | Debounce delay (ms) |
syncMethod | string | "rsync" | Transfer method: "rsync" or "scp" |
excludeFromGitIgnore | boolean | true | Automatically exclude files from .gitignore |
deleteRemoteFiles | boolean | false | ⚠️ DANGEROUS: Delete files on remote that don't exist locally |
deleteRemoteFiles WarningDefault: false - By default, FileSyncer will NOT delete any files on your remote server.
Setting deleteRemoteFiles: true is dangerous because:
Only enable this if:
Recommended approach:
{
"deleteRemoteFiles": false, // Keep this false!
"ignorePatterns": [
"uploads/**", // Don't sync server uploads
"storage/**", // Don't sync server storage
"logs/**", // Don't sync server logs
".env" // Don't overwrite server .env
]
}
# Local development
npm run dev
# In another terminal
filesyncer watch
# Edit code → Auto sync → Test on server
{
"source": "./src",
"destination": "/app/src",
"host": "docker-host.local",
"syncMethod": "rsync"
}
Create multiple config files:
filesyncer watch --config sync-staging.json
filesyncer watch --config sync-production.json
chmod 600 ~/.ssh/id_rsa# Test SSH connection manually
ssh -p 22 user@host
# Verify key permissions
chmod 600 ~/.ssh/id_rsa
Install rsync:
# Ubuntu/Debian
sudo apt install rsync
# macOS
brew install rsync
# Or use SCP fallback
"syncMethod": "scp"
.gitignore patternsignorePatterns in configContributions are welcome! Please feel free to submit a Pull Request.
# Clone the repository
git clone https://github.com/dipras/filesyncer.git
cd filesyncer
# Install dependencies
npm install
# Build
npm run build
# Test locally
npm link
filesyncer --help
This project uses GitHub Actions for automated publishing to NPM:
To publish a new version:
# Update version in package.json
npm version patch # or minor, or major
# Push with tags
git push && git push --tags
# GitHub Actions will automatically publish to NPM
Setup Required (one-time):
NPM_TOKEN secret in your GitHub repository settingsMIT © Dipras
FileSyncer was created to solve development workflow challenges:
If you find this useful, please consider giving it a star ⭐
Made with ❤️ for developers who love productivity
FAQs
Real-time file synchronization tool for remote development workflows. Automatically sync your local code to remote servers via SSH.
We found that @dipras/filesyncer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.