agentinit 1.16.2 → 1.17.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.17.0](https://github.com/agentinit/agentinit/compare/v1.16.2...v1.17.0) (2026-04-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **skills:** add shared AGENTS install target ([4815ab1](https://github.com/agentinit/agentinit/commit/4815ab1d9c6c1dd9567c89dac6a6e9de0bb1aae8))
7
+
1
8
  ## [1.16.2](https://github.com/agentinit/agentinit/compare/v1.16.1...v1.16.2) (2026-04-01)
2
9
 
3
10
 
package/README.md CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  > A CLI tool for managing and configuring AI coding agents
4
4
 
5
- AgentInit transforms AI agent configuration from a fragmented, manual process into a unified, automated workflow that ensures every developer gets consistent, context-aware AI assistance tailored to their project's specific needs.
5
+ Unified CLI for configuring AI coding agents across editors and tools.
6
6
 
7
- ## Features
7
+ ## Features
8
8
 
9
- - **🤖 Universal Agent Configuration**: Unified `agents.md` file that syncs with all major AI coding agents
10
- - **🔍 Smart Stack Detection**: Automatically detects project language, framework, and tools
11
- - **🔄 Bidirectional Sync**: Keep agent configurations in sync across Claude, Cursor, Windsurf, and more
12
- - **📦 MCP Management**: Configure, inspect, and verify Model Context Protocol servers
13
- - **📋 Rules Templates**: Apply coding best practices with predefined rule templates (Git, testing, docs, linting)
14
- - **🔌 Plugin Marketplace**: Install portable skills and MCP bundles from built-in or custom marketplaces
15
- - **⚙️ Project Templates**: Pre-built templates for web apps, CLI tools, libraries, and more
16
- - **🎯 Stack-Aware Guidance**: Customized instructions based on your technology stack
9
+ - **Universal Agent Configuration**: Unified `agents.md` file that syncs with all major AI coding agents
10
+ - **Smart Stack Detection**: Automatically detects project language, framework, and tools
11
+ - **Bidirectional Sync**: Keep agent configurations in sync across Claude, Cursor, Windsurf, and more
12
+ - **MCP Management**: Configure, inspect, and verify Model Context Protocol servers
13
+ - **Rules Templates**: Apply coding best practices with predefined rule templates (Git, testing, docs, linting)
14
+ - **Plugin Marketplace**: Install portable skills and MCP bundles from built-in or custom marketplaces
15
+ - **Project Templates**: Pre-built templates for web apps, CLI tools, libraries, and more
16
+ - **Stack-Aware Guidance**: Customized instructions based on your technology stack
17
17
 
18
- ## 🚀 Quick Start
18
+ ## Quick Start
19
19
 
20
20
  ### Installation
21
21
 
@@ -51,7 +51,7 @@ agentinit mcp add --verify \
51
51
  NO_COLOR=1 agentinit plugins list
52
52
  ```
53
53
 
54
- ## 📋 Commands
54
+ ## Commands
55
55
 
56
56
  ### `agentinit init`
57
57
 
@@ -202,29 +202,19 @@ agentinit skills add owner/repo --global --agent claude --skill openai-docs
202
202
  agentinit skills add owner/repo --global --agent openclaw
203
203
  agentinit skills add owner/repo --global --agent hermes
204
204
 
205
+ # Install directly into the shared AGENTS.md canonical store
206
+ agentinit skills add owner/repo --global --agent agents
207
+
205
208
  # Force copied installs instead of canonical symlink installs
206
209
  agentinit skills add ./skills --copy
207
210
 
208
211
  # Review and clean up installed skills
209
212
  agentinit skills list
213
+ agentinit skills list --agent agents
210
214
  agentinit skills remove openai-docs
211
215
  ```
212
216
 
213
- If you run `skills add` without `--agent` or `--yes`, AgentInit prompts for install scope first (`project` or `global`), then prompts for the agent skill directories to target. If no project agent files are detected, it still lets you choose project agent directories manually and points you to `agentinit init` for future auto-detection.
214
-
215
- Skills are installed into a canonical store by default: project installs use `.agents/skills/`, and global installs use `~/.agents/skills/`. Agent-specific paths are symlinked to that store when they differ. Use `--copy` or `--copy-skills` to force independent copies instead.
216
-
217
- OpenClaw participates in the shared project skills ecosystem via `.agents/skills/`, and also exposes a dedicated global skills directory at `~/.openclaw/skills/`. AgentInit treats `~/.openclaw` as an availability signal when offering OpenClaw install targets, but does not count that home-directory marker as a project-level agent detection signal.
218
-
219
- Hermes follows the same model: project skills come from `.agents/skills/`, global installs go to `~/.hermes/skills/`, and `~/.hermes` is used only as an availability signal for Hermes install targets.
220
-
221
- Some agents share the same native skills directory. For example, Claude Code and Claude Desktop both use `~/.claude/skills/`, so `skills remove --agent ...` will skip deleting that shared path while another agent still depends on it.
222
-
223
- Bare skill names resolve from your configured default marketplace when one is set. Without a configured default, AgentInit falls back to the public skills catalog used by the open agent skills ecosystem: `vercel-labs/agent-skills`. Use `./name` for a local path, `owner/repo` for an explicit GitHub repository root, `owner/repo/path/to/skill` for a repository subdirectory, or `--from <marketplace>` / `<marketplace>/<name>` for marketplace-backed sources. Three-or-more slash segments are treated as a GitHub repository plus subpath, even when the owner matches a marketplace id. GitHub `tree/...` URLs and `blob/.../SKILL.md` URLs resolve to the referenced skill directory.
224
-
225
- Marketplace-backed `skills add` installs only the discovered skills. If a marketplace source also contains MCP servers or other portable components, AgentInit warns and points you to `agentinit plugins install ...` for the full install.
226
-
227
- If a marketplace lookup misses and the source still looks like a GitHub repository, AgentInit warns and tries the matching GitHub repo directly as a fallback. Built-in verified repos like `openai/codex-plugin-cc` are marked as verified, and you can add your own exact `owner/repo` entries with `agentinit config verified-repos add ...`. Other fallback repos remain explicitly unverified.
217
+ Skills are installed into a canonical store by default (`.agents/skills/` for project, `~/.agents/skills/` for global), with agent-specific paths symlinked automatically. Bare skill names resolve from your configured default marketplace, falling back to the public catalog at `vercel-labs/agent-skills`. Use `./name` for local paths, `owner/repo` for GitHub repos, or `--from <marketplace>` for explicit marketplace sources.
228
218
 
229
219
  ### `agentinit plugins`
230
220
 
@@ -258,16 +248,7 @@ agentinit plugins list
258
248
  agentinit plugins remove code-review
259
249
  ```
260
250
 
261
- **Marketplace Rules:**
262
- - Use `<marketplace>/<plugin>` or `--from <marketplace>` when installing from a marketplace.
263
- - Bare plugin installs like `agentinit plugins install code-review` resolve through your configured default marketplace when one is set. Without a configured default, AgentInit falls back to the first available marketplace (`agentinit` by default).
264
- - `plugins search` uses your configured default marketplace when one is set. Without a configured default, it still requires `--from <marketplace>`.
265
- - `plugins search --category <category>` uses marketplace-specific categories. Examples: Claude uses `official` and `community`, AgentInit/custom marketplaces use `skills`, `mcps`, and `rules`, and OpenAI uses `curated`, `system`, and `experimental`.
266
- - Implemented marketplaces today include `claude` (Anthropic's Claude plugin marketplace) and `openai` (the OpenAI Codex skills catalog).
267
- - You can add your own marketplaces with `agentinit config marketplaces add <identifier> <repo-url>`.
268
- - If a marketplace lookup misses but the source still looks like `owner/repo`, AgentInit warns and tries that GitHub repository directly. Exact repos added with `agentinit config verified-repos add <owner/repo>` are labeled as verified during that fallback.
269
- - For Claude-format plugins, `plugins install` installs portable skills and MCP servers for compatible selected agents. If a native Claude Code plugin bundle is also present, AgentInit installs that bundle into `~/.claude/plugins` when `claude` is selected, registers the corresponding Claude marketplace metadata, and skips portable skill fallback for any selected agents that share Claude Code's skills directory. Portable MCP installs still apply to other compatible agents.
270
- - Claude-native plugin payloads are user-scoped and stored under `~/.claude/plugins`, even when the AgentInit install itself is project-scoped.
251
+ Bare plugin names resolve through your configured default marketplace. Built-in marketplaces include `claude` and `openai`; add custom ones with `agentinit config marketplaces add`. For Claude-format plugins, native bundles are installed into `~/.claude/plugins` alongside portable skill and MCP installs.
271
252
 
272
253
  ### `agentinit config`
273
254
 
@@ -305,12 +286,7 @@ agentinit revert --dry-run # Preview what would be reverted
305
286
  agentinit revert --keep-backups
306
287
  ```
307
288
 
308
- ### Compatibility
309
-
310
- `agentinit apply` is now the project-level orchestration command for sync, project skills, and managed ignore state.
311
- Legacy `agentinit apply --mcp-*`, `--rules`, and related flags still work for backward compatibility, and `agentinit verify_mcp` remains deprecated in favor of `agentinit mcp verify`.
312
-
313
- ## 🏗️ Project Structure
289
+ ## Project Structure
314
290
 
315
291
  AgentInit creates and manages these key files:
316
292
 
@@ -326,7 +302,7 @@ your-project/
326
302
  └── .agentinit/ # Managed state and internal backups
327
303
  ```
328
304
 
329
- ## 📖 Configuration
305
+ ## Configuration
330
306
 
331
307
  ### agents.md Structure
332
308
 
@@ -371,23 +347,23 @@ Supported agents today are Claude Code, Claude Desktop, Cursor, Windsurf, GitHub
371
347
 
372
348
  | Agent | Config File | Status |
373
349
  |-------|-------------|--------|
374
- | Claude | `CLAUDE.md` | |
375
- | Claude Desktop | global desktop config | |
376
- | Cursor | `.cursorrules` | |
377
- | Windsurf | `.windsurfrules` | |
378
- | GitHub Copilot | `AGENTS.md`, `.vscode/mcp.json` | |
379
- | Aider | `AGENTS.md`, `.aider.conf.yml` | |
380
- | Cline | `.clinerules` | |
381
- | Codex CLI | `.codex/config.toml` | |
382
- | Gemini CLI | `.gemini/settings.json` | |
383
- | OpenClaw | `~/.openclaw` presence, `~/.openclaw/skills/` | skills |
384
- | Hermes | `~/.hermes` presence, `~/.hermes/skills/` | skills |
385
- | RooCode | `AGENTS.md`, `.roo/mcp.json` | |
386
- | Zed | `AGENTS.md`, `.zed/settings.json` | |
387
- | Droid | `AGENTS.md`, `.factory/mcp.json` | |
388
- | Codeium | `.codeium/config.json` | 🚧 |
389
-
390
- ## 🔧 Stack Detection
350
+ | Claude | `CLAUDE.md` | Supported |
351
+ | Claude Desktop | global desktop config | Supported |
352
+ | Cursor | `.cursorrules` | Supported |
353
+ | Windsurf | `.windsurfrules` | Supported |
354
+ | GitHub Copilot | `AGENTS.md`, `.vscode/mcp.json` | Supported |
355
+ | Aider | `AGENTS.md`, `.aider.conf.yml` | Supported |
356
+ | Cline | `.clinerules` | Supported |
357
+ | Codex CLI | `.codex/config.toml` | Supported |
358
+ | Gemini CLI | `.gemini/settings.json` | Supported |
359
+ | OpenClaw | `~/.openclaw` presence, `~/.openclaw/skills/` | Supported (skills) |
360
+ | Hermes | `~/.hermes` presence, `~/.hermes/skills/` | Supported (skills) |
361
+ | RooCode | `AGENTS.md`, `.roo/mcp.json` | Supported |
362
+ | Zed | `AGENTS.md`, `.zed/settings.json` | Supported |
363
+ | Droid | `AGENTS.md`, `.factory/mcp.json` | Supported |
364
+ | Codeium | `.codeium/config.json` | Partial |
365
+
366
+ ## Stack Detection
391
367
 
392
368
  AgentInit automatically detects your project's technology stack:
393
369
 
@@ -404,7 +380,7 @@ AgentInit automatically detects your project's technology stack:
404
380
  - Go (Go modules)
405
381
  - Java (Maven, Gradle)
406
382
 
407
- ## 📦 MCP Registry
383
+ ## MCP Registry
408
384
 
409
385
  AgentInit includes a curated registry of popular MCPs:
410
386
 
@@ -417,11 +393,11 @@ AgentInit includes a curated registry of popular MCPs:
417
393
  | supabase-mcp | database | Supabase integration |
418
394
  | git-mcp | version-control | Enhanced Git operations |
419
395
 
420
- ## 📚 Library API
396
+ ## Library API
421
397
 
422
398
  AgentInit can be used as a library in your Node.js/TypeScript applications for programmatic MCP server verification and management.
423
399
 
424
- > **📖 Full Documentation:** See [src/lib/verifier/README.md](src/lib/verifier/README.md) for complete API reference, examples, and advanced usage.
400
+ > **Full Documentation:** See [src/lib/verifier/README.md](src/lib/verifier/README.md) for complete API reference, examples, and advanced usage.
425
401
 
426
402
  ### Installation
427
403
 
@@ -449,46 +425,17 @@ const result = await verifier.verifyServer({
449
425
  });
450
426
 
451
427
  if (result.status === 'success') {
452
- console.log(`✅ Connected to ${result.server.name}`);
428
+ console.log(`Connected to ${result.server.name}`);
453
429
  console.log(`Tools: ${result.capabilities?.tools.length}`);
454
430
  console.log(`Total tokens: ${result.capabilities?.totalToolTokens}`);
455
431
  }
456
432
  ```
457
433
 
458
- ### Advanced Features
459
-
460
- The verifier supports additional options for detailed inspection:
461
-
462
- ```typescript
463
- // Fetch resource contents and prompt templates
464
- const result = await verifier.verifyServer(
465
- serverConfig,
466
- {
467
- timeout: 15000,
468
- includeResourceContents: true, // Fetch actual resource data
469
- includePromptDetails: true, // Fetch prompt templates
470
- includeTokenCounts: true // Calculate token usage (default)
471
- }
472
- );
473
-
474
- // Access detailed tool parameters
475
- result.capabilities?.tools.forEach(tool => {
476
- console.log(`\nTool: ${tool.name}`);
477
-
478
- if (tool.inputSchema?.properties) {
479
- Object.entries(tool.inputSchema.properties).forEach(([name, schema]) => {
480
- console.log(` - ${name}: ${schema.type} ${schema.description || ''}`);
481
- });
482
- }
483
- });
484
- ```
485
-
486
434
  ### Submodule Imports
487
435
 
488
436
  For better tree-shaking, import from specific submodules:
489
437
 
490
438
  ```typescript
491
- // Import specific modules
492
439
  import { MCPVerifier } from 'agentinit/verifier';
493
440
  import { MCPServerType } from 'agentinit/types';
494
441
  import type {
@@ -499,217 +446,9 @@ import type {
499
446
  import { countTokens, MCPParser } from 'agentinit/utils';
500
447
  ```
501
448
 
502
- ### Examples
503
-
504
- #### Verify STDIO MCP Server
505
-
506
- ```typescript
507
- import { MCPVerifier, MCPServerType } from 'agentinit';
508
-
509
- const verifier = new MCPVerifier(10000); // 10 second timeout
510
-
511
- const result = await verifier.verifyServer({
512
- name: 'filesystem',
513
- type: MCPServerType.STDIO,
514
- command: 'npx',
515
- args: ['-y', '@modelcontextprotocol/server-filesystem', '/workspace'],
516
- env: {
517
- NODE_ENV: 'production'
518
- }
519
- });
520
-
521
- if (result.status === 'success') {
522
- result.capabilities?.tools.forEach(tool => {
523
- const tokens = result.capabilities?.toolTokenCounts?.get(tool.name) || 0;
524
- console.log(` • ${tool.name} (${tokens} tokens)`);
525
- });
526
- }
527
- ```
528
-
529
- #### Verify HTTP MCP Server
530
-
531
- ```typescript
532
- import { MCPVerifier, MCPServerType } from 'agentinit';
449
+ > **Note:** For detailed examples, type definitions, and advanced usage patterns, see the [full library documentation](src/lib/verifier/README.md).
533
450
 
534
- const result = await verifier.verifyServer({
535
- name: 'github-api',
536
- type: MCPServerType.HTTP,
537
- url: 'https://api.example.com/mcp',
538
- headers: {
539
- 'Authorization': 'Bearer YOUR_TOKEN',
540
- 'Content-Type': 'application/json'
541
- }
542
- });
543
- ```
544
-
545
- #### Verify Multiple Servers
546
-
547
- ```typescript
548
- import { MCPVerifier, MCPServerType } from 'agentinit/verifier';
549
-
550
- const servers = [
551
- {
552
- name: 'everything',
553
- type: MCPServerType.STDIO,
554
- command: 'npx',
555
- args: ['-y', '@modelcontextprotocol/server-everything']
556
- },
557
- {
558
- name: 'api-server',
559
- type: MCPServerType.HTTP,
560
- url: 'https://api.example.com/mcp'
561
- }
562
- ];
563
-
564
- const verifier = new MCPVerifier();
565
- const results = await verifier.verifyServers(servers);
566
-
567
- // Display formatted results
568
- console.log(verifier.formatResults(results));
569
-
570
- // Or process results programmatically
571
- const successful = results.filter(r => r.status === 'success').length;
572
- console.log(`${successful}/${results.length} servers verified`);
573
-
574
- // Inspect tool parameters and token usage
575
- results.forEach(result => {
576
- if (result.status === 'success' && result.capabilities) {
577
- console.log(`\n${result.server.name}:`);
578
- result.capabilities.tools.forEach(tool => {
579
- const tokens = result.capabilities?.toolTokenCounts?.get(tool.name) || 0;
580
- console.log(` • ${tool.name} (${tokens} tokens)`);
581
- });
582
- }
583
- });
584
- ```
585
-
586
- #### Count Tokens
587
-
588
- ```typescript
589
- import { countTokens } from 'agentinit/utils';
590
-
591
- const text = 'Hello, world!';
592
- const tokens = countTokens(text);
593
- console.log(`Token count: ${tokens}`);
594
- ```
595
-
596
- #### Parse MCP Configuration
597
-
598
- ```typescript
599
- import { MCPParser } from 'agentinit/utils';
600
-
601
- const args = ['--mcp-stdio', 'test', 'node', 'server.js', '--args', 'arg1 arg2'];
602
- const parsed = MCPParser.parseArguments(args);
603
-
604
- console.log(parsed.servers); // Array of MCPServerConfig
605
- ```
606
-
607
- ### API Reference
608
-
609
- #### MCPVerifier
610
-
611
- **Constructor**
612
- ```typescript
613
- new MCPVerifier(defaultTimeout?: number)
614
- ```
615
-
616
- **Methods**
617
- - `verifyServer(config: MCPServerConfig, options?: MCPVerificationOptions): Promise<MCPVerificationResult>` - Verify a single MCP server
618
- - `verifyServers(configs: MCPServerConfig[], options?: MCPVerificationOptions): Promise<MCPVerificationResult[]>` - Verify multiple servers in parallel
619
- - `formatResults(results: MCPVerificationResult[]): string` - Format verification results for display
620
-
621
- **MCPVerificationOptions**
622
- ```typescript
623
- interface MCPVerificationOptions {
624
- timeout?: number; // Connection timeout (ms)
625
- includeResourceContents?: boolean; // Fetch resource data
626
- includePromptDetails?: boolean; // Fetch prompt templates
627
- includeTokenCounts?: boolean; // Calculate tokens (default: true)
628
- }
629
- ```
630
-
631
- #### Types
632
-
633
- **MCPServerType**
634
- ```typescript
635
- enum MCPServerType {
636
- STDIO = 'stdio',
637
- HTTP = 'http',
638
- SSE = 'sse'
639
- }
640
- ```
641
-
642
- **MCPServerConfig**
643
- ```typescript
644
- interface MCPServerConfig {
645
- name: string;
646
- type: MCPServerType;
647
-
648
- // For STDIO servers
649
- command?: string;
650
- args?: string[];
651
- env?: Record<string, string>;
652
-
653
- // For HTTP/SSE servers
654
- url?: string;
655
- headers?: Record<string, string>;
656
- }
657
- ```
658
-
659
- **MCPVerificationResult**
660
- ```typescript
661
- interface MCPVerificationResult {
662
- server: MCPServerConfig;
663
- status: 'success' | 'error' | 'timeout';
664
- capabilities?: MCPCapabilities;
665
- error?: string;
666
- connectionTime?: number;
667
- }
668
- ```
669
-
670
- **MCPCapabilities**
671
- ```typescript
672
- interface MCPCapabilities {
673
- tools: MCPTool[]; // Available tools with input schemas
674
- resources: MCPResource[]; // Available resources (with optional contents)
675
- prompts: MCPPrompt[]; // Available prompts (with optional templates)
676
- serverInfo?: {
677
- name: string;
678
- version: string;
679
- };
680
- totalToolTokens?: number; // Total token usage for all tools
681
- toolTokenCounts?: Map<string, number>; // Token count per tool
682
- }
683
-
684
- interface MCPTool {
685
- name: string;
686
- description?: string;
687
- inputSchema?: any; // JSON Schema defining parameters
688
- }
689
-
690
- interface MCPResource {
691
- uri: string;
692
- name?: string;
693
- description?: string;
694
- mimeType?: string;
695
- contents?: string | Uint8Array; // Only if includeResourceContents is true
696
- }
697
-
698
- interface MCPPrompt {
699
- name: string;
700
- description?: string;
701
- arguments?: Array<{
702
- name: string;
703
- description?: string;
704
- required?: boolean;
705
- }>;
706
- template?: string; // Only if includePromptDetails is true
707
- }
708
- ```
709
-
710
- > **📝 Note:** For detailed examples on working with tool parameters, resource contents, and prompt templates, see the [full library documentation](src/lib/verifier/README.md).
711
-
712
- ## 🛠️ Development
451
+ ## Development
713
452
 
714
453
  ### Building from Source
715
454
 
@@ -747,20 +486,16 @@ src/
747
486
  └── types/ # TypeScript definitions
748
487
  ```
749
488
 
750
- ## 🤝 Contributing
489
+ ## Contributing
751
490
 
752
491
  We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for details.
753
492
 
754
- ## 📄 License
493
+ ## License
755
494
 
756
495
  MIT License - see [LICENSE](LICENSE) file for details.
757
496
 
758
- ## 🔗 Links
497
+ ## Links
759
498
 
760
499
  - [Documentation](https://docs.agentinit.dev)
761
500
  - [MCP Registry](https://registry.agentinit.dev)
762
501
  - [GitHub Issues](https://github.com/agentinit/agentinit/issues)
763
-
764
- ---
765
-
766
- **AgentInit** - Unify your AI agent configurations, amplify your development workflow.