agentinit 1.6.0 → 1.8.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.
Files changed (173) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +220 -114
  3. package/dist/agents/Agent.d.ts +44 -0
  4. package/dist/agents/Agent.d.ts.map +1 -1
  5. package/dist/agents/Agent.js +111 -22
  6. package/dist/agents/Agent.js.map +1 -1
  7. package/dist/agents/AiderAgent.d.ts +9 -0
  8. package/dist/agents/AiderAgent.d.ts.map +1 -0
  9. package/dist/agents/AiderAgent.js +135 -0
  10. package/dist/agents/AiderAgent.js.map +1 -0
  11. package/dist/agents/ClaudeAgent.d.ts +4 -0
  12. package/dist/agents/ClaudeAgent.d.ts.map +1 -1
  13. package/dist/agents/ClaudeAgent.js +33 -18
  14. package/dist/agents/ClaudeAgent.js.map +1 -1
  15. package/dist/agents/ClaudeDesktopAgent.d.ts +5 -0
  16. package/dist/agents/ClaudeDesktopAgent.d.ts.map +1 -1
  17. package/dist/agents/ClaudeDesktopAgent.js +31 -1
  18. package/dist/agents/ClaudeDesktopAgent.js.map +1 -1
  19. package/dist/agents/ClineAgent.d.ts +8 -0
  20. package/dist/agents/ClineAgent.d.ts.map +1 -0
  21. package/dist/agents/ClineAgent.js +42 -0
  22. package/dist/agents/ClineAgent.js.map +1 -0
  23. package/dist/agents/CodexCliAgent.d.ts +4 -0
  24. package/dist/agents/CodexCliAgent.d.ts.map +1 -1
  25. package/dist/agents/CodexCliAgent.js +38 -8
  26. package/dist/agents/CodexCliAgent.js.map +1 -1
  27. package/dist/agents/CopilotAgent.d.ts +9 -0
  28. package/dist/agents/CopilotAgent.d.ts.map +1 -0
  29. package/dist/agents/CopilotAgent.js +131 -0
  30. package/dist/agents/CopilotAgent.js.map +1 -0
  31. package/dist/agents/CursorAgent.d.ts +4 -4
  32. package/dist/agents/CursorAgent.d.ts.map +1 -1
  33. package/dist/agents/CursorAgent.js +32 -43
  34. package/dist/agents/CursorAgent.js.map +1 -1
  35. package/dist/agents/DroidAgent.d.ts +5 -0
  36. package/dist/agents/DroidAgent.d.ts.map +1 -1
  37. package/dist/agents/DroidAgent.js +37 -18
  38. package/dist/agents/DroidAgent.js.map +1 -1
  39. package/dist/agents/GeminiCliAgent.d.ts +4 -0
  40. package/dist/agents/GeminiCliAgent.d.ts.map +1 -1
  41. package/dist/agents/GeminiCliAgent.js +37 -8
  42. package/dist/agents/GeminiCliAgent.js.map +1 -1
  43. package/dist/agents/MarkdownRulesAgent.d.ts +13 -0
  44. package/dist/agents/MarkdownRulesAgent.d.ts.map +1 -0
  45. package/dist/agents/MarkdownRulesAgent.js +53 -0
  46. package/dist/agents/MarkdownRulesAgent.js.map +1 -0
  47. package/dist/agents/RooCodeAgent.d.ts +9 -0
  48. package/dist/agents/RooCodeAgent.d.ts.map +1 -0
  49. package/dist/agents/RooCodeAgent.js +131 -0
  50. package/dist/agents/RooCodeAgent.js.map +1 -0
  51. package/dist/agents/WindsurfAgent.d.ts +9 -0
  52. package/dist/agents/WindsurfAgent.d.ts.map +1 -0
  53. package/dist/agents/WindsurfAgent.js +127 -0
  54. package/dist/agents/WindsurfAgent.js.map +1 -0
  55. package/dist/agents/ZedAgent.d.ts +9 -0
  56. package/dist/agents/ZedAgent.d.ts.map +1 -0
  57. package/dist/agents/ZedAgent.js +127 -0
  58. package/dist/agents/ZedAgent.js.map +1 -0
  59. package/dist/cli.js +29992 -11107
  60. package/dist/cli.js.map +1 -1
  61. package/dist/commands/apply.d.ts +10 -0
  62. package/dist/commands/apply.d.ts.map +1 -1
  63. package/dist/commands/apply.js +136 -5
  64. package/dist/commands/apply.js.map +1 -1
  65. package/dist/commands/detect.d.ts.map +1 -1
  66. package/dist/commands/detect.js +25 -0
  67. package/dist/commands/detect.js.map +1 -1
  68. package/dist/commands/init.js +1 -1
  69. package/dist/commands/init.js.map +1 -1
  70. package/dist/commands/mcp.d.ts +2 -7
  71. package/dist/commands/mcp.d.ts.map +1 -1
  72. package/dist/commands/mcp.js +541 -110
  73. package/dist/commands/mcp.js.map +1 -1
  74. package/dist/commands/plugins.d.ts +3 -0
  75. package/dist/commands/plugins.d.ts.map +1 -0
  76. package/dist/commands/plugins.js +309 -0
  77. package/dist/commands/plugins.js.map +1 -0
  78. package/dist/commands/revert.d.ts +7 -0
  79. package/dist/commands/revert.d.ts.map +1 -0
  80. package/dist/commands/revert.js +48 -0
  81. package/dist/commands/revert.js.map +1 -0
  82. package/dist/commands/rules.d.ts +3 -0
  83. package/dist/commands/rules.d.ts.map +1 -0
  84. package/dist/commands/rules.js +354 -0
  85. package/dist/commands/rules.js.map +1 -0
  86. package/dist/commands/skills.d.ts +3 -0
  87. package/dist/commands/skills.d.ts.map +1 -0
  88. package/dist/commands/skills.js +179 -0
  89. package/dist/commands/skills.js.map +1 -0
  90. package/dist/commands/sync.d.ts +1 -0
  91. package/dist/commands/sync.d.ts.map +1 -1
  92. package/dist/commands/sync.js +18 -1
  93. package/dist/commands/sync.js.map +1 -1
  94. package/dist/commands/verifyMcp.d.ts.map +1 -1
  95. package/dist/commands/verifyMcp.js +27 -5
  96. package/dist/commands/verifyMcp.js.map +1 -1
  97. package/dist/constants/index.d.ts +1 -1
  98. package/dist/constants/index.d.ts.map +1 -1
  99. package/dist/constants/index.js +1 -1
  100. package/dist/constants/index.js.map +1 -1
  101. package/dist/constants/mcp.d.ts +1 -0
  102. package/dist/constants/mcp.d.ts.map +1 -1
  103. package/dist/constants/mcp.js +2 -0
  104. package/dist/constants/mcp.js.map +1 -1
  105. package/dist/core/agentDetector.d.ts.map +1 -1
  106. package/dist/core/agentDetector.js +8 -2
  107. package/dist/core/agentDetector.js.map +1 -1
  108. package/dist/core/agentManager.d.ts.map +1 -1
  109. package/dist/core/agentManager.js +12 -0
  110. package/dist/core/agentManager.js.map +1 -1
  111. package/dist/core/gitignoreManager.d.ts +8 -0
  112. package/dist/core/gitignoreManager.d.ts.map +1 -0
  113. package/dist/core/gitignoreManager.js +114 -0
  114. package/dist/core/gitignoreManager.js.map +1 -0
  115. package/dist/core/managedState.d.ts +42 -0
  116. package/dist/core/managedState.d.ts.map +1 -0
  117. package/dist/core/managedState.js +194 -0
  118. package/dist/core/managedState.js.map +1 -0
  119. package/dist/core/mcpClient.d.ts +124 -6
  120. package/dist/core/mcpClient.d.ts.map +1 -1
  121. package/dist/core/mcpClient.js +385 -39
  122. package/dist/core/mcpClient.js.map +1 -1
  123. package/dist/core/pluginManager.d.ts +134 -0
  124. package/dist/core/pluginManager.d.ts.map +1 -0
  125. package/dist/core/pluginManager.js +845 -0
  126. package/dist/core/pluginManager.js.map +1 -0
  127. package/dist/core/projectSkills.d.ts +19 -0
  128. package/dist/core/projectSkills.d.ts.map +1 -0
  129. package/dist/core/projectSkills.js +105 -0
  130. package/dist/core/projectSkills.js.map +1 -0
  131. package/dist/core/propagator.d.ts +8 -1
  132. package/dist/core/propagator.d.ts.map +1 -1
  133. package/dist/core/propagator.js +179 -36
  134. package/dist/core/propagator.js.map +1 -1
  135. package/dist/core/rulesApplicator.d.ts +0 -4
  136. package/dist/core/rulesApplicator.d.ts.map +1 -1
  137. package/dist/core/rulesApplicator.js +8 -39
  138. package/dist/core/rulesApplicator.js.map +1 -1
  139. package/dist/core/rulesTemplateLoader.js +2 -2
  140. package/dist/core/rulesTemplateLoader.js.map +1 -1
  141. package/dist/core/skillsManager.d.ts +61 -0
  142. package/dist/core/skillsManager.d.ts.map +1 -0
  143. package/dist/core/skillsManager.js +407 -0
  144. package/dist/core/skillsManager.js.map +1 -0
  145. package/dist/lib/utils/index.d.ts +3 -1
  146. package/dist/lib/utils/index.d.ts.map +1 -1
  147. package/dist/lib/utils/index.js +4 -1
  148. package/dist/lib/utils/index.js.map +1 -1
  149. package/dist/types/index.d.ts +24 -1
  150. package/dist/types/index.d.ts.map +1 -1
  151. package/dist/types/index.js.map +1 -1
  152. package/dist/types/jsonSchema.d.ts +31 -0
  153. package/dist/types/jsonSchema.d.ts.map +1 -0
  154. package/dist/types/jsonSchema.js +6 -0
  155. package/dist/types/jsonSchema.js.map +1 -0
  156. package/dist/types/plugins.d.ts +161 -0
  157. package/dist/types/plugins.d.ts.map +1 -0
  158. package/dist/types/plugins.js +2 -0
  159. package/dist/types/plugins.js.map +1 -0
  160. package/dist/types/skills.d.ts +50 -0
  161. package/dist/types/skills.d.ts.map +1 -0
  162. package/dist/types/skills.js +2 -0
  163. package/dist/types/skills.js.map +1 -0
  164. package/dist/utils/packageVersion.d.ts +105 -0
  165. package/dist/utils/packageVersion.d.ts.map +1 -0
  166. package/dist/utils/packageVersion.js +219 -0
  167. package/dist/utils/packageVersion.js.map +1 -0
  168. package/package.json +7 -2
  169. package/dist/agentinit-1.6.0.tgz +0 -0
  170. package/dist/registry/mcpRegistry.d.ts +0 -12
  171. package/dist/registry/mcpRegistry.d.ts.map +0 -1
  172. package/dist/registry/mcpRegistry.js +0 -114
  173. package/dist/registry/mcpRegistry.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ # [1.8.0](https://github.com/agentinit/agentinit/compare/v1.7.0...v1.8.0) (2026-03-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * cicd ([1be823d](https://github.com/agentinit/agentinit/commit/1be823d97966ffabdb0dab7c1d1601422e3f0be3))
