From df5b3d54b34be5c8ac5014e2a1bd7e1565244da9 Mon Sep 17 00:00:00 2001 From: DEMOCODE675 Date: Sun, 2 Aug 2026 23:11:42 +0530 Subject: [PATCH 1/2] Automated CLI --- src/devsetup/core/orchestrator.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/devsetup/core/orchestrator.py b/src/devsetup/core/orchestrator.py index 0dc1610..af58161 100644 --- a/src/devsetup/core/orchestrator.py +++ b/src/devsetup/core/orchestrator.py @@ -52,8 +52,31 @@ def build_services(config: AppConfig | None = None) -> DevSetupServices: def repository_destination(url: str, config: AppConfig) -> Path: - """Compute a destination path for cloned repositories.""" + """ + Clone repositories beside the current project. + + Example: + + PROJECTS/ + ├── CloneCode/ + ├── NETFLIXclone/ + """ base_name = url.rstrip("/").split("/")[-1].removesuffix(".git") - destination_root = config.clone.destination or config.cache.state / "repos" - return destination_root / base_name \ No newline at end of file + + # If user specified --destination, use it. + if config.clone.destination is not None: + return config.clone.destination / base_name + + current = Path.cwd().resolve() + + # If running inside a git repository, clone beside it. + git_root = current + + while git_root != git_root.parent: + if (git_root / ".git").exists(): + return git_root.parent / base_name + git_root = git_root.parent + + # Otherwise clone beside current directory. + return current.parent / base_name \ No newline at end of file From 54f7cd948153d0f539295a55381fc0e2ddf05fb1 Mon Sep 17 00:00:00 2001 From: DEMOCODE675 Date: Sun, 2 Aug 2026 23:22:30 +0530 Subject: [PATCH 2/2] changes --- src/devsetup/core/orchestrator.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/devsetup/core/orchestrator.py b/src/devsetup/core/orchestrator.py index af58161..277450d 100644 --- a/src/devsetup/core/orchestrator.py +++ b/src/devsetup/core/orchestrator.py @@ -54,12 +54,6 @@ def build_services(config: AppConfig | None = None) -> DevSetupServices: def repository_destination(url: str, config: AppConfig) -> Path: """ Clone repositories beside the current project. - - Example: - - PROJECTS/ - ├── CloneCode/ - ├── NETFLIXclone/ """ base_name = url.rstrip("/").split("/")[-1].removesuffix(".git")