agentinit 1.0.1 → 1.2.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,39 @@
1
+ # [1.2.0](https://github.com/agentinit/agentinit/compare/v1.1.0...v1.2.0) (2025-09-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * pckg lock ([ed4acbb](https://github.com/agentinit/agentinit/commit/ed4acbbc27c6342a109c81b91e6a23f264de1b9f))
7
+
8
+
9
+ ### Features
10
+
11
+ * add --header flag support for HTTP MCP custom headers ([45a065f](https://github.com/agentinit/agentinit/commit/45a065f3b3876056acc76df4291db1808b94040a))
12
+
13
+ # [1.1.1](https://github.com/agentinit/agentinit/compare/v1.1.0...v1.1.1) (TBD)
14
+
15
+ ### Features
16
+
17
+ * add --header flag support for HTTP MCP custom headers ([COMMIT_HASH](https://github.com/agentinit/agentinit/commit/COMMIT_HASH))
18
+
19
+ # [1.1.0](https://github.com/agentinit/agentinit/compare/v1.0.1...v1.1.0) (2025-09-19)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * resolve all TypeScript compilation errors ([6b8535e](https://github.com/agentinit/agentinit/commit/6b8535e89e5e701587199fce519bd4d449d186e3))
25
+ * tests fix, enhance gitignore ([47ae616](https://github.com/agentinit/agentinit/commit/47ae616559a144ae1c2025060cffeefde494baac))
26
+
27
+
28
+ ### Features
29
+
30
+ * add apply cmd ([c813d82](https://github.com/agentinit/agentinit/commit/c813d829aa0ef51029516f9e35af752efbb006e0))
31
+ * add DEBUG=1 flag to show all agents in detect command ([5b6527b](https://github.com/agentinit/agentinit/commit/5b6527bf0174f23be15a9795bb617e303283f5af))
32
+ * add MCP verification with token counting and DEBUG mode support ([b785530](https://github.com/agentinit/agentinit/commit/b78553073756719f40699591f2915190451fa285))
33
+ * add structured config file definitions and Cursor MDC support ([9af939c](https://github.com/agentinit/agentinit/commit/9af939c8102810d8f0a1d562fe5d561cf62af230))
34
+ * enhance MCP verification and project configuration ([8af8a09](https://github.com/agentinit/agentinit/commit/8af8a09a974c2f0f6075fda60e72c120517af13a))
35
+ * less commands ([f5b0795](https://github.com/agentinit/agentinit/commit/f5b07958f3296aa74e1d378d3e66fcf2146a6c00))
36
+
1
37
  ## [1.0.1](https://github.com/agentinit/agentinit/compare/v1.0.0...v1.0.1) (2025-09-06)
2
38
 
3
39
 
package/README.md CHANGED
@@ -10,6 +10,7 @@ AgentInit transforms AI agent configuration from a fragmented, manual process in
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
12
  - **📦 MCP Management**: Interactive installation and management of Model Context Protocol tools
13
+ - **📋 Rules Templates**: Apply coding best practices with predefined rule templates (Git, testing, docs, linting)
13
14
  - **⚙️ Project Templates**: Pre-built templates for web apps, CLI tools, libraries, and more
14
15
  - **🎯 Stack-Aware Guidance**: Customized instructions based on your technology stack
15
16
 
@@ -20,9 +21,6 @@ AgentInit transforms AI agent configuration from a fragmented, manual process in
20
21
  ```bash
21
22
  # Install AgentInit globally
22
23
  npm install -g agentinit
23
-
24
- # Or use with Bun
25
- bun install -g agentinit
26
24
  ```
27
25
 
28
26
  ### Basic Usage
@@ -65,10 +63,14 @@ agentinit init --force # Overwrite existing configuration
65
63
  Detect current project stack and existing agent configurations.
66
64
 
67
65
  ```bash
68
- agentinit detect # Basic detection
66
+ agentinit detect # Basic detection (only shows found agents)
69
67
  agentinit detect --verbose # Detailed information
68
+ DEBUG=1 agentinit detect # Show all supported agents (found and not found)
70
69
  ```
71
70
 
71
+ **Environment Variables:**
72
+ - `DEBUG=1` - Shows all supported agents, including those not found in the project
73
+
72
74
  ### `agentinit sync`
73
75
 
74
76
  Sync agents.md with agent-specific configuration files.
@@ -90,6 +92,31 @@ agentinit mcp --search <query> # Search MCPs
90
92
  agentinit mcp --install <name> # Install specific MCP
91
93
  ```
92
94
 
95
+ ### `agentinit verify_mcp`
96
+
97
+ Verify MCP server installations and list their capabilities.
98
+
99
+ ```bash
100
+ agentinit verify_mcp --all # Verify all configured MCP servers
101
+ agentinit verify_mcp --mcp-name <name> # Verify specific MCP server
102
+ ```
103
+
104
+ **Examples:**
105
+ ```bash
106
+ # Verify all MCPs in project
107
+ agentinit verify_mcp --all
108
+
109
+ # Verify specific server
110
+ agentinit verify_mcp --mcp-name everything
111
+
112
+ # Test MCP configuration directly
113
+ agentinit verify_mcp --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
114
+
115
+ agentinit verify_mcp --mcp-http
116
+ ```
117
+
118
+ Shows connection status, response time, and available tools/resources/prompts for each MCP server.
119
+
93
120
  ### `agentinit apply`
94
121
 
95
122
  Apply configurations including MCP server setup.
@@ -98,12 +125,13 @@ Apply configurations including MCP server setup.
98
125
 
99
126
 
100
127
  ```bash
101
- # Configure STDIO MCP with arguments
128
+ # Configure STDIO MCP with everything server (recommended example)
102
129
  npx agentinit apply \
103
- --mcp-stdio context7 "npx -y @upstash/context7-mcp" --args "--api-key=YOUR_API_KEY"
130
+ --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
104
131
 
105
132
  # Configure multiple MCPs in one command
106
133
  npx agentinit apply \
134
+ --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything" \
107
135
  --mcp-stdio supabase "npx -y @supabase/mcp-server-supabase@latest" \
108
136
  --args "--read-only --project-ref=<project-ref>" \
109
137
  --env "SUPABASE_ACCESS_TOKEN=<personal-access-token>" \
@@ -114,14 +142,78 @@ npx agentinit apply \
114
142
  npx agentinit apply \
115
143
  --mcp-http github "https://api.githubcopilot.com/mcp/" --auth "Bearer YOUR_GITHUB_PAT"
116
144
 
145
+ # Configure HTTP MCP with custom headers
146
+ npx agentinit apply \
147
+ --mcp-http context7 "https://mcp.context7.com/mcp" \
148
+ --header "CONTEXT7_API_KEY:YOUR_API_KEY"
149
+
150
+ # Multiple custom headers
151
+ npx agentinit apply \
152
+ --mcp-http api_server "https://api.example.com/mcp" \
153
+ --header "X-API-Key:YOUR_API_KEY" \
154
+ --header "X-Client-ID:YOUR_CLIENT_ID"
155
+
156
+ # Combine Bearer auth with custom headers
157
+ npx agentinit apply \
158
+ --mcp-http advanced_api "https://api.example.com/mcp" \
159
+ --auth "Bearer YOUR_TOKEN" \
160
+ --header "X-Custom-Header:custom_value"
161
+
117
162
  # Configure Docker-based MCP with environment
118
163
  npx agentinit apply \
119
164
  --mcp-stdio browserbase "docker run -i --rm ghcr.io/metorial/mcp-container--browserbase--mcp-server-browserbase--browserbase node cli.js" \
120
165
  --env "BROWSERBASE_API_KEY=browserbase-api-key"
166
+
167
+ # Global configuration with custom headers
168
+ npx agentinit apply --global --client claude \
169
+ --mcp-http context7 "https://mcp.context7.com/mcp" \
170
+ --header "CONTEXT7_API_KEY:YOUR_API_KEY"
171
+
172
+ # Verify MCPs immediately after configuration
173
+ npx agentinit apply --verify-mcp \
174
+ --mcp-stdio everything "npx -y @modelcontextprotocol/server-everything"
121
175
  ```
122
176
 
123
177
  This generates `.agentinit/agentinit.toml` with your MCP configurations.
124
178
 
179
+ **MCP Authentication Options**:
180
+ - `--auth "Bearer TOKEN"` - Adds Authorization header for Bearer token authentication
181
+ - `--header "KEY:VALUE"` - Adds custom headers in KEY:VALUE format (can be used multiple times)
182
+ - Both flags can be combined for APIs requiring multiple authentication methods
183
+
184
+ **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.
185
+
186
+ #### Rules Configuration
187
+
188
+ Apply coding rules and best practices to your AI agents using predefined templates or custom rules.
189
+
190
+ ```bash
191
+ # Apply rule templates (recommended combinations)
192
+ agentinit apply --rules git,write_tests,use_linter
193
+
194
+ # Mix templates with custom rules
195
+ agentinit apply --rules git,write_docs --rule-raw "Use TypeScript strict mode"
196
+
197
+ # Load rules from a file
198
+ agentinit apply --rules-file ./project-rules.md
199
+
200
+ # Apply globally to all projects using Claude
201
+ agentinit apply --global --agent claude --rules git,write_tests
202
+
203
+ # Combine with MCP configuration
204
+ agentinit apply --rules git,use_linter --mcp-stdio context7 "npx @context7/mcp"
205
+ ```
206
+
207
+ **Available Rule Templates:**
208
+ - `git` - Enforce Git workflows and commit standards
209
+ - `write_docs` - Require comprehensive documentation
210
+ - `use_git_worktrees` - Enable parallel development with worktrees
211
+ - `use_subagents` - Delegate work to specialized subagents
212
+ - `use_linter` - Enforce code quality and formatting
213
+ - `write_tests` - Implement test-driven development practices
214
+
215
+ **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.
216
+
125
217
  ## 🏗️ Project Structure
126
218
 
127
219
  AgentInit creates and manages these key files:
@@ -130,7 +222,10 @@ AgentInit creates and manages these key files:
130
222
  your-project/
131
223
  ├── agents.md # Universal agent configuration
132
224
  ├── CLAUDE.md # Claude-specific config (synced)
133
- ├── .cursorrules # Cursor-specific config (synced)
225
+ ├── .cursor/rules/ # Cursor rules (MDC files)
226
+ │ ├── 001_workspace.mdc
227
+ │ └── 002_frontend.mdc
228
+ ├── AGENTS.md # Simple agent instructions (alternative)
134
229
  └── .windsurfrules # Windsurf-specific config (synced)
135
230
  ```
136
231
 
@@ -171,7 +266,7 @@ This is a TypeScript project using Next.js...
171
266
  | Agent | Config File | Status |
172
267
  |-------|-------------|--------|
173
268
  | Claude | `CLAUDE.md` | ✅ |
174
- | Cursor | `.cursorrules` | ✅ |
269
+ | Cursor | `.cursor/rules/*.mdc` or `AGENTS.md` | ✅ |
175
270
  | Windsurf | `.windsurfrules` | ✅ |
176
271
  | Copilot | `.github/copilot.yml` | 🚧 |
177
272
  | Codeium | `.codeium/config.json` | 🚧 |
Binary file