Any Sync 是一个跨工具的双向同步插件,通过 GitHub 在不同设备间同步 VS Code、Claude Code 和 OpenClaw 的技能、记忆和配置文件。
Any Sync provides bidirectional sync between GitHub repositories and local directories. Pull files from any GitHub repo folder to your local workspace, and push changes back directly.
This monorepo contains four packages:
| Package | Path | Description |
|---|---|---|
| VS Code Extension | packages/vscode-extension |
Full-featured VS Code extension with UI, conflict resolution, and status bar |
| Claude Code Plugin | packages/claude-plugin |
Plugin for Claude Code with slash commands and automatic session hooks |
| OpenClaw Plugin | packages/openclaw-plugin |
OpenClaw plugin for syncing workspace (skills, memory, AGENTS.md, etc.) via GitHub |
| CLI | packages/cli |
Core sync engine and CLI (any-sync pull/push/status/reset/auth/init) |
All packages share the same config format (.any-sync.json), lockfile (.any-sync.lock), and core CLI (@any-sync/cli), so you can use any tool interchangeably.
| VS Code Extension | Claude Code Plugin | OpenClaw Plugin | |
|---|---|---|---|
| Install | VS Code Marketplace | /plugin marketplace add imink/any-sync then /plugin install any-sync@any-sync-marketplace |
openclaw plugins install any-sync |
| Prerequisites | VS Code | gh, Node.js, Claude Code v1.0.33+ |
gh, Node.js, OpenClaw |
| Setup | Command Palette → "Any Sync: Init or Edit Config" | /any-sync:start |
/any-sync:start |
| Pull | Command Palette → "Any Sync: Pull" | /any-sync:pull |
/any-sync:pull |
| Push | Command Palette → "Any Sync: Push" | /any-sync:push |
/any-sync:push |
| Status | Status bar indicator | /any-sync:status |
/any-sync:status |
| Reset | Command Palette → "Any Sync: Reset" | /any-sync:reset |
/any-sync:reset |
| Auto-sync | Manual | Session hooks (pull on start, push on end) | Session hooks (pull on start, push on end) |
| Auth | VS Code GitHub sign-in or GITHUB_TOKEN |
gh auth login or GITHUB_TOKEN |
gh auth login or GITHUB_TOKEN |
| Default sync paths | Custom (user-configured) | ~/.claude/ (skills, memory, settings) |
~/.openclaw/workspace/ (skills, memory, AGENTS.md, SOUL.md, etc.) |
| Publish to | VS Code Marketplace | Claude Plugin Marketplace | ClawHub |
- Install from the VS Code Marketplace, or build locally (see Publishing).
- Open a workspace folder.
- Run "Any Sync: Init or Edit Config" from the Command Palette (
Cmd+Shift+P). - Edit your mappings in
.any-sync.json:{ "mappings": [ { "name": "My Skills", "repo": "username/my-repo", "branch": "main", "sourcePath": "src", "destPath": "local/dest", "include": ["**/*.md"], "exclude": ["**/drafts/**"] } ] } - Run "Any Sync: Pull" to sync files.
| Field | Required | Description |
|---|---|---|
name |
Yes | Human-readable name for this mapping |
repo |
Yes | GitHub repo in owner/repo format |
branch |
Branch to sync from/push to (default: main) |
|
sourcePath |
Yes | Path within the repo to sync from |
destPath |
Yes | Local destination (relative to workspace root, or absolute) |
include |
Glob patterns to include (default: all files) | |
exclude |
Glob patterns to exclude |
Use tokens in destPath for cross-device mappings:
| Token | Resolves to |
|---|---|
${copilotMemory} |
VS Code Copilot memory folder on the current OS |
The extension uses VS Code's built-in GitHub authentication. On first run, VS Code will prompt you to sign in. Alternatively, set the GITHUB_TOKEN environment variable for headless/CI scenarios.
| Setting | Default | Description |
|---|---|---|
any-sync.logLevel |
info |
Log verbosity: debug, info, warn, error |
any-sync.syncRepoUrl |
GitHub sync repo URL or owner/repo. When set, all mappings use this repo. |
ghCLI installed and authenticated (gh auth login)- Node.js (v18+)
- A GitHub repo to store synced files
- Claude Code v1.0.33+
# Add the marketplace (one-time)
/plugin marketplace add imink/any-sync
# Install the plugin
/plugin install any-sync@any-sync-marketplace/plugin update any-sync@any-sync-marketplaceRun the guided setup wizard inside Claude Code:
/any-sync:start
This checks your GitHub auth, asks for your sync repo, creates a config with default Claude mappings (skills, memory, settings), and pulls existing files.
| Command | Description |
|---|---|
/any-sync:start |
Guided setup wizard |
/any-sync:pull |
Pull latest files from GitHub |
/any-sync:push |
Push local changes to GitHub |
/any-sync:status |
Show sync state and pending changes |
/any-sync:reset |
Remove config and lockfile |
The plugin includes session hooks:
- Session start — auto-pulls latest files from GitHub
- Session end — auto-pushes any local changes
No manual sync needed for day-to-day use once set up.
ghCLI installed and authenticated (gh auth login)- Node.js (v18+)
- A GitHub repo to store synced files
- OpenClaw installed
openclaw plugins install any-syncOr install locally for development:
openclaw plugins install -l ./packages/openclaw-pluginRun the guided setup wizard:
/any-sync:start
This checks your GitHub auth, asks for your sync repo, and creates a config with default OpenClaw workspace mappings:
| Mapping | Repo path | Local path |
|---|---|---|
workspace-skills |
skills/ |
~/.openclaw/workspace/skills/ |
workspace-memory |
memory/ |
~/.openclaw/workspace/memory/ |
workspace-config |
config/ |
~/.openclaw/workspace/ (AGENTS.md, SOUL.md, USER.md, TOOLS.md, IDENTITY.md) |
If OPENCLAW_PROFILE is set, the workspace path adjusts to ~/.openclaw/workspace-<profile>/.
| Command | Description |
|---|---|
/any-sync:start |
Guided setup wizard |
/any-sync:pull |
Pull latest files from GitHub |
/any-sync:push |
Push local changes to GitHub |
/any-sync:status |
Show sync state and pending changes |
/any-sync:reset |
Remove config and lockfile |
The plugin includes session hooks:
- Session start — auto-pulls latest files from GitHub
- Session end — auto-pushes any local changes
Disable auto-sync by setting autoSync: false in the plugin config.
The plugin is published to ClawHub:
clawhub package publish ./packages/openclaw-plugin \
--name any-sync \
--family code-plugin \
--source-repo imink/any-sync \
--source-commit $(git rev-parse HEAD) \
--source-ref main \
--source-path packages/openclaw-plugin- Bidirectional sync — pull from and push to any GitHub repo directory
- Incremental sync — only downloads changed files using SHA-based tracking
- Conflict resolution — side-by-side diff view when both local and remote have changed (VS Code) or interactive prompt (Claude Code)
- Flexible configuration — sync multiple repos/paths with include/exclude glob patterns
- Cross-tool compatibility — same config and lockfile format works in both VS Code and Claude Code
- 7 commands — pull, push, selective pull/push, init config, reset, show output
- Status bar — real-time sync state indicator (idle/syncing/success/error)
- JSON schema validation — autocomplete and validation for
.any-sync.json - No git required — falls back to GitHub REST API when git is not installed
- Secure auth — uses VS Code's built-in GitHub authentication with
GITHUB_TOKENfallback
- 5 slash commands — start, pull, push, status, reset
- Session hooks — automatic pull on session start, push on session end
- Cross-platform — JavaScript-based, works on Windows, macOS, and Linux
- 5 slash commands — start, pull, push, status, reset
- Session hooks — automatic pull on session start, push on session end
- Profile-aware — respects
OPENCLAW_PROFILEfor multi-profile workspaces - ClawHub published — install with
openclaw plugins install any-sync
All commands below should be run from the monorepo root.
- Create a publisher account on the VS Code Marketplace.
- Generate a Personal Access Token (PAT) from Azure DevOps with the Marketplace > Manage scope.
cd packages/vscode-extension
npx @vscode/vsce login patrickw1029npm run package
# Produces packages/vscode-extension/any-sync-<version>.vsixcd packages/vscode-extension
npx @vscode/vsce publish # publish current version
npx @vscode/vsce publish patch # bump patch and publish (0.1.9 -> 0.1.10)
npx @vscode/vsce publish minor # bump minor and publish (0.1.9 -> 0.2.0)cd packages/vscode-extension
npx @vscode/vsce publish --packagePath any-sync-0.1.9.vsixnpx @vscode/vsce unpublish patrickw1029.any-sync# Install all dependencies
npm install
# Build the VS Code extension
npm run build
# Watch mode
npm run watch
# Run VS Code extension tests
npm run test
# Run all package tests
npm run test:all
# Lint
npm run lintMIT
