Skip to content

Syncing

aegis sync fetches the latest rules from Aegis and updates the files on your computer.

aegis sync

It updates:

  • the files in your home folder, such as ~/.claude/CLAUDE.md, if you've let Aegis manage your machine
  • the current repository's files, if you run it in a repository you've set up with aegis init

Each file it adds, updates or removes is listed:

✓ Updated /home/sam/code/payments-api/CLAUDE.md
✓ Added /home/sam/code/payments-api/.claude/agents/reviewer.md
✓ Removed /home/sam/code/payments-api/.claude/skills/old-migration/SKILL.md

Files that haven't changed aren't listed. If nothing changed, sync says No files changed.

If any delivered files in the repository are still committed to git, a sync you run yourself asks whether to stop tracking them, as aegis init does. The plugin's automatic sync never asks.

You rarely need to run it

The Claude Code plugin runs aegis sync for you before Claude Code reads each message you send. See the session hook.

Run it yourself when you know something changed and want it straight away, for example after an administrator tells you a rule was updated.

When a rule is removed

If an administrator removes something you used to receive, such as a skill, sync deletes it from your computer. It only deletes files Aegis wrote.

To keep files Aegis no longer sends, add --no-prune.

If you edited a delivered file

If you've changed a delivered file since Aegis wrote it, sync leaves your version alone and says so:

! skipped CLAUDE.md (edited since Aegis delivered it)

That file gets no more updates until you decide what to do. Whichever you choose, finish with aegis sync --force, which replaces your edited files with Aegis's current versions:

  • To keep your change for everyone, ask an administrator to make the same change in Aegis, then run aegis sync --force once it's there.
  • To throw your change away, run aegis sync --force now.

aegis doctor lists every file in this state.

Options

Option Effect
--dry-run Show what would be written, and change nothing
--force Overwrite files you've edited, discarding your changes
--no-prune Keep files Aegis no longer sends instead of deleting them
--throttle 5m Do nothing if a sync already ran in the last five minutes
--output <path> Write your home-folder instructions to a different file