Thanks for your interest in contributing! Here's how to get started.
git clone https://github.com/spyrae/agentsync.git
cd agentsync
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"pytest # All tests
pytest -v # Verbose
pytest --cov=agentsync # With coverageruff check src/ tests/ # Lint
ruff format src/ tests/ # Format
mypy src/agentsync/ # Type checkAll three must pass before merging. CI runs these automatically.
pip install pre-commit
pre-commit installThis runs ruff on every commit.
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Ensure tests pass and coverage doesn't drop
- Open a pull request against
main
Use conventional-ish format:
feat: add Windsurf adapter
fix: handle empty mcpServers in global config
test: add integration test for dry-run mode
docs: update CLI reference in README
See the "Adding Adapters" section in the README for the architecture overview.
Steps:
- Create
src/agentsync/adapters/youragent.py - Implement
TargetAdapter(orSourceAdapter) - Register it in
cli.py(create_targets/create_source) - Add the type to
KNOWN_TARGET_TYPESinconfig.py - Write tests in
tests/test_adapter_youragent.py - Update README with the new agent in the "Supported Agents" table
src/agentsync/
├── adapters/ # Source and target adapters
│ ├── base.py # Abstract base classes
│ ├── claude.py # Claude Code source adapter
│ ├── cursor.py # Cursor target adapter
│ ├── codex.py # Codex target adapter
│ └── antigravity.py # Antigravity/Gemini target adapter
├── utils/ # Shared utilities
│ ├── backup.py # File backup
│ ├── dedup.py # Case-insensitive deduplication
│ ├── diff.py # Server diff display
│ ├── io.py # File writing with WriteResult
│ ├── logger.py # Rich console logging
│ ├── markdown.py # Markdown section parsing
│ └── output.py # CLI output formatting
├── cli.py # Click CLI commands
├── config.py # YAML config loading
├── sync.py # Sync orchestrator
└── validate.py # Validation orchestrator
- Python 3.9+ compatible (use
from __future__ import annotations) - Ruff for linting and formatting (config in
pyproject.toml) - Type hints everywhere, checked by mypy
- Tests use pytest with
tmp_pathfixtures — no real user files
By contributing, you agree that your contributions will be licensed under the MIT License.