service
dev_tool.services.opencode.service
log = logging.getLogger(__name__)
module-attribute
OPENCODE_DIRECTORY = Path.home() / '.config' / 'opencode'
module-attribute
OPENCODE_REPOSITORY = 'https://github.com/stratusadv/opencode-files-public'
module-attribute
OpenCodeService
Bases: BaseService
A service class for managing OpenCode files.
This class provides methods for downloading and syncing OpenCode files from the public repository.
The constructor for the OpenCodeService class.
It initializes the service by calling the parent constructor.
Source code in dev_tool/services/opencode/service.py
sync
A method that syncs the OpenCode files from the repository.
This method clones the repository if it does not exist locally, or pulls the latest changes if it does.
Raises:
-
GitNotAvailableError–If git is not found.
-
OpenCodeSyncError–If the sync operation fails.