
Research
/Security News
npm Malware Campaign Uses Adspect Cloaking to Deliver Malicious Redirects
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.
@quantfive/sync-gdrive
Advanced tools
Module to synchronise a file or directory in Google Drive with the local file system
High-performance Google Drive synchronization library with smart incremental sync, parallel downloads, and beautiful progress bars.
# Install globally
npm install -g sync-gdrive
# Set up authentication
export GOOGLE_CLIENT_EMAIL="your-service-account@project.iam.gserviceaccount.com"
export GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
# Smart incremental sync (resumes perfectly!)
sync-gdrive "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs85j4X_VuSqI" ./downloads
# High-performance sync with progress
sync-gdrive "YOUR_FOLDER_ID" ./downloads --concurrency 20 --verbose
Progress Output:
🔍 Phase 1: Scanning for files...
████████████ | 100% | Scanning | Discovering files and folders...
📥 Phase 2: Downloading files...
████████████ | 67% | 234/350 Files (↓45 ⊘189) | report.pdf | 15.2 files/sec | ETA: 8s
✅ Sync completed successfully!
⏱️ Duration: 23.4 seconds
📊 Files processed: 350
📥 Downloaded: 45 files
⊘ Skipped: 305 files
💡 305 files were up-to-date and skipped. Use --force-download to re-download all files.
// Regular JS
const gdriveSync = require("sync-gdrive");
const keyConfig = {
clientEmail: process.env.GOOGLE_CLIENT_EMAIL,
privateKey: process.env.GOOGLE_PRIVATE_KEY,
};
// Basic usage with smart defaults
await syncGDrive(fileOrFolderId, destFolder, keyConfig);
// High-performance with progress callback
const options = {
concurrency: 15, // 15 parallel downloads
verbose: true, // Detailed logging
progressCallback: (progress) => {
console.log(
`${progress.completedFiles}/${progress.totalFiles} files - ${progress.speed}`
);
},
};
await syncGDrive(fileOrFolderId, destFolder, keyConfig, options);
// TypeScript
import syncGDrive, { IKeyConfig } from "sync-gdrive";
const keyConfig: IKeyConfig = {
clientEmail: process.env.GOOGLE_CLIENT_EMAIL,
privateKey: process.env.GOOGLE_PRIVATE_KEY,
};
await syncGDrive(fileOrFolderId, destFolder, keyConfig, options);
# Download gets interrupted...
sync-gdrive YOUR_FOLDER_ID ./backup
# Downloaded 150/500 files... ^C
# Resume exactly where you left off!
sync-gdrive YOUR_FOLDER_ID ./backup
# ████████████ | 100% | 500/500 Files (↓350 ⊘150) | 🎉 Skipped 150, downloaded 350
# Smart incremental (default) - compares timestamps
sync-gdrive YOUR_FOLDER_ID ./backup
# Force re-download everything
sync-gdrive YOUR_FOLDER_ID ./backup --force-download
# Skip existing files completely
sync-gdrive YOUR_FOLDER_ID ./backup --skip-existing
# Enhanced precision (size + time matching)
sync-gdrive YOUR_FOLDER_ID ./backup --check-size-and-time
--force-download # Re-download all files even if they exist locally
--skip-existing # Skip all files that exist locally (no time check)
--check-size-and-time # Enhanced checking: skip if size AND time match exactly
--concurrency <num> # Number of parallel downloads (default: 10)
--batch-size <num> # Files processed per batch (default: 20)
--sleep-time <ms> # Delay between operations in ms (default: 0)
--docs-type <ext> # Google Docs export format (default: docx)
--sheets-type <ext> # Google Sheets export format (default: xlsx)
--slides-type <ext> # Google Slides export format (default: pptx)
--maps-type <ext> # Google Maps export format (default: kml)
--fallback-type <ext> # Fallback GSuite export format (default: pdf)
--verbose # Enable verbose logging with skip reasons
--no-abort-on-error # Continue on errors instead of stopping
--no-progress # Disable progress bars (for scripts)
--help # Show complete help message
When using as a library, the options parameter supports:
#!/bin/bash
# Smart incremental backup - only downloads changes!
sync-gdrive "YOUR_FOLDER_ID" /backup/gdrive \
--verbose \
--concurrency 15 \
--no-progress
# Force re-download everything after data loss
sync-gdrive "YOUR_FOLDER_ID" ./recovery --force-download --verbose
# Fast sync for development - skip unchanged files
sync-gdrive "YOUR_FOLDER_ID" ./content --concurrency 25 --verbose
Environment Setup:
export GOOGLE_CLIENT_EMAIL="your-service-account@project.iam.gserviceaccount.com"
export GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
Example sync performance:
Initial Sync: 2,456 files in 8m 32s (4.8 files/sec)
Daily Update: 2,456 files in 12s (204.7 files/sec) ← Only 8 files changed!
Force Re-sync: 2,456 files in 3m 45s (10.9 files/sec) ← 20x concurrency
Contributions welcome! Please see issues for current needs.
MIT License - see LICENSE file for details.
Perfect for automated backups, content management systems, development workflows, and any application needing reliable Google Drive synchronization! 🎯
FAQs
Module to synchronise a file or directory in Google Drive with the local file system
We found that @quantfive/sync-gdrive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers 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.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads