@@ -91,12 +91,23 @@ The result is a single static binary with zero external dependencies.
9191
9292``` bash
9393# Index with full features (requires ollama or OpenAI for embeddings)
94- mimir analyze /path/to/your/ project
94+ mimir analyze /path/to/your- project
9595
9696# Index without embeddings (faster, graph + BM25 search only)
97- mimir analyze --skip-embeddings /path/to/your/project
97+ mimir analyze --skip-embeddings /path/to/your-project
98+
99+ # Skip auto-setup (daemon, hooks, skills) for manual control
100+ mimir analyze --skip-daemon --skip-hooks --skip-skills /path/to/your-project
98101```
99102
103+ When you run ` mimir analyze ` , it automatically:
104+ 1 . ** Indexes your code** into a knowledge graph
105+ 2 . ** Starts the MCP daemon** for persistent background operation
106+ 3 . ** Configures your editors** (Claude Code, VS Code, Cursor, Windsurf, Zed, OpenCode)
107+ 4 . ** Installs Claude Code hooks** for auto-reindexing on file changes
108+ 5 . ** Generates agent skills** — 4 static methodology skills + dynamic module skills per cluster
109+ 6 . ** Creates context files** — AGENTS.md and CLAUDE.md with live index statistics
110+
100111### 2. Explore via Web UI
101112
102113``` bash
@@ -115,8 +126,20 @@ The web UI provides:
115126### 3. Use with AI Agents (MCP)
116127
117128``` bash
118- # Start the MCP stdio server
119- mimir mcp
129+ # Start the MCP stdio server (or let analyze start it for you)
130+ mimir daemon start
131+
132+ # Check daemon status
133+ mimir daemon status
134+
135+ # View MCP logs (last 30 lines)
136+ mimir daemon logs
137+
138+ # View last 100 lines
139+ mimir daemon logs 100
140+
141+ # Stop the daemon
142+ mimir daemon stop
120143```
121144
122145Or configure in your editor's MCP settings:
@@ -144,19 +167,35 @@ mimir setup
144167
145168| Command | Description |
146169| ---| ---|
147- | ` mimir analyze <path> ` | Index a repository into the knowledge graph |
170+ | ` mimir analyze <path> ` | Index a repository into the knowledge graph with auto-setup |
148171| ` mimir serve ` | Start the HTTP server + web UI (default: port 7842) |
149172| ` mimir mcp ` | Start the MCP stdio server for AI agent integration |
173+ | ` mimir daemon start ` | Start the MCP daemon in the background |
174+ | ` mimir daemon stop ` | Stop the MCP daemon |
175+ | ` mimir daemon status ` | Show daemon status and uptime |
176+ | ` mimir daemon restart ` | Restart the MCP daemon |
177+ | ` mimir daemon logs [lines] ` | View MCP daemon logs (default: 30 lines) |
150178| ` mimir list ` | List all indexed repositories |
151179| ` mimir status [name] ` | Show index status for a repository |
152180| ` mimir clean <name> ` | Remove the index for a repository |
153- | ` mimir setup ` | Configure MCP settings in supported editors |
181+ | ` mimir setup ` | Configure MCP settings in all supported editors |
154182| ` mimir wiki [name] ` | Generate a wiki from the knowledge graph |
155183
156- ### Flags
184+ ### Analyze Flags
157185
158186``` bash
159187mimir analyze --skip-embeddings < path> # Skip embedding generation
188+ mimir analyze --skip-daemon < path> # Don't start MCP daemon
189+ mimir analyze --skip-hooks < path> # Don't install Claude Code hooks
190+ mimir analyze --skip-skills < path> # Don't install agent skills
191+ mimir analyze --force < path> # Force full re-index even if up to date
192+ mimir analyze --incremental < path> # Force incremental mode
193+ mimir analyze --hint < file> < path> # Hint for faster patch planning
194+ ```
195+
196+ ### Other Flags
197+
198+ ``` bash
160199mimir serve --port 8080 # Custom port (default: 7842)
161200```
162201
@@ -192,7 +231,82 @@ When connected via MCP, AI agents get access to 7 tools:
192231| ` detect_changes ` | Detect uncommitted/recent git changes and their impact |
193232| ` rename ` | Plan a coordinated multi-file rename |
194233| ` cypher ` | Execute raw graph queries |
195- | ` reindex ` | Trigger incremental re-indexing |
234+ | ` list_repos ` | List all indexed repositories |
235+
236+ ---
237+
238+ ## Auto-Analyze Features
239+
240+ When you run ` mimir analyze ` , Mimir sets up a complete AI-powered development environment automatically:
241+
242+ ### 1. MCP Daemon
243+
244+ The daemon runs in the background, keeping the MCP server always available:
245+
246+ ``` bash
247+ mimir daemon start # Start background daemon
248+ mimir daemon status # Check status and uptime
249+ mimir daemon logs # View last 30 log lines
250+ mimir daemon logs 100 # View last 100 log lines
251+ mimir daemon stop # Stop daemon
252+ ```
253+
254+ ** Log file location** : ` ~/.mimir/mimir-mcp.log `
255+
256+ The daemon logs all MCP requests, tool calls, errors, and timing information for debugging.
257+
258+ ### 2. Editor Auto-Configuration
259+
260+ Mimir detects and configures MCP settings for:
261+ - Claude Code
262+ - VS Code (Copilot)
263+ - Cursor
264+ - Windsurf
265+ - Zed
266+ - OpenCode
267+
268+ ### 3. Claude Code Hooks
269+
270+ Two bash hooks enhance your Claude Code experience:
271+
272+ ** Pre-Search Hook** (` mimir-pre-search.sh ` ):
273+ - Intercepts ` grep ` , ` rg ` , ` find ` , and ` Glob ` tool calls
274+ - Automatically queries the Mimir graph for context
275+ - Augments search results with graph intelligence
276+
277+ ** Post-Write Hook** (` mimir-post-write.sh ` ):
278+ - Triggers after file writes or git commits
279+ - Runs incremental re-indexing automatically
280+ - Fire-and-forget (never blocks Claude)
281+
282+ Hooks are installed to ` .claude/hooks/ ` and configured in ` .claude/settings.json ` .
283+
284+ ### 4. Agent Skills
285+
286+ Mimir installs specialized skills for AI agents:
287+
288+ ** Static Skills** (always installed):
289+ - ` exploring.md ` — Navigate code using the knowledge graph
290+ - ` debugging.md ` — Trace bugs through call chains
291+ - ` impact-analysis.md ` — Analyze blast radius before edits
292+ - ` refactoring.md ` — Plan safe multi-file refactors
293+
294+ ** Dynamic Module Skills** (generated per project):
295+ - One skill per detected code cluster/module
296+ - Includes key files, entry points, and dependencies
297+ - Skips low-cohesion clusters (< 0.3 score)
298+
299+ Skills are installed to ` .claude/skills/mimir/ ` .
300+
301+ ### 5. Context Files
302+
303+ ** AGENTS.md** and ** CLAUDE.md** are generated with:
304+ - Live index statistics (symbols, edges, clusters, processes)
305+ - Functional cluster list with cohesion scores
306+ - Execution flow traces
307+ - MCP tool usage guidelines
308+
309+ Read these files before starting work to understand the codebase structure.
196310
197311---
198312
@@ -265,7 +379,3 @@ mimir/
265379```
266380
267381---
268-
269- ## License
270-
271- MIT
0 commit comments