diff --git a/stapler-scripts/llm-sync/src/__init__.py b/stapler-scripts/llm-sync/llm_sync/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/__init__.py rename to stapler-scripts/llm-sync/llm_sync/__init__.py diff --git a/stapler-scripts/llm-sync/src/cli.py b/stapler-scripts/llm-sync/llm_sync/cli.py similarity index 84% rename from stapler-scripts/llm-sync/src/cli.py rename to stapler-scripts/llm-sync/llm_sync/cli.py index f45dc6f..4751ff8 100644 --- a/stapler-scripts/llm-sync/src/cli.py +++ b/stapler-scripts/llm-sync/llm_sync/cli.py @@ -3,17 +3,9 @@ from pathlib import Path from rich.console import Console -# Allow running from src directly or as module -try: - from .sources.claude import ClaudeSource - from .targets.gemini import GeminiTarget - from .targets.opencode import OpenCodeTarget -except ImportError: - # Fallback if run as script (hacky but useful during dev) - sys.path.append(str(Path(__file__).parent)) - from sources.claude import ClaudeSource - from targets.gemini import GeminiTarget - from targets.opencode import OpenCodeTarget +from .sources.claude import ClaudeSource +from .targets.gemini import GeminiTarget +from .targets.opencode import OpenCodeTarget console = Console() diff --git a/stapler-scripts/llm-sync/src/core.py b/stapler-scripts/llm-sync/llm_sync/core.py similarity index 100% rename from stapler-scripts/llm-sync/src/core.py rename to stapler-scripts/llm-sync/llm_sync/core.py diff --git a/stapler-scripts/llm-sync/src/mappings.py b/stapler-scripts/llm-sync/llm_sync/mappings.py similarity index 100% rename from stapler-scripts/llm-sync/src/mappings.py rename to stapler-scripts/llm-sync/llm_sync/mappings.py diff --git a/stapler-scripts/llm-sync/src/sources/__init__.py b/stapler-scripts/llm-sync/llm_sync/sources/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/sources/__init__.py rename to stapler-scripts/llm-sync/llm_sync/sources/__init__.py diff --git a/stapler-scripts/llm-sync/src/sources/claude.py b/stapler-scripts/llm-sync/llm_sync/sources/claude.py similarity index 98% rename from stapler-scripts/llm-sync/src/sources/claude.py rename to stapler-scripts/llm-sync/llm_sync/sources/claude.py index 3e2b493..a4c0eb7 100644 --- a/stapler-scripts/llm-sync/src/sources/claude.py +++ b/stapler-scripts/llm-sync/llm_sync/sources/claude.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Dict, Any, Optional -from core import Agent, Skill, Command, SyncSource -from mappings import map_tool, GEMINI_TOOLS +from ..core import Agent, Skill, Command, SyncSource +from ..mappings import map_tool, GEMINI_TOOLS from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/src/targets/__init__.py b/stapler-scripts/llm-sync/llm_sync/targets/__init__.py similarity index 100% rename from stapler-scripts/llm-sync/src/targets/__init__.py rename to stapler-scripts/llm-sync/llm_sync/targets/__init__.py diff --git a/stapler-scripts/llm-sync/src/targets/gemini.py b/stapler-scripts/llm-sync/llm_sync/targets/gemini.py similarity index 98% rename from stapler-scripts/llm-sync/src/targets/gemini.py rename to stapler-scripts/llm-sync/llm_sync/targets/gemini.py index a643999..0a36068 100644 --- a/stapler-scripts/llm-sync/src/targets/gemini.py +++ b/stapler-scripts/llm-sync/llm_sync/targets/gemini.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Optional -from core import Agent, Skill, Command, SyncTarget -from mappings import GEMINI_TOOLS +from ..core import Agent, Skill, Command, SyncTarget +from ..mappings import GEMINI_TOOLS from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/src/targets/opencode.py b/stapler-scripts/llm-sync/llm_sync/targets/opencode.py similarity index 97% rename from stapler-scripts/llm-sync/src/targets/opencode.py rename to stapler-scripts/llm-sync/llm_sync/targets/opencode.py index 11bacbe..e3f1c65 100644 --- a/stapler-scripts/llm-sync/src/targets/opencode.py +++ b/stapler-scripts/llm-sync/llm_sync/targets/opencode.py @@ -1,8 +1,8 @@ import yaml from pathlib import Path from typing import List, Dict, Any, Optional -from core import Agent, Skill, Command, SyncTarget -from mappings import map_tool +from ..core import Agent, Skill, Command, SyncTarget +from ..mappings import map_tool from rich.console import Console console = Console() diff --git a/stapler-scripts/llm-sync/main.py b/stapler-scripts/llm-sync/main.py index 0371bbe..d540a86 100644 --- a/stapler-scripts/llm-sync/main.py +++ b/stapler-scripts/llm-sync/main.py @@ -1,11 +1,10 @@ import sys from pathlib import Path -# Add src to python path -src_path = Path(__file__).parent / "src" -sys.path.append(str(src_path)) +# Add project root to python path so we can import llm_sync as a package +sys.path.append(str(Path(__file__).parent)) -from cli import main +from llm_sync.cli import main if __name__ == "__main__": main() diff --git a/stapler-scripts/llm-sync/pyproject.toml b/stapler-scripts/llm-sync/pyproject.toml index d10e60e..a8390c1 100644 --- a/stapler-scripts/llm-sync/pyproject.toml +++ b/stapler-scripts/llm-sync/pyproject.toml @@ -1,10 +1,13 @@ [project] name = "llm-sync" version = "0.1.0" -description = "Add your description here" +description = "Sync LLM agents from Claude to Gemini and OpenCode" readme = "README.md" -requires-python = ">=3.14" +requires-python = ">=3.12" dependencies = [ "pyyaml>=6.0.3", "rich>=14.3.2", ] + +[project.scripts] +llm-sync = "llm_sync.cli:main"