ted-mosby 1.1.0 → 1.1.1

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 +175 -20
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -43,40 +43,41 @@ npm install -g ted-mosby
43
43
  export ANTHROPIC_API_KEY=your-api-key-here
44
44
  ```
45
45
 
46
- Or create a `.env` file in your project:
47
- ```bash
48
- echo "ANTHROPIC_API_KEY=your-api-key-here" > .env
49
- ```
50
-
51
- ### 2. Generate documentation
46
+ ### 2. Generate wiki + interactive site
52
47
 
53
48
  ```bash
54
- # For a local project
55
- ted-mosby generate -r ./my-project
49
+ # Generate wiki with interactive site in one command
50
+ ted-mosby generate -r ./my-project --site
56
51
 
57
- # For a GitHub repository
58
- ted-mosby generate -r https://github.com/user/repo
52
+ # Or for a GitHub repository
53
+ ted-mosby generate -r https://github.com/user/repo --site
59
54
  ```
60
55
 
61
56
  ### 3. View the results
62
57
 
63
- Open the generated `wiki/README.md` to explore your architectural documentation.
58
+ - **Markdown wiki**: Open `wiki/README.md`
59
+ - **Interactive site**: Open `wiki/site/index.html` in your browser
60
+
61
+ The static site includes search, navigation, keyboard shortcuts, and works offline.
64
62
 
65
63
  ---
66
64
 
67
65
  ## Usage
68
66
 
69
- ### Basic Commands
67
+ ### Generate Command
70
68
 
71
69
  ```bash
72
- # Generate wiki for current directory
70
+ # Basic: Generate wiki for current directory
73
71
  ted-mosby generate -r .
74
72
 
75
- # Generate wiki for a specific directory
76
- ted-mosby generate -r /path/to/project
73
+ # With interactive static site
74
+ ted-mosby generate -r ./my-project --site
75
+
76
+ # Custom site title and theme
77
+ ted-mosby generate -r ./my-project --site --site-title "My Project Docs" --theme dark
77
78
 
78
- # Generate wiki from a GitHub URL
79
- ted-mosby generate -r https://github.com/user/repo
79
+ # Generate site only (if wiki already exists)
80
+ ted-mosby generate -r ./my-project --site-only
80
81
 
81
82
  # Specify output directory
82
83
  ted-mosby generate -r ./my-project -o ./docs/architecture
@@ -91,7 +92,63 @@ ted-mosby generate -r ./my-project -v
91
92
  ted-mosby generate -r ./my-project -e
92
93
  ```
93
94
 
94
- ### All Options
95
+ ### Continue Command
96
+
97
+ Resume generation to fix broken links or add missing pages:
98
+
99
+ ```bash
100
+ # Check for and generate missing pages
101
+ ted-mosby continue -r ./my-project -o ./wiki
102
+
103
+ # Just verify (don't generate)
104
+ ted-mosby continue -r ./my-project -o ./wiki --verify-only
105
+
106
+ # Use cached index for faster iteration
107
+ ted-mosby continue -r ./my-project -o ./wiki --skip-index
108
+ ```
109
+
110
+ ### Large Codebase Options
111
+
112
+ For repositories with 10,000+ files:
113
+
114
+ ```bash
115
+ # Limit indexed chunks (reduces memory usage)
116
+ ted-mosby generate -r ./large-project --max-chunks 5000
117
+
118
+ # Reduce search results per query
119
+ ted-mosby generate -r ./large-project --max-results 5
120
+
121
+ # Batched processing (for very large repos)
122
+ ted-mosby generate -r ./large-project --batch-size 3000
123
+ ```
124
+
125
+ ### Direct API Mode
126
+
127
+ Bypass Claude Code billing and use your API credits directly:
128
+
129
+ ```bash
130
+ # Uses ANTHROPIC_API_KEY directly
131
+ ted-mosby generate -r ./my-project --direct-api
132
+
133
+ # Combine with skip-index for fast iteration
134
+ ted-mosby generate -r ./my-project --direct-api --skip-index
135
+ ```
136
+
137
+ ### Debug & Development
138
+
139
+ ```bash
140
+ # Skip re-indexing (use cached embeddings)
141
+ ted-mosby generate -r ./my-project --skip-index
142
+
143
+ # Limit agent turns (reduces cost)
144
+ ted-mosby generate -r ./my-project --max-turns 50
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Command Reference
150
+
151
+ ### `generate` - Create wiki documentation
95
152
 
96
153
  | Option | Description | Default |
97
154
  |--------|-------------|---------|
@@ -104,6 +161,43 @@ ted-mosby generate -r ./my-project -e
104
161
  | `-f, --force` | Force regeneration (ignore cache) | - |
105
162
  | `-v, --verbose` | Show detailed progress | - |
106
163
  | `-e, --estimate` | Estimate time/cost (dry run) | - |
