@reinteractive/rails-insight 1.0.8 → 1.0.10

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 (2) hide show
  1. package/README.md +50 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -50,14 +50,14 @@ npx @reinteractive/rails-insight --project-root /path/to/your/rails/app
50
50
 
51
51
  ## Claude Code Integration
52
52
 
53
- Add to your Claude Code MCP configuration:
53
+ Add to your Claude Code MCP configuration (`~/.claude/claude_desktop_config.json` or via `claude mcp add`):
54
54
 
55
55
  ```json
56
56
  {
57
57
  "mcpServers": {
58
58
  "railsinsight": {
59
- "command": "npx",
60
- "args": ["-y", "@reinteractive/rails-insight"]
59
+ "command": "node",
60
+ "args": ["/opt/homebrew/lib/node_modules/@reinteractive/rails-insight/bin/railsinsight.js", "-p", "."]
61
61
  }
62
62
  }
63
63
  }
@@ -71,31 +71,54 @@ In your `.cursor/mcp.json`:
71
71
  {
72
72
  "mcpServers": {
73
73
  "railsinsight": {
74
- "command": "npx",
75
- "args": ["-y", "@reinteractive/rails-insight"]
74
+ "command": "node",
75
+ "args": ["/opt/homebrew/lib/node_modules/@reinteractive/rails-insight/bin/railsinsight.js", "-p", "."]
76
76
  }
77
77
  }
78
78
  }
79
79
  ```
80
80
 
81
- The server uses the workspace directory as the project root automatically, so no path argument is needed for normal project-local use.
81
+ First install globally, then confirm the path:
82
+
83
+ ```bash
84
+ npm install -g @reinteractive/rails-insight
85
+ npm root -g
86
+ # e.g. /opt/homebrew/lib/node_modules — update args above to match
87
+ ```
88
+
89
+ The `-p .` flag sets the project root to your current workspace directory.
82
90
 
83
91
  ## VS Code Integration
84
92
 
85
- In your VS Code `.mcp.json` file:
93
+ In your VS Code `.mcp.json` file (or `.vscode/mcp.json`):
86
94
 
87
95
  ```json
88
96
  {
89
97
  "servers": {
90
98
  "railsinsight": {
91
99
  "type": "stdio",
92
- "command": "npx",
93
- "args": ["-y", "@reinteractive/rails-insight"]
100
+ "command": "node",
101
+ "args": ["/opt/homebrew/lib/node_modules/@reinteractive/rails-insight/bin/railsinsight.js"]
94
102
  }
95
103
  }
96
104
  }
97
105
  ```
98
106
 
107
+ First install globally:
108
+
109
+ ```bash
110
+ npm install -g @reinteractive/rails-insight
111
+ ```
112
+
113
+ Then update the path in `args` to match the output of:
114
+
115
+ ```bash
116
+ npm root -g
117
+ # e.g. /opt/homebrew/lib/node_modules
118
+ ```
119
+
120
+ > **Why not `npx`?** On macOS with Homebrew, VS Code may resolve `npx` to a different Node.js installation than your terminal (e.g. `/usr/local/bin/npx` vs `/opt/homebrew/bin/npx`). Using `node` with an explicit path to the globally installed script avoids this ambiguity.
121
+
99
122
  Note: VS Code MCP configuration uses the `servers` block (not `mcpServers` as used by Claude Desktop/Cursor). The `"type": "stdio"` field is required.
100
123
 
101
124
  ## Available Tools
@@ -104,33 +127,33 @@ All 17 tools are available with no tier restrictions.
104
127
 
105
128
  ### Core Tools
106
129
 
