agentsync
Version:
The missing infrastructure layer for AI coding agent configuration management
238 lines (169 loc) ⢠7.77 kB
Markdown
# AgentSync
[](https://www.npmjs.com/package/agentsync)
[](https://github.com/baranovxyz/agentsync/actions/workflows/test-with-bats.yml)
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org)
> **Stop copying configs between AI coding tools. Sync them all with one command.**
## š« The Problem
Are you tired of:
- Copying `.cursor/rules` to `.claude/` every time you update coding standards?
- Maintaining separate configs for Cursor, Claude, Cline, and Roocode?
- Team members using outdated AI agent configurations?
- No way to share MCP servers across different tools?
**You're losing 30+ minutes per week on manual config management.**
## ⨠The Solution
AgentSync is the infrastructure layer that keeps all your AI coding tools in perfect sync.
```bash
# Before: Manual chaos š°
cp ~/.cursor/rules/* ~/.claude/rules/
cp ~/.cursor/rules/* ./.clinerules/
# Oops, forgot Roocode... and wait, .mdc needs to be .md...
# After: One command, everything synced ā
agentsync sync
ā Synced to Cursor, Claude, Cline, Roocode
```
## š What You Get
### For Individual Developers
- **Never copy config files again** ā One source of truth for all AI tools
- **Tool flexibility** ā Switch between Cursor, Claude, Cline seamlessly
- **Smart format conversion** ā Automatically handles .mdc ā .md conversions
- **MCP server management** ā Share context servers across all tools
### For Teams
- **Instant standardization** ā Push coding standards to entire team at once
- **GitHub-based presets** ā Share rules via `github:company/standards`
- **No more drift** ā Everyone uses the same prompts and commands
- **Security by default** ā Built-in secret scanning prevents API key leaks
### For Organizations
- **Compliance ready** ā Audit logs for all configuration changes
- **Preset composition** ā Layer company, team, and project standards
- **Tool agnostic** ā Works with whatever AI tools your teams prefer
- **Progressive adoption** ā Teams can migrate at their own pace
## š Before vs After
| Task | Before AgentSync | With AgentSync |
| --------------------------- | --------------------------------- | ------------------------------------- |
| Update coding standards | Edit 4+ config files manually ā | Edit once, run `agentsync sync` ā
|
| Share team prompts | Copy/paste in Slack ā | `extends: ["github:team/prompts"]` ā
|
| New team member setup | 20 minutes of copying files ā | `agentsync init` - 30 seconds ā
|
| Add MCP server to all tools | Configure each tool separately ā | Add to `mcpServers`, sync once ā
|
| Switch between AI tools | Recreate all configurations ā | Already synced automatically ā
|
## ā” Quick Start
### Install (30 seconds)
```bash
npm install -g agentsync
# or
pnpm add -g agentsync
```
### Set Up (2 minutes)
```bash
# Initialize in your project
agentsync init
# Import existing configs (optional)
agentsync import ~/.cursor # Import from Cursor
agentsync import . # Auto-detect and import
# Sync everything
agentsync sync
```
**That's it!** Your AI tools are now synchronized.
## šÆ Real-World Example
Your team uses Cursor, but you prefer Claude. Another developer uses Roocode. Here's how AgentSync helps:
**.agentsync/config.json** (shared via git):
```json
{
"extends": [
{
"source": "github:acme/coding-standards",
"namespace": "company"
}
],
"tools": ["cursor", "claude", "roocode"],
"mcpServers": ["github", "postgres"]
}
```
Now everyone has:
- ā
Same coding standards across all tools
- ā
Same slash commands (`/test`, `/review`, `/commit`)
- ā
Same MCP servers for enhanced context
- ā
Tool-specific format compatibility (.mdc for Cursor, .md for others)
## š ļø Core Features
### 1. Universal Sync Engine
- **One source, multiple targets** ā Define once in `.agentsync/`
- **Format intelligence** ā Handles .mdc, .md, nested/flat structures
- **Bidirectional codecs** ā Import from any tool, export to any tool
### 2. GitHub Preset System
Share and compose configurations across teams:
```json
{
"extends": [
{ "source": "github:company/standards", "namespace": "company" },
{ "source": "github:team/frontend", "namespace": "frontend" },
{ "source": "fs:./local-overrides", "namespace": "local" }
]
}
```
### 3. MCP Server Management
Configure Model Context Protocol servers once, use everywhere:
```json
{
"mcpServers": ["github", "postgres", "filesystem"]
}
```
### 4. Smart Migration
- **Reference mode** ā Try AgentSync without moving files
- **Import mode** ā Full migration with automatic backups
- **Tool detection** ā Automatically finds existing configs
### 5. Security First
- **Secret scanning** ā Prevents accidental API key commits (enabled by default)
- **Unicode detection** ā Blocks hidden character attacks
- **Audit logging** ā Track all configuration changes
- **Local-first** ā Your data never leaves your machine
## š¦ Supported Tools
| Tool | Rules | Commands | MCP Servers | AGENTS.md |
| ----------- | ------------------------ | -------------------------- | ----------- | --------- |
| **Cursor** | ā
`.cursor/rules/*.mdc` | ā
`.cursor/commands/*.md` | ā
| ā
|
| **Claude** | ā
`.claude/rules/*.md` | ā
`.claude/commands/*.md` | ā
| ā
|
| **Cline** | ā
`.clinerules/*.md` | ā Not supported | ā
| ā
|
| **Roocode** | ā
`.roo/rules/*.md` | ā
`.roo/commands/*.md` | ā
| ā
|
## š® Commands
```bash
# Initialize AgentSync
agentsync init
# Check configuration status
agentsync status
# Import existing configs
agentsync import ~/.cursor # From global Cursor config
agentsync import . # Auto-detect project configs
# Sync configurations
agentsync sync # Sync everything
agentsync sync --pull # Update presets first
# Manage presets
agentsync preset list # Show available presets
agentsync preset select # Interactive preset selection
agentsync preset add github:org/repo
# Manage MCP servers
agentsync mcp list # Show available MCP servers
agentsync mcp enable github # Enable a specific server
```
## š Documentation
- **Getting Started**: See Quick Start above
- **Requirements & Design**: [REQUIREMENTS.md](./REQUIREMENTS.md)
- **Configuration Guide**: [docs/configuration.md](./docs/configuration.md)
- **Preset System**: [docs/presets.md](./docs/presets.md)
- **CLI Reference**: [docs/cli.md](./docs/cli.md)
- **Testing**: [TESTING.md](./TESTING.md)
- **Architecture**: [ARCHITECTURE.md](./ARCHITECTURE.md)
## š¤ Contributing
We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
## š Security
- **Local-first**: Your configurations never leave your machine
- **Secret scanning**: Built-in detection for API keys and tokens
- **Audit trail**: Complete history of all configuration changes
- **No telemetry**: We don't track usage or collect data
See [SECURITY.md](./SECURITY.md) for details.
## š License
MIT ā Use it freely in personal and commercial projects.
---
**Ready to save 30+ minutes per week?**
```bash
npm install -g agentsync && agentsync init
```
_Stop managing configs. Start shipping code._ š