164
+ | `-s, --site` | Generate interactive static site | - |
165
+ | `--site-only` | Generate site only (skip wiki) | - |
166
+ | `--site-title <title>` | Custom site title | Project name |
167
+ | `--theme <theme>` | Site theme: `light`, `dark`, `auto` | `auto` |
168
+ | `--max-chunks <n>` | Limit indexed chunks | unlimited |
169
+ | `--max-results <n>` | Max search results per query | `10` |
170
+ | `--batch-size <n>` | Enable batched processing | - |
171
+ | `--skip-index` | Use cached embeddings index | - |
172
+ | `--max-turns <n>` | Limit agent iterations | `200` |
173
+ | `--direct-api` | Use Anthropic API directly | - |
174
+
175
+ ### `continue` - Resume/fix wiki generation
176
+
177
+ | Option | Description | Default |
178
+ |--------|-------------|---------|
179
+ | `-r, --repo <path>` | Repository path (required) | - |
180
+ | `-o, --output <dir>` | Wiki output directory | `./wiki` |
181
+ | `-m, --model <model>` | Claude model to use | `claude-sonnet-4-20250514` |
182
+ | `-v, --verbose` | Show detailed progress | - |
183
+ | `--verify-only` | Only check, don't generate | - |
184
+ | `--skip-index` | Use cached embeddings index | - |
185
+ | `--direct-api` | Use Anthropic API directly | - |
186
+ | `--max-turns <n>` | Limit agent iterations | `200` |
187
+
188
+ ---
189
+
190
+ ## Static Site Features
191
+
192
+ When you use `--site`, Ted Mosby generates a fully interactive documentation site:
193
+
194
+ - **Full-text search** - Instant search across all pages (Cmd/Ctrl+K)
195
+ - **Keyboard navigation** - Arrow keys, vim-style (j/k/h/l)
196
+ - **Dark/light mode** - Respects system preference or manual toggle
197
+ - **Table of contents** - Auto-generated from headings
198
+ - **Mobile responsive** - Works on all devices
199
+ - **Offline capable** - No server required
200
+ - **Mermaid diagrams** - Rendered automatically
107
201
 
108
202
  ---
109
203
 
@@ -115,7 +209,8 @@ When you run Ted Mosby:
115
209
  2. **Semantic Indexing** - Creates embeddings for intelligent code search
116
210
  3. **Architecture Discovery** - Identifies patterns, components, and relationships
117
211
  4. **Documentation Generation** - Writes markdown pages with diagrams
118
- 5. **Source Linking** - Every concept links to specific file:line references
212
+ 5. **Verification Loop** - Checks all links and generates missing pages
213
+ 6. **Source Linking** - Every concept links to specific file:line references
119
214
 
120
215
  ### Typical Runtime
121
216
 
@@ -144,7 +239,11 @@ wiki/
144
239
  │ └── index.md # Per-module documentation
145
240
  ├── guides/
146
241
  │ └── getting-started.md # Quick start guide
147
- └── glossary.md # Concept index
242
+ ├── glossary.md # Concept index
243
+ └── site/ # (with --site flag)
244
+ ├── index.html # Interactive site entry
245
+ ├── styles.css
246
+ └── scripts.js
148
247
  ```
149
248
 
150
249
  ### Source Traceability Example
@@ -192,6 +291,29 @@ Create a `wiki.json` file in your project root to customize generation:
192
291
 
193
292
  ---
194
293
 
294
+ ## Technical Details
295
+
296
+ ### RAG Chunking System
297
+
298
+ Ted Mosby uses a sophisticated RAG (Retrieval Augmented Generation) system:
299
+
300
+ - **Chunk size**: 1,500 characters with 200 character overlap
301
+ - **Language-aware boundaries**: Chunks end at logical points (`}`, `};`, `end`)
302
+ - **Embedding model**: `all-MiniLM-L6-v2` (384 dimensions, runs locally)
303
+ - **Vector search**: FAISS with `IndexFlatIP` for cosine similarity
304
+ - **Fallback**: Keyword search when FAISS unavailable
305
+
306
+ ### Chunk Prioritization
307
+
308
+ For large codebases, chunks are prioritized by importance:
309
+ - Core directories (`src/`, `lib/`, `app/`): +100 points
310
+ - Entry points (`index.*`, `main.*`): +50 points
311
+ - Config files: +30 points
312
+ - Test files: -50 points
313
+ - Vendor/generated code: -100 points
314
+
315
+ ---
316
+
195
317
  ## How It Works
196
318
 
197
319
  Ted Mosby is built with:
@@ -200,6 +322,39 @@ Ted Mosby is built with:
200
322
  - **RAG (Retrieval Augmented Generation)** - Semantic code search using embeddings
201
323
  - **[Model Context Protocol (MCP)](https://modelcontextprotocol.io)** - Tool integration for file operations
202
324
  - **Mermaid** - Architecture diagram generation
325
+ - **FAISS** - High-performance vector similarity search
326
+
327
+ ---
328
+
329
+ ## Troubleshooting
330
+
331
+ ### "Credit balance is too low" error
332
+
333
+ Use `--direct-api` to bypass Claude Code's billing check:
334
+ ```bash
335
+ ted-mosby generate -r ./my-project --direct-api
336
+ ```
337
+
338
+ ### Out of memory on large repos
339
+
340
+ Limit the indexed chunks:
341
+ ```bash
342
+ ted-mosby generate -r ./large-project --max-chunks 5000 --batch-size 3000
343
+ ```
344
+
345
+ ### Slow re-runs during development
346
+
347
+ Skip re-indexing with cached embeddings:
348
+ ```bash
349
+ ted-mosby generate -r ./my-project --skip-index
350
+ ```
351
+
352
+ ### Missing pages / broken links
353
+
354
+ Use the continue command to fix:
355
+ ```bash
356
+ ted-mosby continue -r ./my-project -o ./wiki
357
+ ```
203
358
 
204
359
  ---
205
360
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ted-mosby",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Generate comprehensive architectural documentation wikis for code repositories with source traceability.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -13,7 +13,9 @@
13
13
  "test": "node dist/cli.js --help",
14
14
  "clean": "rm -rf dist",
15
15
  "prepare": "npm run build",
16
- "prepublishOnly": "npm run build && npm test"
16
+ "prepublishOnly": "npm run build && npm test",
17
+ "release": "./scripts/release.sh",
18
+ "publish-npm": "npm publish"
17
19
  },
18
20
  "keywords": [
19
21
  "ai-agent",