Pull

Pull latest files from GitHub sync repo

imink 4830ea9 1.1 KB Updated

File contents

Pull from GitHub

Pull the latest files from the configured GitHub sync repo.

Steps

1. Find Config

Look for config at $HOME/.any-sync.json first, then .any-sync.json in the current directory. If neither exists, tell the user to run /any-sync:start first.

2. Run Pull

npx @any-sync/cli pull "<config-path>" ".any-sync.lock"

3. Report Results

Parse the JSON output and report:

  • Pulled: List each file that was downloaded
  • Conflicts: List each file where both local and remote changed
  • Skipped: Count of unchanged files

4. Resolve Conflicts

If there are conflicts, for each conflicted file ask the user:

  • Keep local — skip this file (local changes preserved)
  • Take remote — download the remote version (local changes overwritten)
  • Skip — do nothing for now

If the user chooses "Take remote" for a conflict, download that specific file by running pull again after clearing the lockfile entry for that file. Alternatively, you can manually download the blob and update the lockfile.

imink/any-sync/tree/main/packages/claude-plugin/skills/pull commit 4830ea9906

Frequently asked questions

npx skillmds@latest add imink/pull