107
- | Tool | Description |
108
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
109
- | `index_project` | Re-index the Rails project. In local mode, re-scans the project root. Accepts `force` (boolean) to bypass cache. Returns statistics and duration. |
110
- | `get_overview` | Project summary: Rails/Ruby versions, database, auth strategy, key models and controllers, frontend stack, file counts. Call this first. |
111
- | `get_full_index` | Complete index JSON trimmed to fit a specified token budget (default: 12,000 tokens). |
112
- | `get_model` | Deep extraction for a specific model: associations, validations, scopes with queries, enums with values, callbacks, public methods, database columns. Requires `name`. |
113
- | `get_controller` | Deep extraction for a specific controller: actions with routes, filters, rate limiting, strong params, rescue handlers. Requires `name`. |
114
- | `get_routes` | Complete route map with namespaces, nested resources, member/collection routes. |
115
- | `get_schema` | Database schema with tables, columns, indexes, foreign keys, and model-to-table mapping. |
116
- | `get_subgraph` | Skill-scoped relationship subgraph with ranked files. Skills: `authentication`, `database`, `frontend`, `api`, `jobs`, `email`. |
117
- | `search_patterns` | Search across all extractions for a specific Rails pattern type (e.g. `has_many_through`, `before_action`, `turbo_broadcast`). |
118
- | `get_deep_analysis` | Deep analysis for a specific category. Categories: `authentication`, `authorization`, `jobs`, `email`, `storage`, `caching`, `realtime`, `api_patterns`, `dependencies`, `cela`|
130
+ | Tool | Description |
131
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
132
+ | `index_project` | Re-index the Rails project. In local mode, re-scans the project root. Accepts `force` (boolean) to bypass cache. Returns statistics and duration. |
133
+ | `get_overview` | Project summary: Rails/Ruby versions, database, auth strategy, key models and controllers, frontend stack, file counts. Call this first. |
134
+ | `get_full_index` | Complete index JSON trimmed to fit a specified token budget (default: 12,000 tokens). |
135
+ | `get_model` | Deep extraction for a specific model: associations, validations, scopes with queries, enums with values, callbacks, public methods, database columns. Requires `name`. |
136
+ | `get_controller` | Deep extraction for a specific controller: actions with routes, filters, rate limiting, strong params, rescue handlers. Requires `name`. |
137
+ | `get_routes` | Complete route map with namespaces, nested resources, member/collection routes. |
138
+ | `get_schema` | Database schema with tables, columns, indexes, foreign keys, and model-to-table mapping. |
139
+ | `get_subgraph` | Skill-scoped relationship subgraph with ranked files. Skills: `authentication`, `database`, `frontend`, `api`, `jobs`, `email`. |
140
+ | `search_patterns` | Search across all extractions for a specific Rails pattern type (e.g. `has_many_through`, `before_action`, `turbo_broadcast`). |
141
+ | `get_deep_analysis` | Deep analysis for a specific category. Categories: `authentication`, `authorization`, `jobs`, `email`, `storage`, `caching`, `realtime`, `api_patterns`, `dependencies`, `cela` |
119
142
 
120
143
  ### Test Intelligence Tools
121
144
 
122
- | Tool | Description |
123
- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
145
+ | Tool | Description |
146
+ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124
147
  | `get_coverage_gaps` | Prioritised list of files needing test coverage, with structural context and per-method coverage data from SimpleCov. Accepts optional `category`, `min_gap`, and `l... |
125
148
  | `get_test_conventions` | Detected test patterns and conventions: spec style (request vs controller), let style, auth helper, factories, shared examples, custom matchers, and pattern referen... |
126
149
  | `get_domain_clusters` | Domain-clustered file groups for parallel test generation. Files in the same cluster share associations and factories; different clusters can be worked on simultane... |
127
- | `get_factory_registry` | Parsed FactoryBot factory definitions including attributes, traits, sequences, and associations. Accepts optional `model` to filter by factory name. |
150
+ | `get_factory_registry` | Parsed FactoryBot factory definitions including attributes, traits, sequences, and associations. Accepts optional `model` to filter by factory name. |
128
151
  | `get_well_tested_examples` | High-quality existing spec files suitable as pattern references for test generation agents. Selected by structural complexity per spec category. Accepts `category` ... |
129
152
 
130
153
  ### Blast Radius Tools
131
154
 
132
- | Tool | Description |
133
- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
155
+ | Tool | Description |
156
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
134
157
  | `get_blast_radius` | Analyse the impact of code changes. Accepts explicit file paths or auto-detects from git diff. Returns impacted entities classified by risk level (CRITICAL/HIGH/MEDIUM/LO... |
135
158
  | `get_review_context` | Build a token-budget-aware review summary for changed files. Combines blast radius analysis with relevant code context for AI-assisted code review. Accepts `files`, `base... |
136
159
 
@@ -225,4 +248,4 @@ If you encounter a pattern that isn't detected, please [open an issue](https://g
225
248
 
226
249
  ## License
227
250
 
228
- ISC — see [LICENSE](LICENSE) for details.
251
+ ISC — see [LICENSE](LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reinteractive/rails-insight",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Rails-aware codebase indexer — MCP server for AI agents",
5
5
  "type": "module",
6
6
  "bin": {