@joehom/awm-cli 0.0.1 → 0.0.2

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 CHANGED
@@ -18,6 +18,7 @@ AWM keeps a **central registry** of MCPs and skills in `~/.agent-workspace/regis
18
18
  - [Doctor Command](#doctor-command)
19
19
  - [Setup Command](#setup-command)
20
20
  - [Pull Command](#pull-command)
21
+ - [Sync Command](#sync-command)
21
22
  - [Workspace Config (.awm.json)](#workspace-config-awmjson)
22
23
  - [Registry Layout](#registry-layout)
23
24
  - [MCP Definition Format](#mcp-definition-format)
@@ -33,15 +34,7 @@ AWM keeps a **central registry** of MCPs and skills in `~/.agent-workspace/regis
33
34
 
34
35
  ```bash
35
36
  # 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 .
37
+ npm i @joehom/awm-cli -g .
45
38
  awm --help
46
39
  ```
47
40
 
@@ -525,9 +518,29 @@ Skills must be directories containing a `SKILL.md` file to be picked up. MCP ent
525
518
 
526
519
  ---
527
520
 
521
+ ## Sync Command
522
+
523
+ ### `awm sync [--dry-run]`
524
+
525
+ Re-apply all MCPs and skills listed in `.awm.json` to every tool config file. Use this after manually editing `.awm.json` to bring tool configs back in sync without going through `mcp add` or `skill add`.
526
+
527
+ ```bash
528
+ awm sync # apply .awm.json to all tool configs
529
+ awm sync --dry-run # preview what would be written
530
+ ```
531
+
532
+ ```
533
+ [ok] Wrote 2 MCP(s) to .mcp.json
534
+ [ok] Wrote 2 MCP(s) to .cursor/mcp.json
535
+ [ok] Copied skill "awm-cli" → .claude/skills/awm-cli
536
+ [ok] Workspace synced.
537
+ ```
538
+
539
+ ---
540
+
528
541
  ## Workspace Config (.awm.json)
529
542
 
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.
543
+ Created by `awm init` at the project root. Managed automatically by AWM — you can edit it manually and run `awm sync` to re-apply, or `awm doctor` to validate.
531
544
 
532
545
  ```json
533
546
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joehom/awm-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Agent Workspace Manager CLI — manages MCP servers, skills, and profiles for AI coding tools",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,21 @@
1
+ import { Command } from 'commander';
2
+ import { log } from '../utils/logger.js';
3
+ import { requireWorkspace } from '../workspace/workspaceConfig.js';
4
+ import { applyAll } from '../workspace/applyWorkspace.js';
5
+
6
+ export function makeSyncCommand() {
7
+ const cmd = new Command('sync');
8
+
9
+ cmd
10
+ .description('Re-apply MCPs and skills from .awm.json to all tool config files')
11
+ .option('--dry-run', 'Show what would be written without making changes')
12
+ .action(async (opts) => {
13
+ const ws = requireWorkspace();
14
+ await applyAll(ws, opts.dryRun);
15
+ if (!opts.dryRun) {
16
+ log.success('Workspace synced.');
17
+ }
18
+ });
19
+
20
+ return cmd;
21
+ }
package/src/index.js CHANGED
@@ -9,6 +9,7 @@ import { makeStatusCommand } from './commands/status.js';
9
9
  import { makeDoctorCommand } from './commands/doctor.js';
10
10
  import { makeToolCommand } from './commands/tool.js';
11
11
  import { makeSetupCommand } from './commands/setup.js';
12
+ import { makeSyncCommand } from './commands/sync.js';
12
13
 
13
14
  const program = new Command();
14
15
 
@@ -25,6 +26,7 @@ program.addCommand(makeSkillCommand());
25
26
  program.addCommand(makeDoctorCommand());
26
27
  program.addCommand(makeToolCommand());
27
28
  program.addCommand(makeSetupCommand());
29
+ program.addCommand(makeSyncCommand());
28
30
 
29
31
  try {
30
32
  ensureRegistryDirs();