7
+ * **ci:** switch to npm trusted publishing with OIDC ([4434bb9](https://github.com/agentinit/agentinit/commit/4434bb9bd3708989ce31e31cb67c158bb59817ae))
8
+ * **ci:** upgrade semantic-release to v25 for OIDC support ([b05b81c](https://github.com/agentinit/agentinit/commit/b05b81c5b700f09440c476eca0736371eba9e241))
9
+ * **mcp:** pass verification timeout as options ([58e3e06](https://github.com/agentinit/agentinit/commit/58e3e064c216fdf127df930382858009019f8bca))
10
+ * **plugins:** avoid stale installs and temp skill leaks ([41bb185](https://github.com/agentinit/agentinit/commit/41bb185e3452fa0cae5f227c3455708eea83c5a5))
11
+ * **plugins:** require explicit marketplace for search ([8e500af](https://github.com/agentinit/agentinit/commit/8e500af9d09aa90e14e44e38e4da9f41d05cf541))
12
+ * **plugins:** require explicit marketplace prefixes ([4c6ba54](https://github.com/agentinit/agentinit/commit/4c6ba542fe07e3e6b687c9abc1ea18f09e51ff06))
13
+
14
+
15
+ ### Features
16
+
17
+ * add project apply workflow with managed rollback ([f9e9616](https://github.com/agentinit/agentinit/commit/f9e96163fcdb95217ecdd5de364da890f4499f22))
18
+ * **cli:** split agent config into dedicated commands ([59b3726](https://github.com/agentinit/agentinit/commit/59b3726523dedb7b7684a97ea06c0883fd133e1b))
19
+
20
+ ## Unreleased
21
+
22
+ ### Bug Fixes
23
+
24
+ * fix plugin scope handling for global MCP installs/removals and targeted removals
25
+ * update docs and onboarding to the `mcp add|verify`, `rules add`, and `skills add` command model
26
+
27
+ # [1.7.0](https://github.com/agentinit/agentinit/compare/v1.6.0...v1.7.0) (2025-10-17)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * resolve TypeScript errors in MCP verifier ([469f886](https://github.com/agentinit/agentinit/commit/469f886ad0b6517b2eb1622b84a6b24b39614f3f))
33
+ * **tests:** remove duplicate getServerVersion properties in mock objects ([26106a7](https://github.com/agentinit/agentinit/commit/26106a7ddaad77a6e3ef37802bf01c8e2e580839))
34
+
35
+
36
+ ### Features
37
+
38
+ * add automatic MCP server version detection ([3980599](https://github.com/agentinit/agentinit/commit/3980599539b8175384f0377765a0373c0315535c))
39
+ * **verifier:** add advanced MCP verification options ([d89d5da](https://github.com/agentinit/agentinit/commit/d89d5da9fe177aee19a92f9e441f2dbeba60a1b1))
40
+
1
41
  # [1.6.0](https://github.com/agentinit/agentinit/compare/v1.5.0...v1.6.0) (2025-10-10)
2
42
 
3
43
 
package/README.md CHANGED
@@ -9,8 +9,9 @@ AgentInit transforms AI agent configuration from a fragmented, manual process in
9
9
  - **🤖 Universal Agent Configuration**: Unified `agents.md` file that syncs with all major AI coding agents
10
10
  - **🔍 Smart Stack Detection**: Automatically detects project language, framework, and tools
11
11
  - **🔄 Bidirectional Sync**: Keep agent configurations in sync across Claude, Cursor, Windsurf, and more
12
- - **📦 MCP Management**: Interactive installation and management of Model Context Protocol tools
12
+ - **📦 MCP Management**: Configure, inspect, and verify Model Context Protocol servers
13
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 explicit marketplace sources
14
15
  - **⚙️ Project Templates**: Pre-built templates for web apps, CLI tools, libraries, and more
15
16
  - **🎯 Stack-Aware Guidance**: Customized instructions based on your technology stack
16
17
 
@@ -35,8 +36,12 @@ agentinit detect
35
36
  # Sync agents.md with agent-specific files
36
37
  agentinit sync
37
38
 
38
- # Install MCPs interactively
39
- agentinit mcp --interactive
39
+ # Apply project-owned agent files, skills, and ignore management
40
+ agentinit apply
41
+
42
+ # Add and verify an MCP server
43
+ agentinit mcp add --verify \
44
+ --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
40
45
  ```
41
46
 
42
47
  ## 📋 Commands
@@ -77,139 +82,148 @@ Sync agents.md with agent-specific configuration files.
77
82
 
78
83
  ```bash
79
84
  agentinit sync # Sync configurations
85
+ agentinit sync --agent claude cursor
80
86
  agentinit sync --dry-run # Preview changes
81
87
  agentinit sync --backup # Create backups
82
88
  ```
83
89
 
84
- ### `agentinit mcp`
90
+ ### `agentinit apply`
85
91
 
86
- Manage Model Context Protocol installations.
92
+ Apply `agents.md` plus project-owned skills to supported agent files, and manage ignore entries for generated files.
87
93
 
88
94
  ```bash
89
- agentinit mcp # Show top MCPs
90
- agentinit mcp --interactive # Interactive selection
91
- agentinit mcp --search <query> # Search MCPs
92
- agentinit mcp --install <name> # Install specific MCP
95
+ agentinit apply # Sync + project skills + managed ignore block
96
+ agentinit apply --agent claude cursor # Target specific agents
97
+ agentinit apply --dry-run # Preview changes
98
+ agentinit apply --backup # Create sibling .agentinit.backup files
99
+ agentinit apply --no-skills # Skip project-owned skills
100
+ agentinit apply --gitignore-local # Write ignore entries to .git/info/exclude
93
101
  ```
94
102
 
95
- ### `agentinit verify_mcp`
103
+ ### `agentinit mcp`
96
104
 
97
- Verify MCP server installations and get their tools with token usage.
105
+ Manage Model Context Protocol server configurations.
98
106
 
99
107
  **Examples:**
100
108
  ```bash
101
- # Verify all MCPs in project
102
- agentinit verify_mcp --all
103
- # Verify STDIO server
104
- agentinit verify_mcp --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
105
- # Verify HTTP server
106
- agentinit verify_mcp --mcp-http notion_api "https://mcp.notion.com/mcp" --timeout 30000
107
- ```
108
-
109
- Shows connection status, response time, and available tools/resources/prompts for each MCP server.
110
-
111
- ### `agentinit apply`
112
-
113
- Apply configurations including MCP server setup.
114
-
115
- #### MCP Configuration
116
-
117
-
118
- ```bash
119
- # Configure STDIO MCP with everything server (recommended example)
120
- npx agentinit apply \
109
+ # Add a project-local STDIO server
110
+ agentinit mcp add \
121
111
  --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
122
112
 
123
- # Configure multiple MCPs in one command
124
- npx agentinit apply \
125
- --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything" \
113
+ # Add multiple servers and verify them immediately
114
+ agentinit mcp add --verify \
126
115
  --mcp-stdio supabase "npx -y @supabase/mcp-server-supabase@latest" \
127
116
  --args "--read-only --project-ref=<project-ref>" \
128
117
  --env "SUPABASE_ACCESS_TOKEN=<personal-access-token>" \
129
- --mcp-http notion_api "https://mcp.notion.com/mcp" \
130
- --mcp-sse notion_events "https://mcp.notion.com/sse"
131
-
132
- # Configure HTTP MCP with authentication
133
- npx agentinit apply \
134
- --mcp-http github "https://api.githubcopilot.com/mcp/" --auth "Bearer YOUR_GITHUB_PAT"
135
-
136
- # Configure HTTP MCP with custom headers
137
- npx agentinit apply \
138
- --mcp-http context7 "https://mcp.context7.com/mcp" \
139
- --header "CONTEXT7_API_KEY:YOUR_API_KEY"
140
-
141
- # Multiple custom headers
142
- npx agentinit apply \
143
- --mcp-http api_server "https://api.example.com/mcp" \
144
- --header "X-API-Key:YOUR_API_KEY" \
145
- --header "X-Client-ID:YOUR_CLIENT_ID"
146
-
147
- # Combine Bearer auth with custom headers
148
- npx agentinit apply \
149
- --mcp-http advanced_api "https://api.example.com/mcp" \
150
- --auth "Bearer YOUR_TOKEN" \
151
- --header "X-Custom-Header:custom_value"
152
-
153
- # Configure Docker-based MCP with environment
154
- npx agentinit apply \
155
- --mcp-stdio browserbase "docker run -i --rm ghcr.io/metorial/mcp-container--browserbase--mcp-server-browserbase--browserbase node cli.js" \
156
- --env "BROWSERBASE_API_KEY=browserbase-api-key"
157
-
158
- # Global configuration with custom headers
159
- npx agentinit apply --global --client claude \
160
- --mcp-http context7 "https://mcp.context7.com/mcp" \
161
- --header "CONTEXT7_API_KEY:YOUR_API_KEY"
162
-
163
- # Verify MCPs immediately after configuration
164
- npx agentinit apply --verify-mcp \
165
- --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
118
+ --mcp-http notion_api "https://mcp.notion.com/mcp"
119
+
120
+ # Manage global MCP config for a specific agent
121
+ agentinit mcp list --global --agent claude
122
+ agentinit mcp remove notion_api --global --agent claude
123
+
124
+ # Verify existing configs or direct MCP args
125
+ agentinit mcp verify --all
126
+ agentinit mcp verify --name exa
127
+ agentinit mcp verify --mcp-http notion_api "https://mcp.notion.com/mcp" --timeout 30000
166
128
  ```
167
129
 
168
- This generates `.agentinit/agentinit.toml` with your MCP configurations.
130
+ Shows connection status, response time, and available tools/resources/prompts for each MCP server.
169
131
 
170
132
  **MCP Authentication Options**:
171
133
  - `--auth "Bearer TOKEN"` - Adds Authorization header for Bearer token authentication
172
134
  - `--header "KEY:VALUE"` - Adds custom headers in KEY:VALUE format (can be used multiple times)
173
135
  - Both flags can be combined for APIs requiring multiple authentication methods
174
136
 
175
- **MCP Verification**: Use the `--verify-mcp` flag to test MCP servers immediately after configuration. This ensures servers are reachable and shows their available tools, resources, and prompts. Use `--timeout <ms>` to set a custom connection timeout (default: 30000ms).
176
-
177
- ```bash
178
- # Verify with custom timeout
179
- npx agentinit apply --verify-mcp --timeout 30000 \
180
- --mcp-stdio chrome-mcp "bunx -y chrome-devtools-mcp@latest"
181
- ```
137
+ ### `agentinit rules`
182
138
 
183
- #### Rules Configuration
184
-
185
- Apply coding rules and best practices to your AI agents using predefined templates or custom rules.
139
+ Manage coding rules independently from MCP configuration.
186
140
 
141
+ **Examples:**
187
142
  ```bash
188
- # Apply rule templates (recommended combinations)
189
- agentinit apply --rules git,write_tests,use_linter
190
-
191
- # Mix templates with custom rules
192
- agentinit apply --rules git,write_docs --rule-raw "Use TypeScript strict mode"
143
+ # Add rules from templates, raw text, files, or URLs
144
+ agentinit rules add --template git,write_tests,use_linter
145
+ agentinit rules add --template git --raw "Use TypeScript strict mode"
146
+ agentinit rules add --file ./project-rules.md
193
147
 
194
- # Load rules from a file
195
- agentinit apply --rules-file ./project-rules.md
148
+ # Inspect and remove configured rules
149
+ agentinit rules list
150
+ agentinit rules remove git write_tests
196
151
 
197
- # Apply globally to all projects using Claude
198
- agentinit apply --global --agent claude --rules git,write_tests
199
-
200
- # Combine with MCP configuration
201
- agentinit apply --rules git,use_linter --mcp-stdio context7 "npx @context7/mcp"
152
+ # Apply globally when the target agent supports global rules
153
+ agentinit rules add --global --agent claude --template git,write_tests
202
154
  ```
203
155
 
204
156
  **Available Rule Templates:**
205
157
  - `git` - Enforce Git workflows and commit standards
206
158
  - `write_docs` - Require comprehensive documentation
207
- - `use_git_worktrees` - Enable parallel development with worktrees
159
+ - `use_git_worktrees` - Enable parallel development with worktrees
208
160
  - `use_subagents` - Delegate work to specialized subagents
209
161
  - `use_linter` - Enforce code quality and formatting
210
162
  - `write_tests` - Implement test-driven development practices
211
163
 
212
- **Token Tracking:** The apply command automatically tracks and displays token usage with color-coded output (🟢 Green ≤5k, 🟡 Yellow 5k-15k, 🔴 Red >15k) and git-style diffs to help manage AI context size. Example: `Rules: 101 tokens (-296)` shows rule tokens with change tracking.
164
+ ### `agentinit skills`
165
+
166
+ Install, list, and remove reusable agent skills from local paths or GitHub repositories.
167
+
168
+ **Examples:**
169
+ ```bash
170
+ # Inspect a source before installing
171
+ agentinit skills add owner/repo --list
172
+
173
+ # Install all discovered skills for detected agents
174
+ agentinit skills add ./skills
175
+
176
+ # Install selected skills globally for a specific agent
177
+ agentinit skills add owner/repo --global --agent claude --skill openai-docs
178
+
179
+ # Review and clean up installed skills
180
+ agentinit skills list
181
+ agentinit skills remove openai-docs
182
+ ```
183
+
184
+ ### `agentinit plugins`
185
+
186
+ Install, inspect, search, and remove portable plugins from explicit marketplace sources, GitHub repositories, or local paths.
187
+
188
+ **Examples:**
189
+ ```bash
190
+ # Search a marketplace explicitly
191
+ agentinit plugins search --from claude
192
+ agentinit plugins search code-review --from claude
193
+
194
+ # Install from a marketplace explicitly
195
+ agentinit plugins install claude/code-review
196
+ agentinit plugins install code-review --from claude
197
+
198
+ # Install from GitHub or a local path
199
+ agentinit plugins install owner/repo
200
+ agentinit plugins install ./plugins/code-review
201
+
202
+ # Inspect and remove installed plugins
203
+ agentinit plugins list
204
+ agentinit plugins remove code-review
205
+ ```
206
+
207
+ **Marketplace Rules:**
208
+ - Marketplace installs are explicit by design. Bare names like `agentinit plugins install code-review` are rejected.
209
+ - Use `<marketplace>/<plugin>` or `--from <marketplace>` when installing from a marketplace.
210
+ - `plugins search` also requires `--from <marketplace>`.
211
+ - Only `claude` is implemented today, mapped to Anthropic's `claude-plugins-official` marketplace.
212
+
213
+ ### `agentinit revert`
214
+
215
+ Revert files and backups managed by `agentinit apply` or `agentinit sync`.
216
+
217
+ ```bash
218
+ agentinit revert # Restore backups and remove generated files
219
+ agentinit revert --dry-run # Preview what would be reverted
220
+ agentinit revert --keep-backups
221
+ ```
222
+
223
+ ### Compatibility
224
+
225
+ `agentinit apply` is now the project-level orchestration command for sync, project skills, and managed ignore state.
226
+ 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`.
213
227
 
214
228
  ## 🏗️ Project Structure
215
229
 
@@ -219,11 +233,10 @@ AgentInit creates and manages these key files:
219
233
  your-project/
220
234
  ├── agents.md # Universal agent configuration
221
235
  ├── CLAUDE.md # Claude-specific config (synced)
222
- ├── .cursor/rules/ # Cursor rules (MDC files)
223
- ├── 001_workspace.mdc
224
- │ └── 002_frontend.mdc
225
- ├── AGENTS.md # Simple agent instructions (alternative)
226
- └── .windsurfrules # Windsurf-specific config (synced)
236
+ ├── .cursorrules # Cursor-specific config (synced)
237
+ ├── AGENTS.md # Shared AGENTS.md standard for supporting agents
238
+ ├── .windsurfrules # Windsurf-specific config (synced)
239
+ └── .agentinit/ # Managed state and internal backups
227
240
  ```
228
241
 
229
242
  ## 📖 Configuration
@@ -260,12 +273,22 @@ This is a TypeScript project using Next.js...
260
273
 
261
274
  ### Supported Agents
262
275
 
276
+ `AGENTS.md` is a shared standard used by multiple tools, so AgentInit does not use it by itself as an auto-detection signal.
277
+
263
278
  | Agent | Config File | Status |
264
279
  |-------|-------------|--------|
265
280
  | Claude | `CLAUDE.md` | ✅ |
266
- | Cursor | `.cursor/rules/*.mdc` or `AGENTS.md` | ✅ |
281
+ | Claude Desktop | global desktop config | ✅ |
282
+ | Cursor | `.cursorrules` | ✅ |
267
283
  | Windsurf | `.windsurfrules` | ✅ |
268
- | Copilot | `.github/copilot.yml` | 🚧 |
284
+ | GitHub Copilot | `AGENTS.md`, `.vscode/mcp.json` | |
285
+ | Aider | `AGENTS.md`, `.aider.conf.yml` | ✅ |
286
+ | Cline | `.clinerules` | ✅ |
287
+ | Codex CLI | `.codex/config.toml` | ✅ |
288
+ | Gemini CLI | `.gemini/settings.json` | ✅ |
289
+ | RooCode | `AGENTS.md`, `.roo/mcp.json` | ✅ |
290
+ | Zed | `AGENTS.md`, `.zed/settings.json` | ✅ |
291
+ | Droid | `AGENTS.md`, `.factory/mcp.json` | ✅ |
269
292
  | Codeium | `.codeium/config.json` | 🚧 |
270
293
 
271
294
  ## 🔧 Stack Detection
@@ -302,6 +325,8 @@ AgentInit includes a curated registry of popular MCPs:
302
325
 
303
326
  AgentInit can be used as a library in your Node.js/TypeScript applications for programmatic MCP server verification and management.
304
327
 
328
+ > **📖 Full Documentation:** See [src/lib/verifier/README.md](src/lib/verifier/README.md) for complete API reference, examples, and advanced usage.
329
+
305
330
  ### Installation
306
331
 
307
332
  ```bash
@@ -315,7 +340,8 @@ bun add agentinit
315
340
  ### Basic Usage
316
341
 
317
342
  ```typescript
318
- import { MCPVerifier, MCPServerType } from 'agentinit';
343
+ import { MCPVerifier } from 'agentinit/verifier';
344
+ import { MCPServerType } from 'agentinit/types';
319
345
 
320
346
  const verifier = new MCPVerifier();
321
347
 
@@ -333,6 +359,34 @@ if (result.status === 'success') {
333
359
  }
334
360
  ```
335
361
 
362
+ ### Advanced Features
363
+
364
+ The verifier supports additional options for detailed inspection:
365
+
366
+ ```typescript
367
+ // Fetch resource contents and prompt templates
368
+ const result = await verifier.verifyServer(
369
+ serverConfig,
370
+ {
371
+ timeout: 15000,
372
+ includeResourceContents: true, // Fetch actual resource data
373
+ includePromptDetails: true, // Fetch prompt templates
374
+ includeTokenCounts: true // Calculate token usage (default)
375
+ }
376
+ );
377
+
378
+ // Access detailed tool parameters
379
+ result.capabilities?.tools.forEach(tool => {
380
+ console.log(`\nTool: ${tool.name}`);
381
+
382
+ if (tool.inputSchema?.properties) {
383
+ Object.entries(tool.inputSchema.properties).forEach(([name, schema]) => {
384
+ console.log(` - ${name}: ${schema.type} ${schema.description || ''}`);
385
+ });
386
+ }
387
+ });
388
+ ```
389
+
336
390
  ### Submodule Imports
337
391
 
338
392
  For better tree-shaking, import from specific submodules:
@@ -341,7 +395,11 @@ For better tree-shaking, import from specific submodules:
341
395
  // Import specific modules
342
396
  import { MCPVerifier } from 'agentinit/verifier';
343
397
  import { MCPServerType } from 'agentinit/types';
344
- import type { MCPServerConfig, MCPVerificationResult } from 'agentinit/types';
398
+ import type {
399
+ MCPServerConfig,
400
+ MCPVerificationResult,
401
+ MCPVerificationOptions
402
+ } from 'agentinit/types';
345
403
  import { countTokens, MCPParser } from 'agentinit/utils';
346
404
  ```
347
405
 
@@ -391,7 +449,7 @@ const result = await verifier.verifyServer({
391
449
  #### Verify Multiple Servers
392
450
 
393
451
  ```typescript
394
- import { MCPVerifier, MCPServerType } from 'agentinit';
452
+ import { MCPVerifier, MCPServerType } from 'agentinit/verifier';
395
453
 
396
454
  const servers = [
397
455
  {
@@ -416,6 +474,17 @@ console.log(verifier.formatResults(results));
416
474
  // Or process results programmatically
417
475
  const successful = results.filter(r => r.status === 'success').length;
418
476
  console.log(`${successful}/${results.length} servers verified`);
477
+
478
+ // Inspect tool parameters and token usage
479
+ results.forEach(result => {
480
+ if (result.status === 'success' && result.capabilities) {
481
+ console.log(`\n${result.server.name}:`);
482
+ result.capabilities.tools.forEach(tool => {
483
+ const tokens = result.capabilities?.toolTokenCounts?.get(tool.name) || 0;
484
+ console.log(` • ${tool.name} (${tokens} tokens)`);
485
+ });
486
+ }
487
+ });
419
488
  ```
420
489
 
421
490
  #### Count Tokens
@@ -449,10 +518,20 @@ new MCPVerifier(defaultTimeout?: number)
449
518
  ```
450
519
 
451
520
  **Methods**
452
- - `verifyServer(config: MCPServerConfig, timeout?: number): Promise<MCPVerificationResult>` - Verify a single MCP server
453
- - `verifyServers(configs: MCPServerConfig[], timeout?: number): Promise<MCPVerificationResult[]>` - Verify multiple servers in parallel
521
+ - `verifyServer(config: MCPServerConfig, options?: MCPVerificationOptions): Promise<MCPVerificationResult>` - Verify a single MCP server
522
+ - `verifyServers(configs: MCPServerConfig[], options?: MCPVerificationOptions): Promise<MCPVerificationResult[]>` - Verify multiple servers in parallel
454
523
  - `formatResults(results: MCPVerificationResult[]): string` - Format verification results for display
455
524
 
525
+ **MCPVerificationOptions**
526
+ ```typescript
527
+ interface MCPVerificationOptions {
528
+ timeout?: number; // Connection timeout (ms)
529
+ includeResourceContents?: boolean; // Fetch resource data
530
+ includePromptDetails?: boolean; // Fetch prompt templates
531
+ includeTokenCounts?: boolean; // Calculate tokens (default: true)
532
+ }
533
+ ```
534
+
456
535
  #### Types
457
536
 
458
537
  **MCPServerType**
@@ -495,18 +574,45 @@ interface MCPVerificationResult {
495
574
  **MCPCapabilities**
496
575
  ```typescript
497
576
  interface MCPCapabilities {
498
- tools: MCPTool[];
499
- resources: MCPResource[];
500
- prompts: MCPPrompt[];
577
+ tools: MCPTool[]; // Available tools with input schemas
578
+ resources: MCPResource[]; // Available resources (with optional contents)
579
+ prompts: MCPPrompt[]; // Available prompts (with optional templates)
501
580
  serverInfo?: {
502
581
  name: string;
503
582
  version: string;
504
583
  };
505
- totalToolTokens?: number;
506
- toolTokenCounts?: Map<string, number>;
584
+ totalToolTokens?: number; // Total token usage for all tools
585
+ toolTokenCounts?: Map<string, number>; // Token count per tool
586
+ }
587
+
588
+ interface MCPTool {
589
+ name: string;
590
+ description?: string;
591
+ inputSchema?: any; // JSON Schema defining parameters
592
+ }
593
+
594
+ interface MCPResource {
595
+ uri: string;
596
+ name?: string;
597
+ description?: string;
598
+ mimeType?: string;
599
+ contents?: string | Uint8Array; // Only if includeResourceContents is true
600
+ }
601
+
602
+ interface MCPPrompt {
603
+ name: string;
604
+ description?: string;
605
+ arguments?: Array<{
606
+ name: string;
607
+ description?: string;
608
+ required?: boolean;
609
+ }>;
610
+ template?: string; // Only if includePromptDetails is true
507
611
  }
508
612
  ```
509
613
 
614
+ > **📝 Note:** For detailed examples on working with tool parameters, resource contents, and prompt templates, see the [full library documentation](src/lib/verifier/README.md).
615
+
510
616
  ## 🛠️ Development
511
617
 
512
618
  ### Building from Source
@@ -561,4 +667,4 @@ MIT License - see [LICENSE](LICENSE) file for details.
561
667
 
562
668
  ---
563
669
 
564
- **AgentInit** - Unify your AI agent configurations, amplify your development workflow.
670
+ **AgentInit** - Unify your AI agent configurations, amplify your development workflow.
@@ -44,6 +44,16 @@ export declare abstract class Agent {
44
44
  * Returns null if global configuration is not supported
45
45
  */
46
46
  getGlobalMcpPath(): string | null;
47
+ /**
48
+ * Get the project rules path for this agent
49
+ * Returns null if rules are not supported
50
+ */
51
+ getProjectRulesPath(projectPath: string): string | null;
52
+ /**
53
+ * Get the global rules path for this agent
54
+ * Returns null if global rules are not supported
55
+ */
56
+ getGlobalRulesPath(): string | null;
47
57
  /**
48
58
  * Check if this agent supports global configuration
49
59
  */
@@ -102,6 +112,40 @@ export declare abstract class Agent {
102
112
  * Apply rules configuration to this agent's global config
103
113
  */
104
114
  applyGlobalRules(rules: AppliedRules): Promise<RuleApplicationResult>;
115
+ /**
116
+ * Check if this agent supports skills
117
+ */
118
+ supportsSkills(): boolean;
119
+ /**
120
+ * Get the skills directory for this agent
121
+ * Returns null if skills are not supported
122
+ */
123
+ getSkillsDir(projectPath: string, global?: boolean): string | null;
124
+ /**
125
+ * Check if this agent supports global rules configuration
126
+ */
127
+ supportsGlobalRules(): boolean;
128
+ /**
129
+ * Remove an MCP server by name from this agent's configuration
130
+ * Must be implemented by each specific agent
131
+ */
132
+ abstract removeMCPServer(projectPath: string, serverName: string): Promise<boolean>;
133
+ /**
134
+ * Remove an MCP server from global configuration
135
+ */
136
+ removeGlobalMCPServer(serverName: string): Promise<boolean>;
137
+ /**
138
+ * Get existing MCP servers from this agent's global configuration
139
+ */
140
+ getGlobalMCPServers(): Promise<MCPServerConfig[]>;
141
+ /**
142
+ * Replace existing markdown rule sections and append the desired rules once.
143
+ */
144
+ protected replaceMarkdownRulesSections(existingContent: string, sections: RuleSection[], headingPattern: RegExp): string;
145
+ /**
146
+ * Run an operation against the agent's global MCP file using the native parser.
147
+ */
148
+ protected withGlobalMcpPath<T>(operation: (projectPath: string) => Promise<T>): Promise<T>;
105
149
  /**
106
150
  * Get a summary of this agent
107
151
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../src/agents/Agent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,oBAAoB,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