capsync 2.0.1

A simple tool to sync your AI coding skills across different tools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# CapSync

Stop copying your AI skills and commands between tools. Do it once, use them everywhere.

## What is CapSync?

You have a collection of AI coding skills and custom commands. Maybe they are prompts, context files, reusable instructions, or slash commands. You want to use these across multiple AI coding assistants: OpenCode, Claude Code, Cursor, Codex, and dozens of others.

The problem? Each tool stores skills and commands in different locations:

| Tool        | Skills Location             | Commands Location           |
| ----------- | --------------------------- | -------------------------- |
| OpenCode    | `~/.config/opencode/skill/` | `~/.config/opencode/commands/` |
| Claude Code | `~/.claude/skills/`         | `~/.claude/commands/`      |
| Cursor      | `~/.cursor/skills/`        | -                          |
| Codex       | `~/.codex/skills/`         | `~/.codex/commands/`       |
| Kilo Code   | `~/.kilocode/skills/`      | `~/.kilocode/commands/`   |
| Amp         | `~/.agents/skills/`        | -                          |
| Antigravity | `~/.agent/skills/`         | -                          |

And that is just six tools. CapSync supports over 40.

CapSync solves this by creating a single source of truth for your skills and commands. You maintain one skills directory and optionally one commands directory. CapSync creates symlinks from those directories to each tool's expected location. Add a skill or command once, it appears in every tool. Remove it once, it disappears everywhere.

## Important Notice

**What CapSync Is:**

- A synchronization tool that links your existing skills and commands to multiple AI coding assistants
- A symlink manager that keeps your skills and commands directories in sync with many tools

**What CapSync Is Not:**

- A skill or command discovery tool. CapSync does not find or download skills/commands from the internet
- A skill or command installer. You must already have skills/commands in your source directories
- A skill or command creator. CapSync only syncs what you already have

**Prerequisites:**
You need to have skills (and optionally commands) already installed in local directories before using CapSync. CapSync assumes you have:

- A directory containing your skills (e.g., `~/Dev/scripts/skills`)
- Optionally, a directory containing your commands (e.g., `~/Dev/scripts/commands`)
- Skills and commands formatted for your AI tools

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.

## Installation

### Download Pre-built Binary

**macOS (Apple Silicon):**

```bash
curl -L -o capsync https://github.com/pixincreate/cap_sync/releases/latest/download/capsync-darwin-aarch64
chmod +x capsync
./capsync init
```

**macOS (Intel):**

```bash
curl -L -o capsync https://github.com/pixincreate/cap_sync/releases/latest/download/capsync-darwin-x86_64
chmod +x capsync
./capsync init
```

**Linux (x86_64):**

```bash
curl -L -o capsync https://github.com/pixincreate/cap_sync/releases/latest/download/capsync-linux-x86_64
chmod +x capsync
./capsync init
```

**Optional: Add to PATH**

```bash
# Add to ~/.zshrc or ~/.bashrc
export PATH="$PATH:/path/to/capsync/dir"
```

### Install via Cargo

```bash
cargo install capsync
```

### Build from Source

```bash
git clone https://github.com/pixincreate/cap_sync.git
cd cap_sync
cargo install --path .
```

## Getting Started

### Initial Setup

Run `capsync init` to create your configuration. The tool will:

1. Ask for your skills directory path (supports `$HOME`, `~`, and other shell variables)
2. Automatically detect if a `commands/` subdirectory exists in your skills directory
3. Prompt to enable commands if found
4. Scan your system for installed AI coding tools
5. Add only the detected tools to your configuration
6. Enable those tools automatically

```bash
$ capsync init
Welcome to CapSync! Let's set up your configuration.

Enter your skills directory: $HOME/Dev/scripts/skills

Detecting installed tools...
Detected and enabled: claude, opencode

Configuration created at /Users/you/.config/capsync/config.toml
```

If a `commands/` subdirectory is found in your skills directory:

```bash
$ capsync init
Welcome to CapSync! Let's set up your configuration.

Enter your skills directory: $HOME/Dev/scripts/skills

Found commands/ subdirectory. Enable commands? [Y/n]: Y

Detecting installed tools...
Detected and enabled: claude, opencode

Configuration created at /Users/you/.config/capsync/config.toml
```

### Daily Workflow

After initial setup, your workflow is simple:

```bash
# Sync your skills and commands to all enabled tools
capsync sync

# Check the status of your symlinks
capsync status

# View your current configuration
capsync config
```

> **Note:** If `commands_source` is not configured, `sync` will only sync skills.

### Adding New Tools

When you install a new AI coding tool, add it to CapSync:

```bash
# Add the tool and sync automatically
capsync add cursor

# Or add without syncing
capsync add codex --no-sync
```

CapSync validates the tool name against its supported tools list. If you try to add an unsupported tool:

```bash
$ capsync add unknown-tool
Error: Tool 'unknown-tool' does not exist or is unsupported in the current version
```

### Removing Tools

Remove a specific tool's symlink:

```bash
capsync remove claude
```

Remove all symlinks:

```bash
capsync remove --all
```

## How It Works

CapSync uses directory symlinks (symbolic links) to connect your skills to each tool.

### The Setup

1. You designate one directory as your skills source (e.g., `~/Dev/scripts/skills/skills`)
2. CapSync creates symlinks from that directory to each tool's expected skills location
3. Each tool sees your skills as if they were native to that tool

### The Benefits

- **Single source of truth**: Edit skills in one place
- **Automatic propagation**: Changes appear in all tools immediately
- **No copying**: Symlinks are lightweight pointers, not copies
- **Easy management**: Add or remove tools without reorganizing files
- **Clean removal**: Remove a tool's access without deleting your skills

### Example

Before CapSync:

```
~/Dev/scripts/skills/
  ├── my-skill/
  │   └── SKILL.md

~/.config/opencode/skill/
  └── my-skill/          (copy)
      └── SKILL.md       (copy)

~/.claude/skills/
  └── my-skill/          (copy)
      └── SKILL.md       (copy)
```

After CapSync:

```
~/Dev/scripts/skills/
  └── my-skill/
      └── SKILL.md       (original)

~/.config/opencode/skill/
  └── my-skill -> ~/Dev/scripts/skills/my-skill  (symlink)

~/.claude/skills/
  └── my-skill -> ~/Dev/scripts/skills/my-skill  (symlink)
```

## Configuration File

CapSync stores its configuration at `~/.config/capsync/config.toml`:

```toml
skills_source = "/Users/you/Dev/scripts/skills"
commands_source = "/Users/you/Dev/scripts/commands"

[destinations.opencode]
enabled = true
skills_path = "/Users/you/.config/opencode/skill"
commands_path = "/Users/you/.config/opencode/commands"

[destinations.claude]
enabled = true
skills_path = "/Users/you/.claude/skills"
commands_path = "/Users/you/.claude/commands"

[destinations.cursor]
enabled = false
skills_path = "/Users/you/.cursor/skills"
```

You can manually edit this file to:

- Change the skills and/or commands source directories
- Enable or disable specific tools
- Adjust destination paths if your tools use non-standard locations

## Supported Tools

CapSync currently supports 40+ AI coding assistants:

**A-C**: AdaL, Amp, Antigravity, Augment, Claude Code, Cline, CodeBuddy, Codex, Command Code, Continue, Cortex, Crush, Cursor

**D-G**: Droid, Gemini CLI, GitHub Copilot, Goose

**I-K**: iFlow CLI, Junie, Kilo Code, Kimi CLI, Kiro CLI, Kode

**M-N**: MCPJam, Mistral Vibe, Moltbot, Mux, Neovate

**O-Q**: OpenCode, OpenHands, OpenClaw, Pi, Pochi, Qoder, Qwen Code

**R-Z**: Replit, Roo Code, Trae, Trae CN, Windsurf, Zencoder

### Commands Support

Not all tools support commands. Currently, the following tools support command syncing:

- **Claude Code**: `~/.claude/commands/`
- **OpenCode**: `~/.config/opencode/commands/`
- **Kilo Code**: `~/.kilocode/commands/`
- **Codex**: `~/.codex/commands/`

Missing a tool? CapSync is designed to easily add new tools. Open an issue or submit a PR.

## Command Reference

### `capsync init`

Initialize configuration. Detects installed tools and creates config file.

### `capsync config`

Display current configuration and enabled tools.

### `capsync detect-tools`

Scan system for installed AI coding tools without modifying config.

### `capsync sync`

Create or update symlinks for all enabled tools.

### `capsync add <tool>`

Add a tool to configuration and sync automatically.

Options:

- `--no-sync`: Add tool without running sync

### `capsync remove <tool>`

Remove symlink for a specific tool.

Options:

- `--all`: Remove all symlinks

### `capsync status`

Check status of source directory and all symlinks.

## Skill Format

While CapSync does not enforce a specific skill format, most AI tools expect:

```
your-skill/
└── SKILL.md
```

The `SKILL.md` typically includes metadata and instructions:

```markdown
---
name: your-skill
description: What this skill does
license: MIT
---

# Your Skill

Detailed instructions for the AI...
```

CapSync syncs the entire directory structure, so your skills can include multiple files, subdirectories, or any format your tools support.

## Command Format

Commands are typically markdown files that define slash commands for AI tools:

```
your-command.md
```

Example command file:

```markdown
---
name: test
description: Run test suite
---

# Test Command

Run the test suite with coverage:

cargo test
```

### Directory Structure

Your commands source can be:

1. **A separate directory** (recommended):
   ```
   ~/my-commands/
   ├── opencode_deploy.md
   ├── opencode_test.md
   ├── claude_deploy.md
   └── claude_test.md
   ```

2. **A `commands/` subdirectory** in your skills directory:
   ```
   ~/my-skills/
   ├── commands/
   │   ├── opencode_deploy.md
   │   └── claude_deploy.md
   └── my-skill/
       └── SKILL.md
   ```

CapSync auto-detects the `commands/` subdirectory during init and prompts to enable command syncing.

## Development

Build the project:

```bash
cargo build
```

Run tests:

```bash
cargo test
```

Run locally:

```bash
cargo run -- init
```

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

## License

This project is dedicated to the public domain under the [CC0 1.0 Universal License](LICENSE).