@agents-dev/cli 0.7.7
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/AGENTS.md +400 -0
- package/CHANGELOG.md +297 -0
- package/CONTRIBUTING.md +164 -0
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/bin/agents +24 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +282 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/connect.d.ts +7 -0
- package/dist/commands/connect.js +48 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/disconnect.d.ts +7 -0
- package/dist/commands/disconnect.js +47 -0
- package/dist/commands/disconnect.js.map +1 -0
- package/dist/commands/doctor.d.ts +6 -0
- package/dist/commands/doctor.js +430 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.js +24 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp-add.d.ts +20 -0
- package/dist/commands/mcp-add.js +250 -0
- package/dist/commands/mcp-add.js.map +1 -0
- package/dist/commands/mcp-import.d.ts +13 -0
- package/dist/commands/mcp-import.js +207 -0
- package/dist/commands/mcp-import.js.map +1 -0
- package/dist/commands/mcp-list.d.ts +5 -0
- package/dist/commands/mcp-list.js +34 -0
- package/dist/commands/mcp-list.js.map +1 -0
- package/dist/commands/mcp-remove.d.ts +7 -0
- package/dist/commands/mcp-remove.js +34 -0
- package/dist/commands/mcp-remove.js.map +1 -0
- package/dist/commands/mcp-test.d.ts +8 -0
- package/dist/commands/mcp-test.js +402 -0
- package/dist/commands/mcp-test.js.map +1 -0
- package/dist/commands/reset.d.ts +6 -0
- package/dist/commands/reset.js +76 -0
- package/dist/commands/reset.js.map +1 -0
- package/dist/commands/start.d.ts +6 -0
- package/dist/commands/start.js +292 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.js +278 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/sync.js +22 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/watch.d.ts +7 -0
- package/dist/commands/watch.js +117 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/core/claudeCli.d.ts +7 -0
- package/dist/core/claudeCli.js +35 -0
- package/dist/core/claudeCli.js.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.js +121 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/cursorCli.d.ts +9 -0
- package/dist/core/cursorCli.js +60 -0
- package/dist/core/cursorCli.js.map +1 -0
- package/dist/core/fs.d.ts +11 -0
- package/dist/core/fs.js +76 -0
- package/dist/core/fs.js.map +1 -0
- package/dist/core/gitignore.d.ts +3 -0
- package/dist/core/gitignore.js +54 -0
- package/dist/core/gitignore.js.map +1 -0
- package/dist/core/mcp.d.ts +8 -0
- package/dist/core/mcp.js +134 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/mcpCrud.d.ts +34 -0
- package/dist/core/mcpCrud.js +105 -0
- package/dist/core/mcpCrud.js.map +1 -0
- package/dist/core/mcpImport.d.ts +14 -0
- package/dist/core/mcpImport.js +507 -0
- package/dist/core/mcpImport.js.map +1 -0
- package/dist/core/mcpSecrets.d.ts +27 -0
- package/dist/core/mcpSecrets.js +144 -0
- package/dist/core/mcpSecrets.js.map +1 -0
- package/dist/core/mcpValidation.d.ts +19 -0
- package/dist/core/mcpValidation.js +78 -0
- package/dist/core/mcpValidation.js.map +1 -0
- package/dist/core/paths.d.ts +37 -0
- package/dist/core/paths.js +43 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/project.d.ts +16 -0
- package/dist/core/project.js +34 -0
- package/dist/core/project.js.map +1 -0
- package/dist/core/renderers.d.ts +14 -0
- package/dist/core/renderers.js +113 -0
- package/dist/core/renderers.js.map +1 -0
- package/dist/core/shell.d.ts +8 -0
- package/dist/core/shell.js +21 -0
- package/dist/core/shell.js.map +1 -0
- package/dist/core/shellWords.d.ts +1 -0
- package/dist/core/shellWords.js +84 -0
- package/dist/core/shellWords.js.map +1 -0
- package/dist/core/skills.d.ts +8 -0
- package/dist/core/skills.js +150 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/skillsValidation.d.ts +1 -0
- package/dist/core/skillsValidation.js +68 -0
- package/dist/core/skillsValidation.js.map +1 -0
- package/dist/core/sync.d.ts +2 -0
- package/dist/core/sync.js +427 -0
- package/dist/core/sync.js.map +1 -0
- package/dist/core/syncLock.d.ts +1 -0
- package/dist/core/syncLock.js +84 -0
- package/dist/core/syncLock.js.map +1 -0
- package/dist/core/templates.d.ts +1 -0
- package/dist/core/templates.js +38 -0
- package/dist/core/templates.js.map +1 -0
- package/dist/core/trust.d.ts +7 -0
- package/dist/core/trust.js +51 -0
- package/dist/core/trust.js.map +1 -0
- package/dist/core/vscodeSettings.d.ts +17 -0
- package/dist/core/vscodeSettings.js +212 -0
- package/dist/core/vscodeSettings.js.map +1 -0
- package/dist/core/warnings.d.ts +2 -0
- package/dist/core/warnings.js +26 -0
- package/dist/core/warnings.js.map +1 -0
- package/dist/integrations/antigravity.d.ts +9 -0
- package/dist/integrations/antigravity.js +13 -0
- package/dist/integrations/antigravity.js.map +1 -0
- package/dist/integrations/claude.d.ts +1 -0
- package/dist/integrations/claude.js +4 -0
- package/dist/integrations/claude.js.map +1 -0
- package/dist/integrations/codex.d.ts +5 -0
- package/dist/integrations/codex.js +5 -0
- package/dist/integrations/codex.js.map +1 -0
- package/dist/integrations/copilotVscode.d.ts +7 -0
- package/dist/integrations/copilotVscode.js +9 -0
- package/dist/integrations/copilotVscode.js.map +1 -0
- package/dist/integrations/cursor.d.ts +7 -0
- package/dist/integrations/cursor.js +9 -0
- package/dist/integrations/cursor.js.map +1 -0
- package/dist/integrations/gemini.d.ts +12 -0
- package/dist/integrations/gemini.js +15 -0
- package/dist/integrations/gemini.js.map +1 -0
- package/dist/integrations/registry.d.ts +9 -0
- package/dist/integrations/registry.js +21 -0
- package/dist/integrations/registry.js.map +1 -0
- package/dist/types.d.ts +85 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/EXAMPLES.md +211 -0
- package/docs/README.md +26 -0
- package/docs/agents-system.md +178 -0
- package/package.json +77 -0
- package/templates/agents/AGENTS.md +23 -0
- package/templates/agents/README.md +25 -0
- package/templates/agents/skills/README.md +27 -0
- package/templates/agents/skills/skill-guide/SKILL.md +29 -0
package/docs/EXAMPLES.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Usage Examples
|
|
2
|
+
|
|
3
|
+
Real-world scenarios.
|
|
4
|
+
|
|
5
|
+
## Solo Developer
|
|
6
|
+
|
|
7
|
+
**Scenario:** You use Cursor + Claude Code
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd ~/my-project
|
|
11
|
+
agents start
|
|
12
|
+
|
|
13
|
+
# Add MCP servers
|
|
14
|
+
agents mcp add https://mcpservers.org/servers/context7-mcp
|
|
15
|
+
agents mcp add https://mcpservers.org/servers/playwright-mcp
|
|
16
|
+
|
|
17
|
+
# Sync
|
|
18
|
+
agents sync
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Daily workflow:**
|
|
22
|
+
```bash
|
|
23
|
+
agents status # Check sync status
|
|
24
|
+
agents watch # Auto-sync changes
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Team Setup
|
|
30
|
+
|
|
31
|
+
**Lead sets up:**
|
|
32
|
+
```bash
|
|
33
|
+
agents start
|
|
34
|
+
agents connect --llm codex,claude,gemini
|
|
35
|
+
|
|
36
|
+
# Add company MCP servers
|
|
37
|
+
agents mcp add company-api \
|
|
38
|
+
--url "https://api.company.com/mcp" \
|
|
39
|
+
--secret-header "Authorization=Bearer {{API_TOKEN}}"
|
|
40
|
+
|
|
41
|
+
# Commit
|
|
42
|
+
git add .agents/ AGENTS.md
|
|
43
|
+
git commit -m "Add agents config"
|
|
44
|
+
git push
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**New member onboards:**
|
|
48
|
+
```bash
|
|
49
|
+
git pull
|
|
50
|
+
agents start # Prompts for API_TOKEN
|
|
51
|
+
# ✅ Done in 30 seconds
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Multiple Projects
|
|
57
|
+
|
|
58
|
+
**Project A (Frontend):**
|
|
59
|
+
```bash
|
|
60
|
+
cd ~/projects/frontend-app
|
|
61
|
+
agents init
|
|
62
|
+
agents connect --llm cursor
|
|
63
|
+
agents mcp add eslint-mcp --command "npx eslint-mcp-server"
|
|
64
|
+
agents sync
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Project B (Backend):**
|
|
68
|
+
```bash
|
|
69
|
+
cd ~/projects/api-server
|
|
70
|
+
agents init
|
|
71
|
+
agents connect --llm claude,gemini
|
|
72
|
+
agents mcp add database-schema --command "db-mcp-server"
|
|
73
|
+
agents sync
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Each project has its own `.agents/` config. No conflicts.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## CI/CD Integration
|
|
81
|
+
|
|
82
|
+
**.github/workflows/validate-agents.yml:**
|
|
83
|
+
```yaml
|
|
84
|
+
name: Validate Agents Config
|
|
85
|
+
|
|
86
|
+
on:
|
|
87
|
+
pull_request:
|
|
88
|
+
paths:
|
|
89
|
+
- '.agents/**'
|
|
90
|
+
|
|
91
|
+
jobs:
|
|
92
|
+
validate:
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
- uses: actions/setup-node@v4
|
|
97
|
+
with:
|
|
98
|
+
node-version: '20'
|
|
99
|
+
- run: npm install -g @agents-dev/cli
|
|
100
|
+
- run: agents doctor
|
|
101
|
+
- run: agents mcp test --json
|
|
102
|
+
- run: agents sync --check
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Monorepo
|
|
108
|
+
|
|
109
|
+
**Root (company-wide servers):**
|
|
110
|
+
```bash
|
|
111
|
+
cd monorepo
|
|
112
|
+
agents init
|
|
113
|
+
agents mcp add company-auth --url "https://auth.company.com/mcp"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Package (package-specific):**
|
|
117
|
+
```bash
|
|
118
|
+
cd packages/frontend
|
|
119
|
+
agents init
|
|
120
|
+
agents mcp add design-system --command "design-mcp-server"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Result:** Inherit root config + add package-specific servers.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Advanced MCP
|
|
128
|
+
|
|
129
|
+
### Add complex server with secrets
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
agents mcp add complex-api \
|
|
133
|
+
--url "https://api.example.com/mcp" \
|
|
134
|
+
--secret-header "Authorization=Bearer {{OAUTH_TOKEN}}" \
|
|
135
|
+
--secret-header "X-API-Key={{API_KEY}}" \
|
|
136
|
+
--header "X-Client-Version=1.0.0"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Prompts for `OAUTH_TOKEN` and `API_KEY`. Stores in `.agents/local.json`.
|
|
140
|
+
|
|
141
|
+
### Test before committing
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Add new server
|
|
145
|
+
agents mcp add experimental --url "https://new-api.com/mcp"
|
|
146
|
+
|
|
147
|
+
# Test
|
|
148
|
+
agents mcp test experimental --runtime
|
|
149
|
+
|
|
150
|
+
# If OK, commit
|
|
151
|
+
git add .agents/agents.json
|
|
152
|
+
git commit -m "Add experimental MCP"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Target specific tool
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Claude-only server
|
|
159
|
+
agents mcp add claude-artifacts \
|
|
160
|
+
--url "https://artifacts.anthropic.com/mcp" \
|
|
161
|
+
--target claude
|
|
162
|
+
|
|
163
|
+
# Universal server
|
|
164
|
+
agents mcp add context7 \
|
|
165
|
+
--url "https://context7.com/mcp"
|
|
166
|
+
|
|
167
|
+
agents sync
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Result:**
|
|
171
|
+
- Claude: `claude-artifacts` + `context7`
|
|
172
|
+
- Cursor: `context7` only
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Scripting
|
|
177
|
+
|
|
178
|
+
### Rotate MCP token daily
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
#!/bin/bash
|
|
182
|
+
# rotate-mcp-token.sh
|
|
183
|
+
|
|
184
|
+
NEW_TOKEN=$(curl -s https://auth.company.com/token)
|
|
185
|
+
|
|
186
|
+
jq ".mcpServers.companyApi.env.API_TOKEN = \"$NEW_TOKEN\"" \
|
|
187
|
+
.agents/local.json > .agents/local.json.tmp
|
|
188
|
+
mv .agents/local.json.tmp .agents/local.json
|
|
189
|
+
|
|
190
|
+
agents sync
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Status in shell prompt
|
|
194
|
+
|
|
195
|
+
Add to `.bashrc`:
|
|
196
|
+
```bash
|
|
197
|
+
agents_prompt() {
|
|
198
|
+
if [ -d ".agents" ]; then
|
|
199
|
+
STATUS=$(agents status --fast --json 2>/dev/null | jq -r '.status')
|
|
200
|
+
[ "$STATUS" = "synced" ] && echo " 🟢" || echo " 🟡"
|
|
201
|
+
fi
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
PS1='$(agents_prompt) '"$PS1"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## More Examples?
|
|
210
|
+
|
|
211
|
+
[Open a discussion](https://github.com/amtiYo/agents/discussions) and share your workflow!
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
## Available Docs
|
|
4
|
+
|
|
5
|
+
| Document | Description |
|
|
6
|
+
|:---------|:------------|
|
|
7
|
+
| [Usage Examples](EXAMPLES.md) | Real-world scenarios |
|
|
8
|
+
| [System Design](agents-system.md) | Technical architecture |
|
|
9
|
+
|
|
10
|
+
## External Resources
|
|
11
|
+
|
|
12
|
+
### Standards
|
|
13
|
+
- [AGENTS.md](https://agents.md)
|
|
14
|
+
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
15
|
+
|
|
16
|
+
### Tools
|
|
17
|
+
- [Codex](https://developers.openai.com/codex) | [Claude Code](https://code.claude.com/docs) | [Gemini CLI](https://geminicli.com/docs)
|
|
18
|
+
- [Cursor](https://cursor.com/docs) | [Copilot](https://github.com/features/copilot) | [Antigravity](https://antigravity.google/docs)
|
|
19
|
+
|
|
20
|
+
## Contributing
|
|
21
|
+
|
|
22
|
+
See [CONTRIBUTING.md](../CONTRIBUTING.md)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
**Questions?** [Issues](https://github.com/amtiYo/agents/issues) | [Discussions](https://github.com/amtiYo/agents/discussions)
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# System Architecture
|
|
2
|
+
|
|
3
|
+
Technical blueprint for advanced users.
|
|
4
|
+
|
|
5
|
+
## Problem
|
|
6
|
+
|
|
7
|
+
| Issue | Impact |
|
|
8
|
+
|:------|:-------|
|
|
9
|
+
| Different instruction formats | `.cursorrules`, `CLAUDE.md`, `AGENTS.md` |
|
|
10
|
+
| Different MCP configs | TOML, JSON, different schemas |
|
|
11
|
+
| Different skill packaging | Incompatible formats |
|
|
12
|
+
|
|
13
|
+
**Result:** Setup cost ↑, drift across teams ↑
|
|
14
|
+
|
|
15
|
+
## Solution
|
|
16
|
+
|
|
17
|
+
`agents` provides **one source of truth**:
|
|
18
|
+
|
|
19
|
+
| Component | Purpose |
|
|
20
|
+
|:----------|:--------|
|
|
21
|
+
| `AGENTS.md` | Instructions (all tools) |
|
|
22
|
+
| `.agents/agents.json` | MCP servers (shared) |
|
|
23
|
+
| `.agents/local.json` | Secrets (gitignored) |
|
|
24
|
+
| `.agents/skills/` | Reusable workflows |
|
|
25
|
+
|
|
26
|
+
## Core Principles
|
|
27
|
+
|
|
28
|
+
- ✅ Single source of truth in `.agents/`
|
|
29
|
+
- ✅ Root `AGENTS.md` is canonical
|
|
30
|
+
- ✅ One command setup: `agents start`
|
|
31
|
+
- ✅ Deterministic sync to tool configs
|
|
32
|
+
- ✅ Source-only git strategy (default)
|
|
33
|
+
|
|
34
|
+
## File Structure
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
project/
|
|
38
|
+
├── AGENTS.md # Instructions
|
|
39
|
+
├── .agents/
|
|
40
|
+
│ ├── agents.json # MCP servers (committed)
|
|
41
|
+
│ ├── local.json # Secrets (gitignored)
|
|
42
|
+
│ ├── skills/ # Workflows
|
|
43
|
+
│ └── generated/ # Auto-generated (gitignored)
|
|
44
|
+
├── .codex/ # Materialized (gitignored)
|
|
45
|
+
├── .claude/ # Materialized (gitignored)
|
|
46
|
+
├── .cursor/ # Materialized (gitignored)
|
|
47
|
+
└── ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Command Flow
|
|
51
|
+
|
|
52
|
+
| Command | What It Does |
|
|
53
|
+
|:--------|:-------------|
|
|
54
|
+
| `agents start` | Interactive setup + trust/approval confirmations |
|
|
55
|
+
| `agents status` | Check connection status |
|
|
56
|
+
| `agents doctor` | Validate configs |
|
|
57
|
+
| `agents sync` | Generate tool-specific configs |
|
|
58
|
+
| `agents watch` | Auto-sync on changes |
|
|
59
|
+
| `agents mcp add <url>` | Add MCP server |
|
|
60
|
+
| `agents mcp test --runtime` | Live connectivity check |
|
|
61
|
+
|
|
62
|
+
## Integration Mapping
|
|
63
|
+
|
|
64
|
+
| Tool | Generated Config |
|
|
65
|
+
|:-----|:-----------------|
|
|
66
|
+
| **Codex** | `.codex/config.toml` |
|
|
67
|
+
| **Claude** | `claude mcp add -s local` (CLI) |
|
|
68
|
+
| **Gemini** | `.gemini/settings.json` |
|
|
69
|
+
| **Cursor** | `.cursor/mcp.json` + CLI enable |
|
|
70
|
+
| **Copilot** | `.vscode/mcp.json` |
|
|
71
|
+
| **Antigravity** | `.antigravity/mcp.json` |
|
|
72
|
+
|
|
73
|
+
## VS Code Integration
|
|
74
|
+
|
|
75
|
+
**Managed in `.vscode/settings.json`:**
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"files.exclude": {
|
|
79
|
+
"**/.codex": true,
|
|
80
|
+
"**/.claude": true,
|
|
81
|
+
"**/.cursor": true,
|
|
82
|
+
"**/.gemini": true,
|
|
83
|
+
"**/.antigravity": true,
|
|
84
|
+
"**/.agents/generated": true
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**State tracking:** `.agents/generated/vscode.settings.state.json`
|
|
90
|
+
|
|
91
|
+
## Skills Sync
|
|
92
|
+
|
|
93
|
+
| Tool | Location |
|
|
94
|
+
|:-----|:---------|
|
|
95
|
+
| **Source** | `.agents/skills/*/SKILL.md` |
|
|
96
|
+
| **Codex** | Reads `.agents/skills/` directly |
|
|
97
|
+
| **Claude** | Symlink to `.claude/skills/` |
|
|
98
|
+
| **Cursor** | Symlink to `.cursor/skills/` |
|
|
99
|
+
| **Gemini** | Symlink to `.gemini/skills/` |
|
|
100
|
+
|
|
101
|
+
**Validation:** `agents doctor` checks frontmatter (`name`, `description`)
|
|
102
|
+
|
|
103
|
+
## Reset Options
|
|
104
|
+
|
|
105
|
+
| Command | Effect |
|
|
106
|
+
|:--------|:-------|
|
|
107
|
+
| `agents reset` | Remove generated files, keep `.agents/` |
|
|
108
|
+
| `agents reset --local-only` | Remove tool configs only |
|
|
109
|
+
| `agents reset --hard` | Remove everything (`.agents/`, `AGENTS.md`, gitignore entries) |
|
|
110
|
+
|
|
111
|
+
## Security Model
|
|
112
|
+
|
|
113
|
+
| Type | Storage |
|
|
114
|
+
|:-----|:--------|
|
|
115
|
+
| **Shared config** | `.agents/agents.json` (committed) |
|
|
116
|
+
| **Secrets** | `.agents/local.json` (gitignored) |
|
|
117
|
+
| **Validation** | Fail-fast on invalid env/header keys |
|
|
118
|
+
|
|
119
|
+
**Rules:**
|
|
120
|
+
- ❌ No secrets in git
|
|
121
|
+
- ✅ Secrets in `.agents/local.json`
|
|
122
|
+
- ✅ Strict key validation (shell-safe for env, HTTP token for headers)
|
|
123
|
+
|
|
124
|
+
## Sync Process
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
1. Read .agents/agents.json
|
|
128
|
+
2. Merge with .agents/local.json
|
|
129
|
+
3. Generate tool-specific configs
|
|
130
|
+
4. Write atomically (temp + rename)
|
|
131
|
+
5. Acquire lock (prevent race conditions)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## MCP Server Format
|
|
135
|
+
|
|
136
|
+
**stdio transport:**
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"transport": "stdio",
|
|
140
|
+
"command": "npx",
|
|
141
|
+
"args": ["@modelcontextprotocol/server-filesystem", "/path"]
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**http/sse transport:**
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"transport": "http",
|
|
149
|
+
"url": "https://api.example.com/mcp"
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**With secrets:**
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"transport": "http",
|
|
157
|
+
"url": "https://api.example.com/mcp",
|
|
158
|
+
"env": {
|
|
159
|
+
"API_KEY": "{{API_KEY}}" // Prompt for value
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Git Strategy
|
|
165
|
+
|
|
166
|
+
**Committed:**
|
|
167
|
+
- ✅ `.agents/agents.json`
|
|
168
|
+
- ✅ `.agents/skills/`
|
|
169
|
+
- ✅ `AGENTS.md`
|
|
170
|
+
|
|
171
|
+
**Gitignored:**
|
|
172
|
+
- ❌ `.agents/local.json`
|
|
173
|
+
- ❌ `.agents/generated/`
|
|
174
|
+
- ❌ `.codex/`, `.claude/`, `.cursor/`, `.gemini/`, `.antigravity/`
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
**Deep dive?** See [AGENTS.md](../AGENTS.md) for implementation details.
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agents-dev/cli",
|
|
3
|
+
"version": "0.7.7",
|
|
4
|
+
"description": "One config to rule them all — Practical standard layer for multi-LLM development. Sync MCP servers, skills, and AGENTS.md across Codex, Claude Code, Gemini CLI, Cursor, Copilot, and Antigravity.",
|
|
5
|
+
"main": "dist/cli.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -p tsconfig.json",
|
|
8
|
+
"dev": "tsx src/cli.ts",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"prepack": "npm run build"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"agents": "bin/agents"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"bin/",
|
|
18
|
+
"dist/",
|
|
19
|
+
"templates/",
|
|
20
|
+
"docs/",
|
|
21
|
+
"README.md",
|
|
22
|
+
"AGENTS.md",
|
|
23
|
+
"CHANGELOG.md",
|
|
24
|
+
"CONTRIBUTING.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"agents",
|
|
29
|
+
"mcp",
|
|
30
|
+
"model-context-protocol",
|
|
31
|
+
"agents-md",
|
|
32
|
+
"codex",
|
|
33
|
+
"claude-code",
|
|
34
|
+
"gemini-cli",
|
|
35
|
+
"cursor",
|
|
36
|
+
"copilot",
|
|
37
|
+
"antigravity",
|
|
38
|
+
"ai-coding",
|
|
39
|
+
"llm-tools",
|
|
40
|
+
"config-sync",
|
|
41
|
+
"multi-llm",
|
|
42
|
+
"agentic-ai",
|
|
43
|
+
"cli"
|
|
44
|
+
],
|
|
45
|
+
"author": "amtiYo",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/amtiYo/agents.git"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/amtiYo/agents/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/amtiYo/agents#readme",
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"type": "module",
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=20.0.0"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@clack/prompts": "^1.0.0",
|
|
61
|
+
"@iarna/toml": "^2.2.5",
|
|
62
|
+
"commander": "^14.0.3",
|
|
63
|
+
"jsonc-parser": "^3.3.1",
|
|
64
|
+
"picocolors": "^1.1.1",
|
|
65
|
+
"prompts": "^2.4.2"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/node": "^25.2.0",
|
|
69
|
+
"@types/prompts": "^2.4.9",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
71
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
72
|
+
"eslint": "^9.39.2",
|
|
73
|
+
"tsx": "^4.21.0",
|
|
74
|
+
"typescript": "^5.9.3",
|
|
75
|
+
"vitest": "^4.0.18"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Mission
|
|
2
|
+
Deliver correct, maintainable changes with minimal risk.
|
|
3
|
+
|
|
4
|
+
## Scope
|
|
5
|
+
- Respect repository architecture and conventions.
|
|
6
|
+
- Keep edits focused; avoid unrelated refactors.
|
|
7
|
+
- Never commit secrets.
|
|
8
|
+
|
|
9
|
+
## Engineering Rules
|
|
10
|
+
- Validate changes with relevant checks before final delivery.
|
|
11
|
+
- Surface assumptions and edge cases explicitly.
|
|
12
|
+
- Prefer reversible changes and deterministic outputs.
|
|
13
|
+
|
|
14
|
+
## MCP & Skills
|
|
15
|
+
- MCP server definitions: `.agents/agents.json`
|
|
16
|
+
- Local MCP overrides/secrets: `.agents/local.json`
|
|
17
|
+
- Project skills: `.agents/skills/*/SKILL.md`
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
1. Plan briefly.
|
|
21
|
+
2. Implement minimal viable change.
|
|
22
|
+
3. Validate (lint/tests/build/smoke as needed).
|
|
23
|
+
4. Report results and residual risks.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# .agents
|
|
2
|
+
|
|
3
|
+
Project-local standard for AGENTS.md + MCP + SKILLS.
|
|
4
|
+
|
|
5
|
+
## Source files (commit these)
|
|
6
|
+
- `agents.json`: selected integrations + MCP servers + workspace behavior
|
|
7
|
+
- `skills/*/SKILL.md`: project skills
|
|
8
|
+
|
|
9
|
+
## Root instruction file
|
|
10
|
+
- `../AGENTS.md`: canonical instruction document
|
|
11
|
+
|
|
12
|
+
## Local/private files (do not commit)
|
|
13
|
+
- `local.json`: machine-specific MCP overrides and secrets
|
|
14
|
+
|
|
15
|
+
## Generated files
|
|
16
|
+
- `generated/*`: renderer outputs used by `agents sync`
|
|
17
|
+
- `generated/vscode.settings.state.json`: managed VS Code hide state
|
|
18
|
+
|
|
19
|
+
## Common materialized outputs
|
|
20
|
+
- `.codex/config.toml`
|
|
21
|
+
- `.gemini/settings.json`
|
|
22
|
+
- `.vscode/mcp.json`
|
|
23
|
+
- `.vscode/settings.json`
|
|
24
|
+
- `.cursor/mcp.json`
|
|
25
|
+
- `.antigravity/mcp.json`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Skills Folder
|
|
2
|
+
|
|
3
|
+
This directory stores project skills used across supported LLM tools.
|
|
4
|
+
|
|
5
|
+
## Skill structure
|
|
6
|
+
Each skill must live in its own folder and contain `SKILL.md`:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
.agents/skills/<skill-id>/SKILL.md
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Minimal SKILL.md template
|
|
13
|
+
```md
|
|
14
|
+
---
|
|
15
|
+
name: my-skill
|
|
16
|
+
description: When this skill should be used.
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
Step-by-step instructions for the agent.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep skills narrow and reusable. Prefer one clear outcome per skill.
|
|
23
|
+
|
|
24
|
+
## Recommended conventions
|
|
25
|
+
- Directory name should match frontmatter `name`.
|
|
26
|
+
- Use kebab-case for `name` (lowercase letters, numbers, `-`).
|
|
27
|
+
- Keep `description` specific so tools can trigger the skill correctly.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-guide
|
|
3
|
+
description: Explain how to create, organize, and maintain skills in .agents/skills when the user asks about skills.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
When asked about skills:
|
|
7
|
+
|
|
8
|
+
1. Explain required structure:
|
|
9
|
+
- One directory per skill under `.agents/skills`.
|
|
10
|
+
- A required `SKILL.md` file with YAML frontmatter.
|
|
11
|
+
|
|
12
|
+
2. Explain required frontmatter:
|
|
13
|
+
- `name`: short unique identifier.
|
|
14
|
+
- `description`: explicit trigger guidance for when the skill should be used.
|
|
15
|
+
|
|
16
|
+
3. Provide a minimal starter template and ask for:
|
|
17
|
+
- the task scope,
|
|
18
|
+
- expected input/output,
|
|
19
|
+
- success criteria.
|
|
20
|
+
|
|
21
|
+
4. Recommend progressive disclosure:
|
|
22
|
+
- keep `SKILL.md` concise,
|
|
23
|
+
- put large references/examples in separate files.
|
|
24
|
+
|
|
25
|
+
5. Suggest validation checklist:
|
|
26
|
+
- clear trigger description,
|
|
27
|
+
- deterministic steps,
|
|
28
|
+
- no secrets in skill files,
|
|
29
|
+
- tested with at least one real prompt.
|