@joehom/awm-cli 0.0.1
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 +666 -0
- package/bin/awm.js +2 -0
- package/package.json +25 -0
- package/skills/awm-cli/SKILL.md +189 -0
- package/src/adapters/jsonAdapter.js +54 -0
- package/src/adapters/skillApplier.js +35 -0
- package/src/adapters/tomlAdapter.js +49 -0
- package/src/commands/doctor.js +100 -0
- package/src/commands/init.js +34 -0
- package/src/commands/mcp.js +253 -0
- package/src/commands/pull.js +168 -0
- package/src/commands/setup.js +31 -0
- package/src/commands/skill.js +187 -0
- package/src/commands/status.js +17 -0
- package/src/commands/tool.js +45 -0
- package/src/defaults/mcps/fetch.json +6 -0
- package/src/defaults/mcps/filesystem.json +6 -0
- package/src/defaults/mcps/github.json +9 -0
- package/src/defaults/mcps/memory.json +6 -0
- package/src/defaults/skills/awm-cli/SKILL.md +189 -0
- package/src/defaults/tools/claude-code.json +27 -0
- package/src/defaults/tools/codex.json +27 -0
- package/src/defaults/tools/copilot-cli.json +18 -0
- package/src/defaults/tools/cursor.json +27 -0
- package/src/defaults/tools/gemini-cli.json +27 -0
- package/src/defaults/tools/github-copilot.json +23 -0
- package/src/defaults/tools/windsurf.json +23 -0
- package/src/index.js +35 -0
- package/src/registry/mcpRegistry.js +68 -0
- package/src/registry/paths.js +21 -0
- package/src/registry/skillRegistry.js +61 -0
- package/src/registry/toolRegistry.js +43 -0
- package/src/seed.js +131 -0
- package/src/tools/claude-code.json +27 -0
- package/src/tools/codex.json +27 -0
- package/src/tools/copilot-cli.json +15 -0
- package/src/tools/cursor.json +27 -0
- package/src/tools/gemini-cli.json +27 -0
- package/src/tools/github-copilot.json +23 -0
- package/src/tools/windsurf.json +23 -0
- package/src/utils/fileUtils.js +76 -0
- package/src/utils/logger.js +17 -0
- package/src/utils/pathResolver.js +40 -0
- package/src/utils/validator.js +68 -0
- package/src/workspace/applyWorkspace.js +81 -0
- package/src/workspace/workspaceConfig.js +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# AWM — Agent Workspace Manager
|
|
2
|
+
|
|
3
|
+
A local-first CLI for managing MCP servers and skills across AI coding tools.
|
|
4
|
+
|
|
5
|
+
AWM keeps a **central registry** of MCPs and skills in `~/.agent-workspace/registry/`. Each project has a `.awm.json` file that declares which tools, MCPs, and skills it uses. Running `awm mcp add` or `awm skill add` updates `.awm.json` and immediately writes the right config files for every listed tool.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Core Concepts](#core-concepts)
|
|
13
|
+
- [Quick Start](#quick-start)
|
|
14
|
+
- [Workspace Commands](#workspace-commands)
|
|
15
|
+
- [MCP Commands](#mcp-commands)
|
|
16
|
+
- [Skill Commands](#skill-commands)
|
|
17
|
+
- [Tool Command](#tool-command)
|
|
18
|
+
- [Doctor Command](#doctor-command)
|
|
19
|
+
- [Setup Command](#setup-command)
|
|
20
|
+
- [Pull Command](#pull-command)
|
|
21
|
+
- [Workspace Config (.awm.json)](#workspace-config-awmjson)
|
|
22
|
+
- [Registry Layout](#registry-layout)
|
|
23
|
+
- [MCP Definition Format](#mcp-definition-format)
|
|
24
|
+
- [Supported Tools](#supported-tools)
|
|
25
|
+
- [Environment Variables](#environment-variables)
|
|
26
|
+
- [Adding a Custom Tool](#adding-a-custom-tool)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
**Requirements:** Node.js 18 or later.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Clone and install dependencies
|
|
36
|
+
git clone <repo-url>
|
|
37
|
+
cd nano-ai-workspace-manager
|
|
38
|
+
npm install
|
|
39
|
+
|
|
40
|
+
# Use directly
|
|
41
|
+
node bin/awm.js --help
|
|
42
|
+
|
|
43
|
+
# Or install globally
|
|
44
|
+
npm install -g .
|
|
45
|
+
awm --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
On install, default MCPs (`github`, `filesystem`, `memory`, `fetch`) and the `awm-cli` skill are seeded into the registry automatically.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Core Concepts
|
|
53
|
+
|
|
54
|
+
| Concept | What it is |
|
|
55
|
+
|---------|-----------|
|
|
56
|
+
| **MCP** | A Model Context Protocol server definition stored in the global registry. Describes how to launch a server (command, args, env vars). |
|
|
57
|
+
| **Skill** | A folder of instruction files for an AI tool. The registry stores the canonical copy; `skill add` copies it into your project. |
|
|
58
|
+
| **Workspace** | A `.awm.json` file at your project root listing which tools, MCPs, and skills are active for that project. |
|
|
59
|
+
| **Tool** | A JSON definition that tells AWM where each AI tool stores its MCP config and skill folder. |
|
|
60
|
+
|
|
61
|
+
The registry is the single source of truth. Tool config files (`.mcp.json`, `.cursor/mcp.json`, etc.) are **generated output** — AWM regenerates them whenever you add or remove MCPs/skills.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Quick Start
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# 1. Go to your project
|
|
69
|
+
cd /path/to/your/project
|
|
70
|
+
|
|
71
|
+
# 2. Initialise workspace — pick which tools to support
|
|
72
|
+
awm init
|
|
73
|
+
|
|
74
|
+
# 3. Add MCPs (checkbox list, auto-applied to all tools)
|
|
75
|
+
awm mcp add
|
|
76
|
+
|
|
77
|
+
# 4. Add skills (checkbox list, auto-applied to all tools)
|
|
78
|
+
awm skill add
|
|
79
|
+
|
|
80
|
+
# 5. Check the workspace state
|
|
81
|
+
awm status
|
|
82
|
+
|
|
83
|
+
# 6. Validate everything is healthy
|
|
84
|
+
awm doctor
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Workspace Commands
|
|
90
|
+
|
|
91
|
+
### `awm init [--force]`
|
|
92
|
+
|
|
93
|
+
Create a `.awm.json` in the current directory. Presents a checkbox list of all known tools — select the ones your project uses.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
awm init
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
? Select tools to support in this workspace: (Press <space> to select)
|
|
101
|
+
❯◯ claude-code
|
|
102
|
+
◯ codex
|
|
103
|
+
◯ cursor
|
|
104
|
+
◯ gemini-cli
|
|
105
|
+
◯ github-copilot
|
|
106
|
+
◯ windsurf
|
|
107
|
+
|
|
108
|
+
[ok] Workspace initialized with tools: claude-code, cursor
|
|
109
|
+
Run "awm mcp add" to add MCPs, "awm skill add" to add skills.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Use `--force` to overwrite an existing `.awm.json`.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### `awm status`
|
|
117
|
+
|
|
118
|
+
Show the current workspace state from `.awm.json`.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
awm status
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Workspace status:
|
|
126
|
+
Tools: claude-code, cursor
|
|
127
|
+
MCPs: fetch, memory
|
|
128
|
+
Skills: awm-cli
|
|
129
|
+
lastSync: 2026-03-08T12:00:00Z
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## MCP Commands
|
|
135
|
+
|
|
136
|
+
MCP definitions are stored as JSON files at `~/.agent-workspace/registry/mcps/<id>.json`.
|
|
137
|
+
|
|
138
|
+
### `awm mcp register [id]`
|
|
139
|
+
|
|
140
|
+
Interactively register an MCP server into the global registry. Supply `[id]` to skip the ID prompt.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
awm mcp register
|
|
144
|
+
awm mcp register github
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
| Prompt | Description |
|
|
148
|
+
|--------|-------------|
|
|
149
|
+
| MCP ID | Unique slug, e.g. `github`, `postgres-dev` |
|
|
150
|
+
| Transport | `stdio` · `sse` · `http` |
|
|
151
|
+
| Command | Executable to run, e.g. `npx`, `node`, `uvx` |
|
|
152
|
+
| Args | Space-separated arguments |
|
|
153
|
+
| Env vars | Space-separated `KEY=VALUE` pairs |
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
? MCP ID (unique slug): github
|
|
157
|
+
? Transport: stdio
|
|
158
|
+
? Command: npx
|
|
159
|
+
? Args: -y @modelcontextprotocol/server-github
|
|
160
|
+
? Env vars: GITHUB_PERSONAL_ACCESS_TOKEN=${env:GITHUB_TOKEN}
|
|
161
|
+
[ok] MCP "github" registered in global registry
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### `awm mcp unregister <id>`
|
|
167
|
+
|
|
168
|
+
Remove an MCP from the global registry. Does not affect `.awm.json` or any config files already written.
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
awm mcp unregister github
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### `awm mcp import`
|
|
177
|
+
|
|
178
|
+
Scan the current directory for existing tool config files and register any MCP entries found into the global registry. Skips MCPs already in the registry.
|
|
179
|
+
|
|
180
|
+
Files scanned:
|
|
181
|
+
|
|
182
|
+
| File | Tool |
|
|
183
|
+
|------|------|
|
|
184
|
+
| `.mcp.json` | Claude Code |
|
|
185
|
+
| `.cursor/mcp.json` | Cursor |
|
|
186
|
+
| `.gemini/settings.json` | Gemini CLI |
|
|
187
|
+
| `.vscode/mcp.json` | GitHub Copilot |
|
|
188
|
+
| `~/.copilot/mcp-config.json` | Copilot CLI |
|
|
189
|
+
| `~/.codeium/windsurf/mcp_config.json` | Windsurf |
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
awm mcp import
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
[ok] Registered "fetch" from .mcp.json
|
|
197
|
+
Skipping "memory" (already in registry)
|
|
198
|
+
Import complete: 1 registered, 1 skipped.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### `awm mcp add [--dry-run]`
|
|
204
|
+
|
|
205
|
+
Select MCPs from the global registry to add to this workspace. After selection, AWM writes them to every tool config file listed in `.awm.json`.
|
|
206
|
+
|
|
207
|
+
Press **ESC** or **Ctrl+C** to cancel without making changes.
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
awm mcp add
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
? Select MCPs to add to this workspace: (Press <space> to select)
|
|
215
|
+
❯◯ fetch
|
|
216
|
+
◯ memory
|
|
217
|
+
◯ github
|
|
218
|
+
|
|
219
|
+
[ok] Wrote 2 MCP(s) to .mcp.json
|
|
220
|
+
[ok] Wrote 2 MCP(s) to .cursor/mcp.json
|
|
221
|
+
[ok] Added MCPs: fetch, memory
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Use `--dry-run` to preview what would be written without touching any files.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### `awm mcp delete [--dry-run]`
|
|
229
|
+
|
|
230
|
+
Select MCPs to remove from this workspace. AWM re-applies the remaining MCPs to all tool config files (overwriting the MCP section).
|
|
231
|
+
|
|
232
|
+
Press **ESC** or **Ctrl+C** to cancel.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
awm mcp delete
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
? Select MCPs to remove from this workspace: (Press <space> to select)
|
|
240
|
+
❯◉ fetch
|
|
241
|
+
◯ memory
|
|
242
|
+
|
|
243
|
+
[ok] Wrote 1 MCP(s) to .mcp.json
|
|
244
|
+
[ok] Removed MCPs: fetch
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### `awm mcp list [-g]`
|
|
250
|
+
|
|
251
|
+
List MCPs in the current workspace. Add `-g` / `--global` to list the global registry instead.
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
awm mcp list # workspace MCPs
|
|
255
|
+
awm mcp list -g # all registry MCPs
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Workspace MCPs:
|
|
260
|
+
fetch
|
|
261
|
+
memory
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
### `awm mcp show <id>`
|
|
267
|
+
|
|
268
|
+
Print the full stored definition for an MCP.
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
awm mcp show github
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
```json
|
|
275
|
+
{
|
|
276
|
+
"id": "github",
|
|
277
|
+
"transport": "stdio",
|
|
278
|
+
"command": "npx",
|
|
279
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
280
|
+
"env": {
|
|
281
|
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${env:GITHUB_TOKEN}"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Skill Commands
|
|
289
|
+
|
|
290
|
+
Skills are stored as directories at `~/.agent-workspace/registry/skills/<name>/`. Each must contain a `SKILL.md` file.
|
|
291
|
+
|
|
292
|
+
### `awm skill register <name> --from <path>`
|
|
293
|
+
|
|
294
|
+
Register a skill from a local directory or a single `.md` file into the global registry.
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# From a directory (must contain SKILL.md)
|
|
298
|
+
awm skill register clean-arch --from ./my-skills/clean-arch/
|
|
299
|
+
|
|
300
|
+
# From a single markdown file
|
|
301
|
+
awm skill register tdd-guide --from ./tdd.md
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
[ok] Skill "clean-arch" registered in global registry
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
### `awm skill unregister <name>`
|
|
311
|
+
|
|
312
|
+
Remove a skill from the global registry. Does not delete copies already written into projects.
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
awm skill unregister tdd-guide
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### `awm skill import`
|
|
321
|
+
|
|
322
|
+
Scan the current directory for skill folders and register any found into the global registry. Directories scanned: `.claude/skills/`, `.agents/skills/`.
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
awm skill import
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
[ok] Registered "clean-arch" from .claude/skills
|
|
330
|
+
Skipping "awm-cli" (already in registry)
|
|
331
|
+
Import complete: 1 registered, 1 skipped.
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### `awm skill add [--dry-run]`
|
|
337
|
+
|
|
338
|
+
Select skills from the global registry to add to this workspace. After selection, AWM copies them into every tool's skill directory listed in `.awm.json` (only tools that support skills, e.g. `claude-code`).
|
|
339
|
+
|
|
340
|
+
Press **ESC** or **Ctrl+C** to cancel.
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
awm skill add
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
? Select skills to add to this workspace: (Press <space> to select)
|
|
348
|
+
❯◯ awm-cli
|
|
349
|
+
◯ clean-arch
|
|
350
|
+
|
|
351
|
+
[ok] Copied skill "awm-cli" → .claude/skills/awm-cli
|
|
352
|
+
[ok] Added skills: awm-cli
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
### `awm skill delete`
|
|
358
|
+
|
|
359
|
+
Select skills to remove from this workspace. Updates `.awm.json` only — does not delete files from tool directories.
|
|
360
|
+
|
|
361
|
+
Press **ESC** or **Ctrl+C** to cancel.
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
awm skill delete
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
### `awm skill list [-g]`
|
|
370
|
+
|
|
371
|
+
List skills in the current workspace. Add `-g` / `--global` to list the global registry instead.
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
awm skill list # workspace skills
|
|
375
|
+
awm skill list -g # all registry skills
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
### `awm skill show <name>`
|
|
381
|
+
|
|
382
|
+
Print the `SKILL.md` content for a skill.
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
awm skill show awm-cli
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Tool Command
|
|
391
|
+
|
|
392
|
+
### `awm tool`
|
|
393
|
+
|
|
394
|
+
Open an interactive checkbox list of all known tools. Tools already selected for this workspace are pre-checked. Confirm to save the new tool list to `.awm.json` and resync all MCPs and skills to every selected tool.
|
|
395
|
+
|
|
396
|
+
Press **ESC** or **Ctrl+C** to cancel without changes.
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
awm tool
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
? Select tools for this workspace (space to toggle, enter to confirm):
|
|
404
|
+
❯◉ claude-code
|
|
405
|
+
◯ codex
|
|
406
|
+
◉ cursor
|
|
407
|
+
◯ gemini-cli
|
|
408
|
+
◯ github-copilot
|
|
409
|
+
◯ windsurf
|
|
410
|
+
|
|
411
|
+
Resyncing MCPs and skills to updated tool list...
|
|
412
|
+
[ok] Tools updated: claude-code, cursor
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Doctor Command
|
|
418
|
+
|
|
419
|
+
### `awm doctor`
|
|
420
|
+
|
|
421
|
+
Validate the registry and current workspace for consistency. Checks:
|
|
422
|
+
|
|
423
|
+
- Registry directories exist
|
|
424
|
+
- Every MCP JSON file in the registry is valid (`id`, `transport`, `command`)
|
|
425
|
+
- Every tool definition is structurally valid
|
|
426
|
+
- If `.awm.json` exists in the current directory:
|
|
427
|
+
- Valid JSON with `tools`, `mcps`, `skills` arrays
|
|
428
|
+
- All tool IDs are known
|
|
429
|
+
- All MCP IDs exist in the registry
|
|
430
|
+
- All skill names exist in the registry with a `SKILL.md`
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
awm doctor
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**Clean output:**
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
[ok] No issues found
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Output when issues exist (exit code 1):**
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
[error] .awm.json: MCP "old-server" not found in registry
|
|
446
|
+
[error] .awm.json: skill "missing-skill" not found in registry
|
|
447
|
+
[error] MCP file "broken.json": MCP requires a string "command" field
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
Run `doctor` after manual registry edits or before sharing a project.
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Setup Command
|
|
455
|
+
|
|
456
|
+
### `awm setup [--force]`
|
|
457
|
+
|
|
458
|
+
Re-seed the registry with the default MCPs, skills, and tool definitions bundled with AWM. Already-present entries are skipped unless `--force` is passed.
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
awm setup # skips existing entries
|
|
462
|
+
awm setup --force # overwrites with fresh defaults
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Default MCPs seeded:**
|
|
466
|
+
|
|
467
|
+
| ID | Command | Notes |
|
|
468
|
+
|----|---------|-------|
|
|
469
|
+
| `github` | `npx -y @modelcontextprotocol/server-github` | Needs `GITHUB_TOKEN` env var |
|
|
470
|
+
| `filesystem` | `npx -y @modelcontextprotocol/server-filesystem` | Local file access |
|
|
471
|
+
| `memory` | `npx -y @modelcontextprotocol/server-memory` | Persistent knowledge graph |
|
|
472
|
+
| `fetch` | `uvx mcp-server-fetch` | Web fetching (requires `uv`) |
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Pull Command
|
|
477
|
+
|
|
478
|
+
### `awm pull [type] [--tool <id>] [--force] [--dry-run]`
|
|
479
|
+
|
|
480
|
+
Read each AI tool's **global config files** and register any MCPs or skills found there into the global AWM registry. This is the fastest way to populate the registry from tools you already have configured (e.g. MCPs in `~/.claude.json`, skills in `~/.claude/skills/`).
|
|
481
|
+
|
|
482
|
+
After pulling, use `awm mcp add` / `awm skill add` to activate entries in a workspace.
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
awm pull # pull both skills and MCPs from all tools
|
|
486
|
+
awm pull skills # pull skills only
|
|
487
|
+
awm pull mcps # pull MCPs only
|
|
488
|
+
awm pull --tool claude-code # scope to one tool
|
|
489
|
+
awm pull --force # overwrite existing registry entries
|
|
490
|
+
awm pull --dry-run # preview without making changes
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Example — dry-run across all tools:**
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
[dry-run] Would register MCP "pencil" from claude-code
|
|
497
|
+
[dry-run] Would register skill "clean-arch" from claude-code
|
|
498
|
+
[skill] Skipping "awm-cli" (already registered)
|
|
499
|
+
[dry-run] Would register MCP "pencil" from codex
|
|
500
|
+
MCPs: 2 pulled, 1 skipped | Skills: 1 pulled, 1 skipped
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
**Options:**
|
|
504
|
+
|
|
505
|
+
| Option | Description |
|
|
506
|
+
|--------|-------------|
|
|
507
|
+
| `[type]` | `skills` or `mcps`. Omit to pull both. |
|
|
508
|
+
| `--tool <id>` | Limit to a single tool ID (e.g. `claude-code`, `cursor`). |
|
|
509
|
+
| `--force` | Overwrite entries that already exist in the registry. |
|
|
510
|
+
| `--dry-run` | Show what would be imported without writing anything. |
|
|
511
|
+
|
|
512
|
+
**What gets scanned:**
|
|
513
|
+
|
|
514
|
+
| Tool | Global MCP file | Global skills folder |
|
|
515
|
+
|------|----------------|---------------------|
|
|
516
|
+
| `claude-code` | `~/.claude.json` | `~/.claude/skills/` |
|
|
517
|
+
| `codex` | `~/.codex/config.toml` | `~/.agents/skills/` |
|
|
518
|
+
| `cursor` | `~/.cursor/mcp.json` | `~/.cursor/rules/` |
|
|
519
|
+
| `gemini-cli` | global settings file | global skills folder |
|
|
520
|
+
| `windsurf` | global MCP config | — |
|
|
521
|
+
| `copilot-cli` | global MCP config | — |
|
|
522
|
+
| `github-copilot` | — (no global MCP) | — |
|
|
523
|
+
|
|
524
|
+
Skills must be directories containing a `SKILL.md` file to be picked up. MCP entries without a `command` field are skipped.
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
## Workspace Config (.awm.json)
|
|
529
|
+
|
|
530
|
+
Created by `awm init` at the project root. Managed automatically by AWM — you can also edit it manually and run `awm doctor` to validate.
|
|
531
|
+
|
|
532
|
+
```json
|
|
533
|
+
{
|
|
534
|
+
"tools": ["claude-code", "cursor"],
|
|
535
|
+
"mcps": ["fetch", "memory"],
|
|
536
|
+
"skills": ["awm-cli"],
|
|
537
|
+
"lastSync": "2026-03-08T12:00:00Z"
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
| Field | Description |
|
|
542
|
+
|-------|-------------|
|
|
543
|
+
| `tools` | AI tools to write configs for in this project |
|
|
544
|
+
| `mcps` | MCP IDs from the global registry active in this project |
|
|
545
|
+
| `skills` | Skill names from the global registry active in this project |
|
|
546
|
+
| `lastSync` | Timestamp of the last apply (set automatically) |
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## Registry Layout
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
~/.agent-workspace/
|
|
554
|
+
registry/
|
|
555
|
+
mcps/
|
|
556
|
+
github.json
|
|
557
|
+
fetch.json
|
|
558
|
+
memory.json
|
|
559
|
+
|
|
560
|
+
skills/
|
|
561
|
+
awm-cli/
|
|
562
|
+
SKILL.md
|
|
563
|
+
clean-arch/
|
|
564
|
+
SKILL.md
|
|
565
|
+
|
|
566
|
+
tools/ ← user overrides (optional)
|
|
567
|
+
my-custom-tool.json
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
The built-in tool definitions are bundled with the CLI. The `tools/` directory in the registry is for **user-defined overrides** — AWM checks it first.
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## MCP Definition Format
|
|
575
|
+
|
|
576
|
+
```json
|
|
577
|
+
{
|
|
578
|
+
"id": "my-server",
|
|
579
|
+
"transport": "stdio",
|
|
580
|
+
"command": "npx",
|
|
581
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
582
|
+
"env": {
|
|
583
|
+
"MY_TOKEN": "${env:MY_TOKEN}"
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
| Field | Required | Description |
|
|
589
|
+
|-------|----------|-------------|
|
|
590
|
+
| `id` | Yes | Unique registry slug. Used as the key in generated config files. |
|
|
591
|
+
| `transport` | Yes | `stdio`, `sse`, or `http` |
|
|
592
|
+
| `command` | Yes | Executable to run |
|
|
593
|
+
| `args` | No | Array of arguments |
|
|
594
|
+
| `env` | No | Env vars to pass. `${env:VAR}` values are written verbatim — the target tool resolves them at runtime. |
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## Supported Tools
|
|
599
|
+
|
|
600
|
+
| Tool ID | Name | MCP format | Skills | Project MCP file |
|
|
601
|
+
|---------|------|-----------|--------|-----------------|
|
|
602
|
+
| `claude-code` | Claude Code | JSON | Yes | `.mcp.json` |
|
|
603
|
+
| `codex` | Codex | TOML | No | `.codex/config.toml` |
|
|
604
|
+
| `cursor` | Cursor | JSON | No | `.cursor/mcp.json` |
|
|
605
|
+
| `gemini-cli` | Gemini CLI | JSON | No | `.gemini/settings.json` |
|
|
606
|
+
| `github-copilot` | GitHub Copilot | JSON | No | `.vscode/mcp.json` |
|
|
607
|
+
| `windsurf` | Windsurf | JSON | No | — (global only) |
|
|
608
|
+
| `copilot-cli` | Copilot CLI | JSON | No | — (global only) |
|
|
609
|
+
|
|
610
|
+
Notes:
|
|
611
|
+
- **claude-code** is the only tool that supports skills.
|
|
612
|
+
- **windsurf** and **copilot-cli** are global-scope only; workspace apply skips them for project-scoped config files.
|
|
613
|
+
- **github-copilot** uses `servers` as the root key (not `mcpServers`).
|
|
614
|
+
- **codex** uses TOML with `mcp_servers` as the root key.
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
## Environment Variables
|
|
619
|
+
|
|
620
|
+
| Variable | Default | Description |
|
|
621
|
+
|----------|---------|-------------|
|
|
622
|
+
| `AWM_REGISTRY` | `~/.agent-workspace/registry` | Override the registry root. Useful for testing or team shared registries. |
|
|
623
|
+
|
|
624
|
+
```bash
|
|
625
|
+
# Isolated registry for testing
|
|
626
|
+
AWM_REGISTRY=./test-registry awm mcp list -g
|
|
627
|
+
|
|
628
|
+
# Shared team registry
|
|
629
|
+
AWM_REGISTRY=/mnt/shared/awm-registry awm mcp list -g
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
---
|
|
633
|
+
|
|
634
|
+
## Adding a Custom Tool
|
|
635
|
+
|
|
636
|
+
Create a JSON file in `~/.agent-workspace/registry/tools/` named `<id>.json`. AWM will use it in place of any built-in definition with the same ID, or add it as a new tool.
|
|
637
|
+
|
|
638
|
+
**Example: `~/.agent-workspace/registry/tools/my-tool.json`**
|
|
639
|
+
|
|
640
|
+
```json
|
|
641
|
+
{
|
|
642
|
+
"id": "my-tool",
|
|
643
|
+
"name": "My Custom AI Tool",
|
|
644
|
+
"supports": {
|
|
645
|
+
"mcp": true,
|
|
646
|
+
"skills": false
|
|
647
|
+
},
|
|
648
|
+
"mcp": {
|
|
649
|
+
"format": "json",
|
|
650
|
+
"project": {
|
|
651
|
+
"targetFile": ".my-tool/mcp.json",
|
|
652
|
+
"rootObject": "mcpServers"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
After saving, the tool is immediately available:
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
awm tool # my-tool appears in the checkbox list
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
**Supported MCP formats:**
|
|
665
|
+
- `"format": "json"` — writes a JSON file
|
|
666
|
+
- `"format": "toml"` — writes a TOML file (e.g. like Codex)
|
package/bin/awm.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@joehom/awm-cli",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Agent Workspace Manager CLI — manages MCP servers, skills, and profiles for AI coding tools",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"awm": "bin/awm.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node --test",
|
|
11
|
+
"postinstall": "node src/seed.js"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@iarna/toml": "^2.2.5",
|
|
15
|
+
"commander": "^12.1.0",
|
|
16
|
+
"fs-extra": "^11.2.0",
|
|
17
|
+
"inquirer": "^10.2.2"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18.0.0"
|
|
21
|
+
},
|
|
22
|
+
"license": "",
|
|
23
|
+
"repository": "",
|
|
24
|
+
"homepage": ""
|
|
25
|
+
}
|