-
Notifications
You must be signed in to change notification settings - Fork 1
feat: automated periodic sync via shell profile hook or cron #343
Copy link
Copy link
Open
Description
Summary
AllAgents currently requires manual allagents update to sync plugins and skills. Teams like WiseTech Global have built their own sync scripts that auto-run once per day via shell profile hooks or scheduled tasks.
Motivation
Research into WiseTechGlobal/Tools.WtgCopilotSkills showed they built install-skill-sync-profile.ps1 (runs on shell open, once/day) and install-skill-sync-scheduled-task.ps1 (Windows Task Scheduler). This removes friction — developers never need to remember to sync.
Proposed Solution
Add a command like allagents sync install-hook that:
- Shell profile hook — appends a snippet to
.bashrc/.zshrc/PowerShell profile that runsallagents updatesilently, debounced to once per day - Cron/scheduled task — registers a cron job (Linux/macOS) or scheduled task (Windows) for periodic sync
- State tracking — stores last-run timestamp (e.g.,
~/.allagents/last-sync) to avoid redundant runs
Should include allagents sync uninstall-hook to cleanly remove.
Implementation Notes
- CLI commands are in
src/cli/commands/— add a newsync-hook.tsor extendworkspace.ts - The sync entry point is
syncWorkspace()insrc/core/sync.ts - Shell profile snippet should: check last-run timestamp, skip if <24h, run
allagents update --silentin background, update timestamp - Consider a
--intervalflag (default24h) for configurable debounce - Cron approach:
crontab -eon Linux/macOS,schtaskson Windows - Profile approach: append a guarded block (with start/end markers for clean removal) to shell rc file
Acceptance Criteria
-
allagents sync install-hook --profileappends auto-sync snippet to the user's shell profile (.bashrc,.zshrc, or PowerShell$PROFILE) - Snippet runs
allagents updatesilently in background, debounced to once per configured interval -
allagents sync install-hook --cronregisters a cron job (Linux/macOS) or scheduled task (Windows) -
allagents sync uninstall-hookcleanly removes the hook (profile snippet or cron entry) - Idempotent — running install-hook twice doesn't duplicate the snippet/cron
- Last-run state stored in
~/.allagents/last-sync(or similar) - Works on macOS, Linux, and Windows
Context
From analysis of enterprise adoption patterns — reducing sync friction is a key driver for team adoption.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog