agent-dotfiles 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -2
- package/dist/cli.js +777 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +439 -0
- package/dist/index.js.map +1 -0
- package/package.json +44 -7
- package/index.js +0 -2
package/README.md
CHANGED
|
@@ -1,5 +1,116 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src=".github/cover.svg" alt="agent-dotfiles" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# agent-dotfiles
|
|
2
6
|
|
|
3
|
-
Write AI coding rules once, sync to every agent.
|
|
7
|
+
Write AI coding rules once, sync to every agent.
|
|
8
|
+
|
|
9
|
+
Most developers already have an `AGENTS.md` or `CLAUDE.md` in their projects. **agent-dotfiles** reads your existing rules and propagates them to every coding agent you use. No new directories, no config files, no lock-in.
|
|
10
|
+
|
|
11
|
+
## Supported Agents
|
|
12
|
+
|
|
13
|
+
| Agent | Rules | Skills | Detection |
|
|
14
|
+
|-------|-------|--------|-----------|
|
|
15
|
+
| CommandCode | `AGENTS.md` | `.commandcode/skills/` | `~/.commandcode` |
|
|
16
|
+
| Claude Code | `CLAUDE.md` | `.claude/skills/` | `~/.claude` |
|
|
17
|
+
| Cursor | `AGENTS.md` | `.cursor/skills/` | `~/.cursor` |
|
|
18
|
+
| Copilot | `AGENTS.md` | `.github/skills/` | `~/.copilot` |
|
|
19
|
+
| Codex | `AGENTS.md` | `.agents/skills/` | `~/.codex` |
|
|
20
|
+
| OpenCode | `AGENTS.md` | `.opencode/skills/` | `~/.config/opencode` |
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npx agent-dotfiles
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
### Detect & Status
|
|
31
|
+
|
|
32
|
+
Run without arguments to see detected agents, found rules, and available commands:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx agent-dotfiles
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Sync Rules
|
|
39
|
+
|
|
40
|
+
Sync your rules file to all agents:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npx agent-dotfiles sync rules --from AGENTS.md --to all
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Sync to specific agents:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx agent-dotfiles sync rules --from AGENTS.md --to claude,cursor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Sync Skills
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npx agent-dotfiles sync skills --from .claude/skills --to all
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Global Rules
|
|
59
|
+
|
|
60
|
+
Sync global rules across agents:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npx agent-dotfiles sync rules --from ~/.claude/CLAUDE.md --to all --global
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Dry Run
|
|
67
|
+
|
|
68
|
+
Preview what would happen without writing files:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
npx agent-dotfiles sync rules --from AGENTS.md --to all --dry-run
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Options
|
|
75
|
+
|
|
76
|
+
| Flag | Description | Default |
|
|
77
|
+
|------|-------------|---------|
|
|
78
|
+
| `--from <source>` | Source rules file or skills directory | required |
|
|
79
|
+
| `--to <agents>` | Target agents (comma-separated or `all`) | `all` |
|
|
80
|
+
| `--strategy <s>` | `skip`, `overwrite`, or `merge` | `skip` |
|
|
81
|
+
| `--method <m>` | `copy` or `symlink` | `copy` |
|
|
82
|
+
| `--global` | Sync global rules/skills | `false` |
|
|
83
|
+
| `--dry-run` | Preview without writing | `false` |
|
|
84
|
+
|
|
85
|
+
## Strategies
|
|
86
|
+
|
|
87
|
+
- **skip** (default) — never overwrites existing files
|
|
88
|
+
- **overwrite** — replaces existing files with source content
|
|
89
|
+
- **merge** — appends source content to existing files
|
|
90
|
+
|
|
91
|
+
## Config
|
|
92
|
+
|
|
93
|
+
Optional config at `~/.agents/agent-dotfiles.json`:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mergeStrategy": "skip",
|
|
98
|
+
"writeMethod": "copy"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## How It Works
|
|
103
|
+
|
|
104
|
+
`agent-dotfiles` is a **propagator**, not a creator. It reads your existing rules files and syncs them to agent-specific locations. Smart enough to skip agents that already natively read your source file.
|
|
105
|
+
|
|
106
|
+
For example, syncing from `AGENTS.md`:
|
|
107
|
+
- **Skips** CommandCode, Cursor, Codex, OpenCode (they already read `AGENTS.md`)
|
|
108
|
+
- **Creates** `CLAUDE.md` for Claude Code (it only reads `CLAUDE.md`)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT
|
|
113
|
+
|
|
114
|
+
---
|
|
4
115
|
|
|
5
|
-
|
|
116
|
+
Built by [Saqib](https://saqibameen.com) with [CommandCode](https://commandcode.ai)
|