Automated monitoring and updating system for the Augment VS Code extension in Cursor and VS Code.
This script now supports both Cursor and VS Code! It will automatically:
- Detect which IDEs you have installed
- Check for the Augment extension in all available IDEs
- Install updates in your preferred IDE (or all IDEs if configured)
- Work seamlessly whether you use Cursor, VS Code, or both
- π Automatic Version Detection - Monitors VS Code Marketplace for new releases
- π€ Human-in-the-Loop - Always prompts for user approval before updating
- π¦ Automated Download - Downloads VSIX files from marketplace with retry logic
- β‘ Multi-IDE Support - Works with Cursor and VS Code automatically
- π§ Smart Detection - Automatically finds your installed IDEs and latest versions
- π¦ Flexible Installation - Install in one IDE or all available IDEs
- β Robust Verification - Multiple retry attempts with intelligent version matching
- π§Ή Auto Cleanup - Removes temporary VSIX files after installation
- π Cron Scheduling - Runs automatically in background
- π‘οΈ Error Recovery - Graceful failure handling with actionable user guidance
- π Retry Mechanisms - Automatic retries for downloads and verification
- π Comprehensive Testing - Full test suite for error handling and edge cases
npm installIf you want to run this on another Mac (like a Mac mini):
# Clone the repository
git clone https://github.com/bcharleson/augment-code-auto-updater.git
cd augment-code-auto-updater
# Install dependencies
npm install
# Test the setup
npm test
# Set up automatic updates
npm run install-cronRequirements on the new computer:
- Node.js (version 14 or higher)
- Cursor or VS Code with CLI available (or both!)
- Git (for cloning)
# Test which IDEs are detected on your system
npm run test-ideThis will show you which IDEs (Cursor/VS Code) are available and if the Augment extension is installed in any of them.
# Test the script without making any changes (dry run)
npm testThis will:
- Check your current Augment extension version
- Fetch the latest version from the marketplace
- Show you if an update is available
- Simulate the entire update process without actually making changes
Example Output:
[2025-07-24T17:56:45.704Z] INFO: Starting Augment extension update check...
[2025-07-24T17:56:45.902Z] INFO: Current version: 0.511.0
[2025-07-24T17:56:46.093Z] INFO: Latest version: 0.513.0
π Augment Extension Update Available!
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Current version: 0.511.0
Latest version: 0.513.0
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Would you like to download and install this update? (y/N): y
[2025-07-24T17:56:54.717Z] SUCCESS: User approved update
[2025-07-24T17:56:54.718Z] WARNING: DRY RUN: Would download VSIX file
[2025-07-24T17:56:54.718Z] WARNING: DRY RUN: Would install extension
[2025-07-24T17:56:54.718Z] WARNING: DRY RUN: Would verify installation
β
Update completed successfully!
# Check for updates and install if approved
npm startHere are the main commands you can use:
| Command | What it does |
|---|---|
npm run test-ide |
Test which IDEs are detected and if Augment is installed |
npm run test-error-handling |
Run comprehensive error handling tests |
npm run test-all |
Run all test suites (error handling, IDE detection, compatibility) |
npm test |
Test the script without making changes (safe to run) |
npm start |
Run the actual update process |
npm run install-cron |
Install automatic updates on macOS/Linux |
npm run install-task |
Install automatic updates on Windows |
npm run uninstall-task |
Remove automatic updates on Windows |
For most users: Start with npm test to see if updates are available, then use npm start to actually install them.
If you want to stop automatic updates:
# Stop installation while it's running
Ctrl+C
# Remove the cron job after installation
crontab -l | grep -v "augment-code-auto-updater" | crontab -
# Or edit cron jobs manually
crontab -eβ Good news! Cron jobs are persistent and will continue working after restart:
- The cron job remains installed and active
- It will continue checking for updates every 6 hours
- All settings and schedules are preserved
- The script will run automatically in the background
# Edit cron jobs
crontab -e
# Add # at the beginning of the line to comment it out:
# 0 */6 * * * /path/to/augment-code-auto-updater/index.js
# To re-enable, just remove the ## Check if cron job is still there
crontab -l
# Check recent logs
tail -f logs/cron.log
# Test manually to make sure everything works
npm test# Install cron job (runs every 6 hours)
chmod +x install-cron.sh
./install-cron.sh# Test the installation (WhatIf mode - no changes made)
npm run test-task
# Install Windows scheduled task (automatically requests UAC elevation)
npm run install-task
# Alternative schedules:
npm run install-task-work # Daily during work days at 9 AM
npm run install-task-daily # Daily at 9 AM
# Check task status
npm run task-status
# Uninstall task (automatically requests UAC elevation)
npm run uninstall-taskNote: The Windows scripts will automatically prompt for Administrator privileges via UAC when needed. Simply click "Yes" when prompted.
# Check for updates and prompt for installation
node index.js
# Dry run (test without making changes)
node index.js --dry-runThe cron job will automatically:
- Check for new Augment extension versions every 6 hours
- Compare with your currently installed version
- If newer version found, prompt you via CLI
- Upon approval: download β install β verify β cleanup
When a new version is detected:
π Augment Extension Update Available!
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Current version: 0.511.0
Latest version: 0.512.0
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Would you like to download and install this update? (y/N):
If you choose Yes:
- ⬬ Downloads VSIX file (e.g.,
augment.vscode-augment-0.512.0.vsix) - π§ Installs via
cursor --install-extension - β Verifies installation by checking version
- ποΈ Deletes temporary VSIX file
- π Shows success confirmation
Edit config.json to customize behavior:
{
"checkInterval": "0 */6 * * *", // Every 6 hours
"autoDownload": false, // Always prompt first
"logLevel": "info",
"maxRetries": 3
}"0 */6 * * *"- Every 6 hours (default)"0 9-17/2 * * 1-5"- Every 2 hours during work days"0 9 * * *"- Daily at 9 AM"0 */3 * * *"- Every 3 hours
View monitoring activity:
# View recent activity
tail -f logs/cron.log
# View all logs
cat logs/cron.logcrontab -lcrontab -l | grep -v '/path/to/augment-code-auto-updater/index.js' | crontab -# Check if Cursor CLI works
cursor --list-extensions --show-versions
# Test marketplace API
curl -X POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery-
"command not found: cursor"
- Ensure Cursor is installed and CLI is available in PATH
-
"Extension not found"
- Check if Augment extension is installed in Cursor
- Run:
cursor --list-extensions
-
"Download failed"
- The script will automatically retry 3 times with exponential backoff
- Check internet connection
- Verify VS Code Marketplace is accessible
- If all retries fail, the VSIX file location will be provided for manual download
-
"Installation failed"
- Ensure Cursor is not running during installation
- Check file permissions in temp directory
-
"Version verification failed"
- The script now retries verification 3 times with increasing delays
- If verification fails, the VSIX file is kept for manual installation
- Try restarting your IDE and checking if the extension is working
- Use the provided manual installation command if needed
-
"Multiple versions detected"
- The script automatically selects the latest version
- Old extension folders can be safely removed manually if desired
-
"Verification failed" but installation succeeded
- The script will keep the VSIX file for manual verification
- Restart your IDE and check if the extension is working
- The script provides step-by-step recovery instructions
- Multiple versions may exist - the script automatically uses the latest
-
Version mismatch errors
- The script now handles version suffixes (like "-universal") automatically
- Multiple verification attempts with increasing delays
- If verification fails, follow the on-screen instructions to restart your IDE
-
"Execution Policy" errors
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Or use the npm scripts which bypass execution policy
- Run:
-
"Access Denied" when creating scheduled task
- Run PowerShell as Administrator
- Use:
npm run install-task(requires admin PowerShell)
-
Task not running automatically
- Check task status:
npm run task-status - Verify task settings:
Get-ScheduledTask -TaskName "AugmentMonitor" | Get-ScheduledTaskInfo - Check Windows Event Viewer for task scheduler errors
- Check task status:
augment-code-auto-updater/
βββ index.js # Main monitoring script
βββ package.json # Dependencies and scripts
βββ config.json # Configuration settings
βββ install-cron.sh # Cron job setup script
βββ temp/ # Temporary VSIX downloads (auto-created)
βββ logs/ # Log files (auto-created)
βββ README.md # This file
- Script only downloads from official VS Code Marketplace
- Always prompts before making changes
- Temporary files are cleaned up immediately after use
- No sensitive data is stored or transmitted
The script can be easily modified to monitor other extensions by changing:
extensionIdin the constructorpublisherIdandextensionNamefor download URLs
For issues or questions:
- Check the logs:
tail -f logs/cron.log - Test manually:
npm test - Verify Cursor CLI:
cursor --help