agentsync-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentsync_cli-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +70 -0
- agentsync_cli-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- agentsync_cli-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- agentsync_cli-0.1.0/.github/ISSUE_TEMPLATE/new_adapter.yml +59 -0
- agentsync_cli-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
- agentsync_cli-0.1.0/.github/dependabot.yml +17 -0
- agentsync_cli-0.1.0/.github/workflows/ci.yml +52 -0
- agentsync_cli-0.1.0/.github/workflows/release.yml +54 -0
- agentsync_cli-0.1.0/.gitignore +36 -0
- agentsync_cli-0.1.0/.pre-commit-config.yaml +7 -0
- agentsync_cli-0.1.0/CHANGELOG.md +29 -0
- agentsync_cli-0.1.0/CODE_OF_CONDUCT.md +53 -0
- agentsync_cli-0.1.0/CONTRIBUTING.md +107 -0
- agentsync_cli-0.1.0/LICENSE +21 -0
- agentsync_cli-0.1.0/PKG-INFO +244 -0
- agentsync_cli-0.1.0/README.md +208 -0
- agentsync_cli-0.1.0/RELEASING.md +61 -0
- agentsync_cli-0.1.0/SECURITY.md +37 -0
- agentsync_cli-0.1.0/agentsync.example.yaml +49 -0
- agentsync_cli-0.1.0/pyproject.toml +70 -0
- agentsync_cli-0.1.0/src/agentsync/__init__.py +3 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/__init__.py +13 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/antigravity.py +102 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/base.py +84 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/claude.py +129 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/codex.py +178 -0
- agentsync_cli-0.1.0/src/agentsync/adapters/cursor.py +137 -0
- agentsync_cli-0.1.0/src/agentsync/cli.py +226 -0
- agentsync_cli-0.1.0/src/agentsync/config.py +333 -0
- agentsync_cli-0.1.0/src/agentsync/sync.py +164 -0
- agentsync_cli-0.1.0/src/agentsync/utils/__init__.py +1 -0
- agentsync_cli-0.1.0/src/agentsync/utils/backup.py +29 -0
- agentsync_cli-0.1.0/src/agentsync/utils/dedup.py +32 -0
- agentsync_cli-0.1.0/src/agentsync/utils/diff.py +44 -0
- agentsync_cli-0.1.0/src/agentsync/utils/io.py +88 -0
- agentsync_cli-0.1.0/src/agentsync/utils/logger.py +56 -0
- agentsync_cli-0.1.0/src/agentsync/utils/markdown.py +91 -0
- agentsync_cli-0.1.0/src/agentsync/utils/output.py +159 -0
- agentsync_cli-0.1.0/src/agentsync/validate.py +194 -0
- agentsync_cli-0.1.0/tests/__init__.py +0 -0
- agentsync_cli-0.1.0/tests/fixtures/agentsync_config.yaml +39 -0
- agentsync_cli-0.1.0/tests/fixtures/claude_global.json +25 -0
- agentsync_cli-0.1.0/tests/fixtures/claude_md_sample.md +26 -0
- agentsync_cli-0.1.0/tests/fixtures/claude_project_mcp.json +13 -0
- agentsync_cli-0.1.0/tests/fixtures/codex_config.toml +6 -0
- agentsync_cli-0.1.0/tests/test_adapter_antigravity.py +166 -0
- agentsync_cli-0.1.0/tests/test_adapter_claude.py +370 -0
- agentsync_cli-0.1.0/tests/test_adapter_codex.py +270 -0
- agentsync_cli-0.1.0/tests/test_adapter_cursor.py +226 -0
- agentsync_cli-0.1.0/tests/test_cli.py +325 -0
- agentsync_cli-0.1.0/tests/test_config.py +266 -0
- agentsync_cli-0.1.0/tests/test_coverage_gaps.py +316 -0
- agentsync_cli-0.1.0/tests/test_integration.py +272 -0
- agentsync_cli-0.1.0/tests/test_sync_engine.py +219 -0
- agentsync_cli-0.1.0/tests/test_utils_backup.py +42 -0
- agentsync_cli-0.1.0/tests/test_utils_dedup.py +46 -0
- agentsync_cli-0.1.0/tests/test_utils_diff.py +62 -0
- agentsync_cli-0.1.0/tests/test_utils_io.py +73 -0
- agentsync_cli-0.1.0/tests/test_utils_markdown.py +126 -0
- agentsync_cli-0.1.0/tests/test_validate.py +189 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in agentsync
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description
|
|
9
|
+
description: A clear description of the bug.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: steps
|
|
15
|
+
attributes:
|
|
16
|
+
label: Steps to Reproduce
|
|
17
|
+
description: Steps to reproduce the behavior.
|
|
18
|
+
placeholder: |
|
|
19
|
+
1. Run `agentsync sync`
|
|
20
|
+
2. See error...
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: expected
|
|
26
|
+
attributes:
|
|
27
|
+
label: Expected Behavior
|
|
28
|
+
description: What you expected to happen.
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: actual
|
|
34
|
+
attributes:
|
|
35
|
+
label: Actual Behavior
|
|
36
|
+
description: What actually happened. Include error messages if any.
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: config
|
|
42
|
+
attributes:
|
|
43
|
+
label: Config
|
|
44
|
+
description: Your `agentsync.yaml` (remove sensitive data).
|
|
45
|
+
render: yaml
|
|
46
|
+
|
|
47
|
+
- type: input
|
|
48
|
+
id: version
|
|
49
|
+
attributes:
|
|
50
|
+
label: agentsync version
|
|
51
|
+
description: Output of `agentsync --version`.
|
|
52
|
+
placeholder: "0.1.0"
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: input
|
|
57
|
+
id: python
|
|
58
|
+
attributes:
|
|
59
|
+
label: Python version
|
|
60
|
+
placeholder: "3.12"
|
|
61
|
+
validations:
|
|
62
|
+
required: true
|
|
63
|
+
|
|
64
|
+
- type: input
|
|
65
|
+
id: os
|
|
66
|
+
attributes:
|
|
67
|
+
label: OS
|
|
68
|
+
placeholder: "macOS 15, Ubuntu 24.04, Windows 11"
|
|
69
|
+
validations:
|
|
70
|
+
required: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or improvement
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description
|
|
9
|
+
description: A clear description of the feature you'd like.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: use_case
|
|
15
|
+
attributes:
|
|
16
|
+
label: Use Case
|
|
17
|
+
description: Why do you need this? What problem does it solve?
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: proposal
|
|
23
|
+
attributes:
|
|
24
|
+
label: Proposed Solution
|
|
25
|
+
description: How would you like this to work? Include config examples if relevant.
|
|
26
|
+
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: alternatives
|
|
29
|
+
attributes:
|
|
30
|
+
label: Alternatives Considered
|
|
31
|
+
description: Any alternative solutions or workarounds you've considered.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: New Adapter Request
|
|
2
|
+
description: Request support for a new AI coding agent
|
|
3
|
+
labels: ["adapter", "enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: input
|
|
6
|
+
id: agent
|
|
7
|
+
attributes:
|
|
8
|
+
label: Agent Name
|
|
9
|
+
description: Which AI coding agent should be supported?
|
|
10
|
+
placeholder: "Windsurf, Zed, Cline, etc."
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
- type: dropdown
|
|
15
|
+
id: role
|
|
16
|
+
attributes:
|
|
17
|
+
label: Adapter Type
|
|
18
|
+
options:
|
|
19
|
+
- Target (sync TO this agent)
|
|
20
|
+
- Source (sync FROM this agent)
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: mcp_format
|
|
26
|
+
attributes:
|
|
27
|
+
label: MCP Config Format
|
|
28
|
+
description: How does this agent store MCP server configs? Include file path and format example.
|
|
29
|
+
placeholder: |
|
|
30
|
+
File: ~/.agent/mcp.json
|
|
31
|
+
Format: JSON
|
|
32
|
+
Example:
|
|
33
|
+
{
|
|
34
|
+
"servers": { ... }
|
|
35
|
+
}
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: rules_format
|
|
41
|
+
attributes:
|
|
42
|
+
label: Rules Format
|
|
43
|
+
description: How does this agent store rules/instructions? Include file path and format.
|
|
44
|
+
placeholder: |
|
|
45
|
+
File: .agent/rules.md
|
|
46
|
+
Format: Markdown
|
|
47
|
+
|
|
48
|
+
- type: textarea
|
|
49
|
+
id: docs
|
|
50
|
+
attributes:
|
|
51
|
+
label: Documentation Links
|
|
52
|
+
description: Links to official docs about this agent's config format.
|
|
53
|
+
|
|
54
|
+
- type: checkboxes
|
|
55
|
+
id: contribution
|
|
56
|
+
attributes:
|
|
57
|
+
label: Contribution
|
|
58
|
+
options:
|
|
59
|
+
- label: I'd be willing to implement this adapter
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- Brief description of the changes -->
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
-
|
|
8
|
+
|
|
9
|
+
## Testing
|
|
10
|
+
|
|
11
|
+
- [ ] Tests pass (`pytest`)
|
|
12
|
+
- [ ] Linting passes (`ruff check src/ tests/`)
|
|
13
|
+
- [ ] Formatting passes (`ruff format --check src/ tests/`)
|
|
14
|
+
|
|
15
|
+
## Related Issues
|
|
16
|
+
|
|
17
|
+
<!-- Link to issues: Fixes #123, Closes #456 -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: pip
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
open-pull-requests-limit: 5
|
|
8
|
+
labels:
|
|
9
|
+
- dependencies
|
|
10
|
+
|
|
11
|
+
- package-ecosystem: github-actions
|
|
12
|
+
directory: /
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
open-pull-requests-limit: 5
|
|
16
|
+
labels:
|
|
17
|
+
- ci
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- run: pip install -e ".[dev]"
|
|
18
|
+
- run: ruff check src/ tests/
|
|
19
|
+
- run: ruff format --check src/ tests/
|
|
20
|
+
- run: mypy src/agentsync/
|
|
21
|
+
|
|
22
|
+
test:
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
27
|
+
os: [ubuntu-latest, macos-latest]
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
- uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
- run: pip install -e ".[dev]"
|
|
34
|
+
- run: pytest --cov=agentsync --cov-report=xml
|
|
35
|
+
- name: Upload coverage
|
|
36
|
+
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
|
|
37
|
+
uses: codecov/codecov-action@v4
|
|
38
|
+
with:
|
|
39
|
+
file: coverage.xml
|
|
40
|
+
continue-on-error: true
|
|
41
|
+
|
|
42
|
+
build:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
needs: [lint, test]
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.12"
|
|
50
|
+
- run: pip install build twine
|
|
51
|
+
- run: python -m build
|
|
52
|
+
- run: twine check dist/*
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- run: pip install build
|
|
20
|
+
- run: python -m build
|
|
21
|
+
- uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: dist
|
|
24
|
+
path: dist/
|
|
25
|
+
|
|
26
|
+
publish:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: pypi
|
|
30
|
+
permissions:
|
|
31
|
+
id-token: write
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/download-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
+
|
|
39
|
+
github-release:
|
|
40
|
+
needs: build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: dist
|
|
47
|
+
path: dist/
|
|
48
|
+
- name: Create GitHub Release
|
|
49
|
+
env:
|
|
50
|
+
GH_TOKEN: ${{ github.token }}
|
|
51
|
+
run: |
|
|
52
|
+
gh release create "${{ github.ref_name }}" dist/* \
|
|
53
|
+
--title "${{ github.ref_name }}" \
|
|
54
|
+
--generate-notes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
*.egg
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.idea/
|
|
19
|
+
.vscode/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# Testing
|
|
25
|
+
.pytest_cache/
|
|
26
|
+
.coverage
|
|
27
|
+
htmlcov/
|
|
28
|
+
.mypy_cache/
|
|
29
|
+
.ruff_cache/
|
|
30
|
+
|
|
31
|
+
# OS
|
|
32
|
+
.DS_Store
|
|
33
|
+
Thumbs.db
|
|
34
|
+
|
|
35
|
+
# agentsync runtime
|
|
36
|
+
.agentsync/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-02-20
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial release
|
|
15
|
+
- **Config system**: YAML config loading with validation, path resolution, auto-discovery
|
|
16
|
+
- **Claude source adapter**: 3-tier MCP server merge (global, project, local .mcp.json), Markdown rules parsing
|
|
17
|
+
- **Cursor target adapter**: JSON MCP config, MDC rules with YAML frontmatter
|
|
18
|
+
- **Codex target adapter**: TOML MCP config with marker-based insertion, preserves existing config sections
|
|
19
|
+
- **Antigravity target adapter**: JSON MCP config with stdio-only protocol filtering
|
|
20
|
+
- **Sync engine**: source → dedup → filter → generate → write pipeline
|
|
21
|
+
- **Validation engine**: server consistency, excluded section leak detection, case-insensitive duplicate check
|
|
22
|
+
- **CLI commands**: `sync`, `validate`, `init`, `status` via Click
|
|
23
|
+
- **Rich output**: coloured sync summary, validation report, status display
|
|
24
|
+
- **Utilities**: case-insensitive dedup, file backup, server diff, Markdown section parser
|
|
25
|
+
- **Test suite**: 192 tests, 97% coverage
|
|
26
|
+
- **CI/CD**: GitHub Actions (lint + test matrix + build), PyPI release workflow, Dependabot
|
|
27
|
+
|
|
28
|
+
[Unreleased]: https://github.com/spyrae/agentsync/compare/v0.1.0...HEAD
|
|
29
|
+
[0.1.0]: https://github.com/spyrae/agentsync/releases/tag/v0.1.0
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to a positive environment:
|
|
15
|
+
|
|
16
|
+
* Using welcoming and inclusive language
|
|
17
|
+
* Being respectful of differing viewpoints and experiences
|
|
18
|
+
* Gracefully accepting constructive criticism
|
|
19
|
+
* Focusing on what is best for the community
|
|
20
|
+
* Showing empathy towards other community members
|
|
21
|
+
|
|
22
|
+
Examples of unacceptable behavior:
|
|
23
|
+
|
|
24
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
25
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
26
|
+
* Public or private harassment
|
|
27
|
+
* Publishing others' private information without explicit permission
|
|
28
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
29
|
+
|
|
30
|
+
## Enforcement Responsibilities
|
|
31
|
+
|
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
33
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
34
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
35
|
+
or harmful.
|
|
36
|
+
|
|
37
|
+
## Scope
|
|
38
|
+
|
|
39
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
40
|
+
an individual is officially representing the community in public spaces.
|
|
41
|
+
|
|
42
|
+
## Enforcement
|
|
43
|
+
|
|
44
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
45
|
+
reported to the project maintainers at **hello@spyrae.com**.
|
|
46
|
+
|
|
47
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
48
|
+
|
|
49
|
+
## Attribution
|
|
50
|
+
|
|
51
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
|
|
52
|
+
version 2.1, available at
|
|
53
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Contributing to agentsync
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! Here's how to get started.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/spyrae/agentsync.git
|
|
9
|
+
cd agentsync
|
|
10
|
+
python -m venv .venv
|
|
11
|
+
source .venv/bin/activate
|
|
12
|
+
pip install -e ".[dev]"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Running Tests
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pytest # All tests
|
|
19
|
+
pytest -v # Verbose
|
|
20
|
+
pytest --cov=agentsync # With coverage
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Code Quality
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ruff check src/ tests/ # Lint
|
|
27
|
+
ruff format src/ tests/ # Format
|
|
28
|
+
mypy src/agentsync/ # Type check
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
All three must pass before merging. CI runs these automatically.
|
|
32
|
+
|
|
33
|
+
## Pre-commit Hooks (optional)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install pre-commit
|
|
37
|
+
pre-commit install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This runs ruff on every commit.
|
|
41
|
+
|
|
42
|
+
## Making Changes
|
|
43
|
+
|
|
44
|
+
1. Fork the repository
|
|
45
|
+
2. Create a feature branch: `git checkout -b feat/my-feature`
|
|
46
|
+
3. Make your changes
|
|
47
|
+
4. Ensure tests pass and coverage doesn't drop
|
|
48
|
+
5. Open a pull request against `main`
|
|
49
|
+
|
|
50
|
+
### Commit Messages
|
|
51
|
+
|
|
52
|
+
Use conventional-ish format:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
feat: add Windsurf adapter
|
|
56
|
+
fix: handle empty mcpServers in global config
|
|
57
|
+
test: add integration test for dry-run mode
|
|
58
|
+
docs: update CLI reference in README
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Adding a New Adapter
|
|
62
|
+
|
|
63
|
+
See the "Adding Adapters" section in the README for the architecture overview.
|
|
64
|
+
|
|
65
|
+
Steps:
|
|
66
|
+
|
|
67
|
+
1. Create `src/agentsync/adapters/youragent.py`
|
|
68
|
+
2. Implement `TargetAdapter` (or `SourceAdapter`)
|
|
69
|
+
3. Register it in `cli.py` (`create_targets` / `create_source`)
|
|
70
|
+
4. Add the type to `KNOWN_TARGET_TYPES` in `config.py`
|
|
71
|
+
5. Write tests in `tests/test_adapter_youragent.py`
|
|
72
|
+
6. Update README with the new agent in the "Supported Agents" table
|
|
73
|
+
|
|
74
|
+
## Project Structure
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
src/agentsync/
|
|
78
|
+
├── adapters/ # Source and target adapters
|
|
79
|
+
│ ├── base.py # Abstract base classes
|
|
80
|
+
│ ├── claude.py # Claude Code source adapter
|
|
81
|
+
│ ├── cursor.py # Cursor target adapter
|
|
82
|
+
│ ├── codex.py # Codex target adapter
|
|
83
|
+
│ └── antigravity.py # Antigravity/Gemini target adapter
|
|
84
|
+
├── utils/ # Shared utilities
|
|
85
|
+
│ ├── backup.py # File backup
|
|
86
|
+
│ ├── dedup.py # Case-insensitive deduplication
|
|
87
|
+
│ ├── diff.py # Server diff display
|
|
88
|
+
│ ├── io.py # File writing with WriteResult
|
|
89
|
+
│ ├── logger.py # Rich console logging
|
|
90
|
+
│ ├── markdown.py # Markdown section parsing
|
|
91
|
+
│ └── output.py # CLI output formatting
|
|
92
|
+
├── cli.py # Click CLI commands
|
|
93
|
+
├── config.py # YAML config loading
|
|
94
|
+
├── sync.py # Sync orchestrator
|
|
95
|
+
└── validate.py # Validation orchestrator
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Code Style
|
|
99
|
+
|
|
100
|
+
- Python 3.9+ compatible (use `from __future__ import annotations`)
|
|
101
|
+
- Ruff for linting and formatting (config in `pyproject.toml`)
|
|
102
|
+
- Type hints everywhere, checked by mypy
|
|
103
|
+
- Tests use pytest with `tmp_path` fixtures — no real user files
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Spyrae
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|