Skip to content

Commit 6bf3d26

Browse files
docs: update clone command guidance
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 4f860ca commit 6bf3d26

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CapSync solves this by creating a single source of truth for your skills and com
3131

3232
**What CapSync Is Not:**
3333

34-
- A skill or command discovery tool. CapSync does not find or download skills/commands from the internet
34+
- A skill or command discovery tool. CapSync does not search registries or catalogs for skills/commands on your behalf
3535
- A skill or command installer. You must already have skills/commands in your source directories
3636
- A skill or command creator. CapSync only syncs what you already have
3737

@@ -42,7 +42,7 @@ You need to have skills (and optionally commands) already installed in local dir
4242
- Optionally, a directory containing your commands (e.g., `~/dev/scripts/commands`)
4343
- Skills and commands formatted for your AI tools
4444

45-
If you are looking for a tool to discover and install skills from a registry or repository, that is not what CapSync does. That may be a future feature, but for now, CapSync only syncs skills you already possess.
45+
If you already know which Git repository you want, `capsync clone` can download it into your configured skills source. CapSync still does not browse, rank, or discover skills for you.
4646

4747
## Installation
4848

@@ -308,6 +308,24 @@ Scan system for installed AI coding tools without modifying config.
308308

309309
Create or update symlinks for all enabled tools.
310310

311+
### `capsync clone <repo>`
312+
313+
Clone a remote Git repository into your configured skills source.
314+
315+
Supported inputs:
316+
317+
- `owner/repo`
318+
- `https://...`
319+
- `http://...`
320+
- `git@...`
321+
322+
Options:
323+
324+
- `--branch <name>`: Clone a specific branch instead of auto-detecting the remote default branch
325+
- `--no-sync`: Skip running `capsync sync` after the clone finishes
326+
327+
If the skills source already exists, CapSync prompts before replacing it. During override, it offers a backup when local changes would otherwise be lost.
328+
311329
### `capsync add <tool>`
312330

313331
Add a tool to configuration and sync automatically.

documentation/agents.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ A target tool's skills/commands location. Each destination has:
4646
A symbolic link. CapSync doesn't copy files—it creates symlinks from destination directories pointing to your source directory.
4747

4848
### Clone
49-
The `clone` command fetches a remote GitHub repository into your skills source, enabling CapSync to sync remote skills to local tools.
49+
The `clone` command fetches a remote Git repository into your skills source, enabling CapSync to sync remote skills to local tools.
5050

5151
---
5252

@@ -136,7 +136,7 @@ Shows:
136136

137137
### `capsync clone <repo>`
138138

139-
Clone a remote GitHub repository into your skills source.
139+
Clone a remote Git repository into your skills source.
140140

141141
```bash
142142
capsync clone <repo> # Clone (auto-detect branch)
@@ -151,11 +151,14 @@ capsync clone <repo> --no-sync # Clone without syncing
151151
- If `skills_source` doesn't exist: Clone directly
152152
- If `skills_source` exists (same repo): Prompt to update or override
153153
- If `skills_source` exists (different repo): Prompt to override
154-
- If local has unpushed changes: Warn and offer to backup
154+
- If `skills_source` exists but is not a git repository: Prompt before overriding
155+
- If `skills_source` is a git repository without an `origin` remote: Prompt before overriding
156+
- If override would discard local changes: Warn and offer to back up first
157+
- If update is selected while the current branch differs from `--branch`: Re-clone the requested branch instead of updating in place
155158

156159
**Branch Detection:**
157-
- Auto-detects default branch from remote
158-
- Prefers `main`, falls back to `master`, then alphabetical
160+
- Auto-detects the remote's default branch from remote HEAD
161+
- Falls back to fetched branch names only if the remote does not report a default branch
159162

160163
---
161164

@@ -298,7 +301,8 @@ After (with CapSync):
298301
3. Handle existing source:
299302
- Same repo → offer update (git pull) or override
300303
- Different repo → offer override
301-
- Local changes → warn and offer backup
304+
- Non-git directory or no `origin` remote → require explicit confirmation before override
305+
- Local changes during override → warn and offer backup
302306
4. Clone to `skills_source`
303307
5. Optionally sync to all enabled tools
304308

0 commit comments

Comments
 (0)