Skip to content

Add a Clone locally button for repos only on GitHub or GitLab - #43

Merged
meddlin merged 1 commit into
mainfrom
claude/clone-button-github-gitlab-60971d
Nov 2, 2026
Merged

meddlin merged 1 commit into
mainfrom
claude/clone-button-github-gitlab-60971d

Conversation

@meddlin

@meddlin meddlin commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Repos that GitHub or GitLab lists but that have no local clone now link to a detail page (/remotes/$provider/$) with a Clone locally button. It runs git clone (no prompts), rescans, and opens the new local repo page.
  • New Clone directory section on Settings, saved on the server (clone-directory.json in the app home), default ~/git. It must be inside a scanned root so clones show up in the library.
  • The clone URL is looked up in the server's catalog, never taken from the browser.

Notes

  • Private repos only clone if git already has credentials (helper/token); failures show git's error on the page.
  • Not exercised in a browser or with a real clone yet.

Test plan

  • npm run typecheck, vite build, vitest run (517 passing, incl. new clone-directory and helper tests)
  • Click Clone locally on a hosted-only repo; change the directory in Settings and repeat

🤖 Generated with Claude Code

Repos that a host lists but no local clone has now open a detail page
(/remotes/$provider/$) with a "Clone locally" button. The server looks up the
clone URL in its own catalog and runs git clone without prompts, then rescans
and sends you to the new repo.

The destination is a new Clone directory setting on the Settings page, saved in
the app home (clone-directory.json) and defaulting to ~/git. It must be inside
a scanned root so the clone appears in the library.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@meddlin
meddlin merged commit 8d6da9b into main Nov 2, 2026
1 check passed
@meddlin
meddlin deleted the claude/clone-button-github-gitlab-60971d branch November 2, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant