Skip to content

feat: automated periodic sync via shell profile hook or cron #343

@christso

Description

@christso

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:

  1. Shell profile hook — appends a snippet to .bashrc/.zshrc/PowerShell profile that runs allagents update silently, debounced to once per day
  2. Cron/scheduled task — registers a cron job (Linux/macOS) or scheduled task (Windows) for periodic sync
  3. 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 new sync-hook.ts or extend workspace.ts
  • The sync entry point is syncWorkspace() in src/core/sync.ts
  • Shell profile snippet should: check last-run timestamp, skip if <24h, run allagents update --silent in background, update timestamp
  • Consider a --interval flag (default 24h) for configurable debounce
  • Cron approach: crontab -e on Linux/macOS, schtasks on Windows
  • Profile approach: append a guarded block (with start/end markers for clean removal) to shell rc file

Acceptance Criteria

  • allagents sync install-hook --profile appends auto-sync snippet to the user's shell profile (.bashrc, .zshrc, or PowerShell $PROFILE)
  • Snippet runs allagents update silently in background, debounced to once per configured interval
  • allagents sync install-hook --cron registers a cron job (Linux/macOS) or scheduled task (Windows)
  • allagents sync uninstall-hook cleanly 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions