@anaclumos/taal 1.1.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.
Files changed (42) hide show
  1. package/.claude/settings.json +15 -0
  2. package/.github/workflows/ci.yml +28 -0
  3. package/.github/workflows/publish.yml +42 -0
  4. package/AGENTS.md +123 -0
  5. package/README.md +568 -0
  6. package/biome.jsonc +24 -0
  7. package/lefthook.yml +12 -0
  8. package/package.json +52 -0
  9. package/src/commands/collect.ts +172 -0
  10. package/src/commands/diff.ts +127 -0
  11. package/src/commands/init.ts +66 -0
  12. package/src/commands/list.ts +80 -0
  13. package/src/commands/providers.ts +46 -0
  14. package/src/commands/sync.ts +111 -0
  15. package/src/commands/validate.ts +17 -0
  16. package/src/config/env.ts +49 -0
  17. package/src/config/loader.ts +88 -0
  18. package/src/config/parser.ts +44 -0
  19. package/src/config/schema.ts +67 -0
  20. package/src/errors/index.ts +43 -0
  21. package/src/index.ts +301 -0
  22. package/src/providers/antigravity.ts +24 -0
  23. package/src/providers/base.ts +70 -0
  24. package/src/providers/claude-code.ts +12 -0
  25. package/src/providers/claude-desktop.ts +19 -0
  26. package/src/providers/codex.ts +61 -0
  27. package/src/providers/continue.ts +62 -0
  28. package/src/providers/cursor.ts +25 -0
  29. package/src/providers/index.ts +34 -0
  30. package/src/providers/opencode.ts +42 -0
  31. package/src/providers/registry.ts +74 -0
  32. package/src/providers/types.ts +99 -0
  33. package/src/providers/utils.ts +106 -0
  34. package/src/providers/windsurf.ts +50 -0
  35. package/src/providers/zed.ts +35 -0
  36. package/src/scripts/generate-schema.ts +17 -0
  37. package/src/skills/copy.ts +58 -0
  38. package/src/skills/discovery.ts +87 -0
  39. package/src/skills/validator.ts +95 -0
  40. package/src/utils/atomic-write.ts +35 -0
  41. package/src/utils/backup.ts +27 -0
  42. package/taal.schema.json +91 -0
package/README.md ADDED
@@ -0,0 +1,568 @@
1
+ # TAAL - Tooling & Agent Abstraction Layer
2
+
3
+ TAAL provides a single source of truth for your MCP (Model Context Protocol) server configurations and Agent Skills, automatically syncing them across all your AI coding tools.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Install globally
9
+ npm install -g @anaclumos/taal
10
+
11
+ # Initialize TAAL
12
+ taal init
13
+
14
+ # Edit ~/.taal/config.yaml with your MCP servers
15
+
16
+ # Sync to all providers
17
+ taal sync
18
+ ```
19
+
20
+ ## Installation
21
+
22
+ ### Via npm (recommended)
23
+
24
+ ```bash
25
+ npm install -g @anaclumos/taal
26
+ ```
27
+
28
+ ### Via bunx
29
+
30
+ ```bash
31
+ bunx @anaclumos/taal --help
32
+ ```
33
+
34
+ ### From source
35
+
36
+ ```bash
37
+ git clone https://github.com/anaclumos/taal.git
38
+ cd taal
39
+ bun install
40
+ bun run src/index.ts --help
41
+ ```
42
+
43
+ ## Commands
44
+
45
+ ### `taal init`
46
+
47
+ Initialize TAAL configuration in `~/.taal/`.
48
+
49
+ ```bash
50
+ taal init
51
+ taal init --force # Overwrite existing config
52
+ ```
53
+
54
+ Creates:
55
+ - `~/.taal/config.yaml` - Your unified configuration
56
+ - `~/.taal/skills/` - Directory for Agent Skills
57
+ - `~/.taal/backups/` - Automatic backups before sync
58
+
59
+ ### `taal collect`
60
+
61
+ Import existing MCP server configurations from installed providers.
62
+
63
+ ```bash
64
+ taal collect
65
+ ```
66
+
67
+ Scans all installed providers and merges their MCP configs into your TAAL config. Warns about conflicts when the same server name has different configurations across providers.
68
+
69
+ ### `taal validate`
70
+
71
+ Validate your TAAL configuration.
72
+
73
+ ```bash
74
+ taal validate
75
+ ```
76
+
77
+ Checks:
78
+ - YAML syntax
79
+ - Schema validation
80
+ - Undefined environment variables
81
+ - Mutual exclusivity (stdio vs HTTP)
82
+
83
+ Exit codes:
84
+ - `0` - Valid configuration
85
+ - `1` - Invalid configuration
86
+
87
+ ### `taal diff`
88
+
89
+ Preview what would change without writing.
90
+
91
+ ```bash
92
+ taal diff # Show changes for all providers
93
+ taal diff cursor # Show changes for specific provider
94
+ ```
95
+
96
+ Shows:
97
+ - `+` Servers to be added
98
+ - `-` Servers to be removed
99
+ - `~` Servers to be modified
100
+
101
+ Exit codes:
102
+ - `0` - No changes
103
+ - `1` - Changes detected
104
+
105
+ ### `taal sync`
106
+
107
+ Sync MCP configs and skills to providers (CORE COMMAND).
108
+
109
+ ```bash
110
+ taal sync # Sync to all enabled providers
111
+ taal sync cursor # Sync to specific provider
112
+ ```
113
+
114
+ What it does:
115
+ 1. Reads `~/.taal/config.yaml`
116
+ 2. Transforms servers to provider-specific formats
117
+ 3. Creates backups of existing configs
118
+ 4. Writes new configs atomically
119
+ 5. Copies skills to provider directories
120
+
121
+ ### `taal list`
122
+
123
+ List configured MCP servers and skills.
124
+
125
+ ```bash
126
+ taal list
127
+ ```
128
+
129
+ Shows:
130
+ - All configured MCP servers (stdio/http)
131
+ - All discovered skills
132
+ - Enabled providers
133
+
134
+ ### `taal providers`
135
+
136
+ List all supported providers.
137
+
138
+ ```bash
139
+ taal providers
140
+ ```
141
+
142
+ Shows for each provider:
143
+ - Installation status
144
+ - Enabled/disabled status
145
+ - Config file path
146
+ - Config format (json/yaml/toml)
147
+
148
+ ## Configuration
149
+
150
+ ### Config File: `~/.taal/config.yaml`
151
+
152
+ ```yaml
153
+ version: "1"
154
+
155
+ mcp:
156
+ # Stdio server example
157
+ filesystem:
158
+ command: npx
159
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
160
+ env:
161
+ LOG_LEVEL: "info"
162
+
163
+ # HTTP server example
164
+ context7:
165
+ url: https://mcp.context7.com/mcp
166
+ headers:
167
+ CONTEXT7_API_KEY: "${CONTEXT7_API_KEY}"
168
+
169
+ skills:
170
+ paths:
171
+ - ~/.taal/skills
172
+ - ~/projects/my-custom-skills
173
+
174
+ providers:
175
+ enabled:
176
+ - claude-desktop
177
+ - cursor
178
+ - zed
179
+ ```
180
+
181
+ ### Environment Variables
182
+
183
+ Use `${VAR_NAME}` syntax to reference environment variables:
184
+
185
+ ```yaml
186
+ mcp:
187
+ my-server:
188
+ command: npx
189
+ env:
190
+ API_KEY: "${MY_API_KEY}"
191
+ ```
192
+
193
+ TAAL will:
194
+ - Substitute variables at sync time
195
+ - Warn if variables are undefined
196
+ - Keep original `${VAR}` syntax if undefined
197
+
198
+ ### Provider-Specific Overrides
199
+
200
+ ```yaml
201
+ mcp:
202
+ my-server:
203
+ command: npx
204
+ args: ["-y", "server"]
205
+ overrides:
206
+ codex:
207
+ enabled_tools: ["tool1", "tool2"]
208
+ startup_timeout_sec: 60
209
+ ```
210
+
211
+ ## Supported Providers
212
+
213
+ TAAL supports 9 AI coding assistants:
214
+
215
+ | Provider | Config Format | Config Path | Skills Support |
216
+ |----------|---------------|-------------|----------------|
217
+ | **Claude Desktop** | JSON | `~/Library/Application Support/Claude/claude_desktop_config.json` | ✅ `~/.claude/skills/` |
218
+ | **Claude Code** | JSON | `~/.claude/settings.json` | ✅ `~/.claude/skills/` |
219
+ | **Cursor** | JSON | `~/Library/Application Support/Cursor/User/settings.json` | ❌ |
220
+ | **Continue.dev** | YAML | `~/.continue/config.yaml` | ❌ |
221
+ | **Zed** | JSON | `~/.config/zed/settings.json` | ❌ |
222
+ | **OpenCode** | JSON | `~/.config/opencode/opencode.json` | ✅ `.opencode/skills/` |
223
+ | **Codex** | TOML | `~/.codex/config.toml` | ✅ `~/.codex/skills/` |
224
+ | **Windsurf** | JSON | Provider-specific path | ❌ |
225
+ | **Antigravity** | JSON | Provider-specific path | ❌ |
226
+
227
+ ### Provider-Specific Notes
228
+
229
+ **Claude Desktop & Claude Code**
230
+ - Only supports stdio servers (no HTTP)
231
+ - Shared skills directory: `~/.claude/skills/`
232
+
233
+ **Cursor**
234
+ - Only supports stdio servers
235
+ - macOS: `~/Library/Application Support/Cursor/User/settings.json`
236
+ - Linux: `~/.config/Cursor/User/settings.json`
237
+
238
+ **Continue.dev**
239
+ - Supports both stdio and HTTP (SSE)
240
+ - Transforms `${VAR}` to `${{ secrets.VAR }}`
241
+
242
+ **Zed**
243
+ - Uses `context_servers` key (not `mcpServers`)
244
+ - Supports both stdio and HTTP
245
+
246
+ **OpenCode**
247
+ - Command as array: `["npx", "-y", "package"]`
248
+ - Uses `environment` instead of `env`
249
+ - Explicit `type: "local" | "remote"`
250
+
251
+ **Codex**
252
+ - TOML format with `[mcp_servers.name]` sections
253
+ - Uses `http_headers` for HTTP servers
254
+ - Supports `enabled_tools` filtering
255
+
256
+ **Windsurf**
257
+ - Supports `streamable-http` transport for HTTP servers
258
+
259
+ **Antigravity**
260
+ - Only supports stdio servers
261
+
262
+ ## Agent Skills
263
+
264
+ TAAL syncs [Agent Skills](https://agentskills.io) to providers that support them.
265
+
266
+ ### Skill Structure
267
+
268
+ ```
269
+ ~/.taal/skills/
270
+ └── my-skill/
271
+ ├── SKILL.md # Required: YAML frontmatter + instructions
272
+ ├── scripts/ # Optional: Helper scripts
273
+ └── references/ # Optional: Reference materials
274
+ ```
275
+
276
+ ### SKILL.md Format
277
+
278
+ ```markdown
279
+ ---
280
+ name: My Skill
281
+ description: What this skill does
282
+ version: 1.0.0
283
+ ---
284
+
285
+ # My Skill
286
+
287
+ Instructions for the AI agent...
288
+ ```
289
+
290
+ ### Skill Discovery
291
+
292
+ TAAL discovers skills from all paths in `skills.paths`:
293
+
294
+ ```yaml
295
+ skills:
296
+ paths:
297
+ - ~/.taal/skills
298
+ - ~/projects/custom-skills
299
+ - /shared/team-skills
300
+ ```
301
+
302
+ ### Skill Validation
303
+
304
+ TAAL validates:
305
+ - `SKILL.md` exists
306
+ - YAML frontmatter is valid
307
+ - `name` field is present
308
+
309
+ Invalid skills are skipped with warnings.
310
+
311
+ ## Workflow Examples
312
+
313
+ ### First-time setup
314
+
315
+ ```bash
316
+ # 1. Initialize TAAL
317
+ taal init
318
+
319
+ # 2. Import existing configs
320
+ taal collect
321
+
322
+ # 3. Validate merged config
323
+ taal validate
324
+
325
+ # 4. Preview changes
326
+ taal diff
327
+
328
+ # 5. Sync to all providers
329
+ taal sync
330
+ ```
331
+
332
+ ### Adding a new MCP server
333
+
334
+ ```bash
335
+ # 1. Edit config
336
+ vim ~/.taal/config.yaml
337
+
338
+ # 2. Validate
339
+ taal validate
340
+
341
+ # 3. Preview changes
342
+ taal diff
343
+
344
+ # 4. Sync
345
+ taal sync
346
+ ```
347
+
348
+ ### Adding a new skill
349
+
350
+ ```bash
351
+ # 1. Create skill directory
352
+ mkdir -p ~/.taal/skills/my-skill
353
+
354
+ # 2. Create SKILL.md
355
+ cat > ~/.taal/skills/my-skill/SKILL.md << 'EOF'
356
+ ---
357
+ name: My Skill
358
+ ---
359
+
360
+ Instructions...
361
+ EOF
362
+
363
+ # 3. Verify skill is discovered
364
+ taal list
365
+
366
+ # 4. Sync to providers
367
+ taal sync
368
+ ```
369
+
370
+ ### Syncing to specific provider
371
+
372
+ ```bash
373
+ # Only sync to Cursor
374
+ taal sync cursor
375
+
376
+ # Preview changes for Zed
377
+ taal diff zed
378
+ ```
379
+
380
+ ## Backup & Safety
381
+
382
+ TAAL automatically creates backups before every write:
383
+
384
+ ```
385
+ ~/.taal/backups/
386
+ ├── claude_desktop_config.json.2024-01-15T10-30-00-000Z.backup
387
+ ├── settings.json.2024-01-15T10-30-00-001Z.backup
388
+ └── config.toml.2024-01-15T10-30-00-002Z.backup
389
+ ```
390
+
391
+ Backups are timestamped and never overwritten.
392
+
393
+ ## Troubleshooting
394
+
395
+ ### Config validation fails
396
+
397
+ ```bash
398
+ # Check detailed errors
399
+ taal validate
400
+
401
+ # Common issues:
402
+ # - Missing required fields
403
+ # - Both command and url specified (mutual exclusivity)
404
+ # - Invalid YAML syntax
405
+ ```
406
+
407
+ ### Sync fails for a provider
408
+
409
+ ```bash
410
+ # Check if provider is installed
411
+ taal providers
412
+
413
+ # Check if provider is enabled
414
+ cat ~/.taal/config.yaml | grep -A 10 "providers:"
415
+
416
+ # Try syncing just that provider
417
+ taal sync cursor
418
+ ```
419
+
420
+ ### Skills not syncing
421
+
422
+ ```bash
423
+ # Verify skills are discovered
424
+ taal list
425
+
426
+ # Check skill paths in config
427
+ cat ~/.taal/config.yaml | grep -A 5 "skills:"
428
+
429
+ # Verify SKILL.md format
430
+ cat ~/.taal/skills/my-skill/SKILL.md
431
+ ```
432
+
433
+ ### Environment variables not substituted
434
+
435
+ ```bash
436
+ # Check if variable is set
437
+ echo $MY_VAR
438
+
439
+ # TAAL will warn about undefined variables
440
+ taal validate
441
+ ```
442
+
443
+ ## Development
444
+
445
+ ### Prerequisites
446
+
447
+ - [Bun](https://bun.sh) v1.2.19 or later
448
+
449
+ ### Setup
450
+
451
+ ```bash
452
+ git clone https://github.com/user/taal.git
453
+ cd taal
454
+ bun install
455
+ ```
456
+
457
+ ### Running tests
458
+
459
+ ```bash
460
+ bun test # All tests
461
+ bun test tests/commands/ # Command tests only
462
+ bun test tests/integration/ # Integration tests only
463
+ ```
464
+
465
+ ### Running locally
466
+
467
+ ```bash
468
+ bun run src/index.ts --help
469
+ bun run src/index.ts init
470
+ ```
471
+
472
+ ### Project structure
473
+
474
+ ```
475
+ taal/
476
+ ├── src/
477
+ │ ├── index.ts # CLI entry point
478
+ │ ├── commands/ # CLI commands
479
+ │ ├── config/ # Config parsing & validation
480
+ │ ├── providers/ # Provider implementations
481
+ │ ├── skills/ # Skills handling
482
+ │ └── utils/ # Shared utilities
483
+ ├── tests/
484
+ │ ├── commands/ # Command tests
485
+ │ ├── config/ # Config tests
486
+ │ ├── providers/ # Provider tests
487
+ │ ├── skills/ # Skills tests
488
+ │ └── integration/ # End-to-end tests
489
+ └── taal.schema.json # JSON Schema for IDE support
490
+ ```
491
+
492
+ ## Publishing
493
+
494
+ TAAL uses automated NPM publishing via GitHub Actions.
495
+
496
+ ### Release Process
497
+
498
+ 1. **Update version** in `package.json`:
499
+ ```bash
500
+ npm version patch # 1.0.0 -> 1.0.1
501
+ npm version minor # 1.0.0 -> 1.1.0
502
+ npm version major # 1.0.0 -> 2.0.0
503
+ ```
504
+
505
+ 2. **Commit and push**:
506
+ ```bash
507
+ git add package.json
508
+ git commit -m "chore: bump version to v1.0.1"
509
+ git push origin main
510
+ ```
511
+
512
+ 3. **Create and push tag**:
513
+ ```bash
514
+ git tag v1.0.1
515
+ git push origin v1.0.1
516
+ ```
517
+
518
+ 4. **GitHub Actions automatically**:
519
+ - Runs tests
520
+ - Runs linter
521
+ - Publishes to NPM with provenance
522
+
523
+ ### Prerequisites
524
+
525
+ Repository maintainers must configure:
526
+ - `NPM_TOKEN` secret in GitHub repository settings
527
+ - NPM account with 2FA enabled
528
+ - Package access permissions
529
+
530
+ ## Contributing
531
+
532
+ Contributions welcome! Please:
533
+
534
+ 1. Fork the repository
535
+ 2. Create a feature branch
536
+ 3. Write tests for new functionality
537
+ 4. Ensure all tests pass: `bun test`
538
+ 5. Ensure linter passes: `bun x ultracite check`
539
+ 6. Submit a pull request
540
+
541
+ ### Adding a new provider
542
+
543
+ 1. Create `src/providers/my-provider.ts`
544
+ 2. Implement the `Provider` interface
545
+ 3. Register in `src/providers/my-provider.ts`: `registry.register(new MyProvider())`
546
+ 4. Add tests in `tests/providers/my-provider.test.ts`
547
+ 5. Update this README
548
+
549
+ ## License
550
+
551
+ MIT
552
+
553
+ ## Links
554
+
555
+ - [NPM Package](https://www.npmjs.com/package/@anaclumos/taal)
556
+ - [GitHub Repository](https://github.com/anaclumos/taal)
557
+ - [Issue Tracker](https://github.com/anaclumos/taal/issues)
558
+ - [MCP Specification](https://modelcontextprotocol.io)
559
+ - [Agent Skills Specification](https://agentskills.io)
560
+
561
+ ## Acknowledgments
562
+
563
+ Built with:
564
+ - [Bun](https://bun.sh) - Fast JavaScript runtime
565
+ - [Commander.js](https://github.com/tj/commander.js) - CLI framework
566
+ - [Zod](https://zod.dev) - Schema validation
567
+ - [YAML](https://www.npmjs.com/package/yaml) - YAML parsing
568
+ - [Chalk](https://github.com/chalk/chalk) - Terminal colors
package/biome.jsonc ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
+ "extends": ["ultracite/biome/core"],
4
+ "linter": {
5
+ "rules": {
6
+ "complexity": {
7
+ "noExcessiveCognitiveComplexity": "off"
8
+ },
9
+ "suspicious": {
10
+ "useAwait": "off",
11
+ "noExplicitAny": "warn",
12
+ "noEvolvingTypes": "warn",
13
+ "noEmptyBlockStatements": "warn",
14
+ "noTemplateCurlyInString": "off"
15
+ },
16
+ "style": {
17
+ "noNonNullAssertion": "off"
18
+ },
19
+ "performance": {
20
+ "useTopLevelRegex": "off"
21
+ }
22
+ }
23
+ }
24
+ }
package/lefthook.yml ADDED
@@ -0,0 +1,12 @@
1
+ pre-commit:
2
+ jobs:
3
+ - run: bun x ultracite fix
4
+ glob:
5
+ - "*.js"
6
+ - "*.jsx"
7
+ - "*.ts"
8
+ - "*.tsx"
9
+ - "*.json"
10
+ - "*.jsonc"
11
+ - "*.css"
12
+ stage_fixed: true
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@anaclumos/taal",
3
+ "version": "1.1.2",
4
+ "description": "CLI tool to sync MCP server configs and Agent Skills across AI coding assistants",
5
+ "type": "module",
6
+ "bin": {
7
+ "taal": "./src/index.ts"
8
+ },
9
+ "scripts": {
10
+ "test": "bun test",
11
+ "prepare": "lefthook install"
12
+ },
13
+ "keywords": [
14
+ "mcp",
15
+ "model-context-protocol",
16
+ "agent-skills",
17
+ "ai",
18
+ "claude",
19
+ "cursor",
20
+ "zed",
21
+ "cli",
22
+ "sync",
23
+ "config"
24
+ ],
25
+ "author": "Sunghyun Cho <hey@cho.sh>",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/anaclumos/taal.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/anaclumos/taal/issues"
33
+ },
34
+ "homepage": "https://github.com/anaclumos/taal#readme",
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ },
38
+ "dependencies": {
39
+ "commander": "^12.0.0",
40
+ "yaml": "^2.3.4",
41
+ "chalk": "^5.3.0",
42
+ "zod": "^3.22.4",
43
+ "@iarna/toml": "^2.2.5"
44
+ },
45
+ "devDependencies": {
46
+ "@biomejs/biome": "2.3.11",
47
+ "@types/bun": "latest",
48
+ "lefthook": "^2.0.15",
49
+ "ultracite": "^7.0.11",
50
+ "zod-to-json-schema": "^3.25.1"
51
+ }
52
+ }