@autodev/codebase 0.0.6 → 0.0.7

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/README.md CHANGED
@@ -70,6 +70,7 @@ A vector embedding-based code semantic search tool with MCP server and multi-mod
70
70
  - **🔄 Multiple Providers**: OpenAI, Ollama, Jina, Gemini, Mistral, OpenRouter, Vercel
71
71
  - **📊 Real-time Watching**: Automatic index updates
72
72
  - **⚡ Batch Processing**: Efficient parallel processing
73
+ - **📝 Code Outline Extraction**: Generate structured code outlines with AI summaries
73
74
 
74
75
  ## 📦 Installation
75
76
 
@@ -107,6 +108,46 @@ codebase --demo --serve
107
108
 
108
109
  ## 📋 Commands
109
110
 
111
+ ### 📝 AI-Powered Code Outlines
112
+
113
+ Generate intelligent code summaries with one command:
114
+
115
+ ```bash
116
+ codebase --outline "src/**/*.ts" --summarize
117
+ ```
118
+
119
+ **Output Example:**
120
+ ```
121
+ # src/cli.ts (1902 lines)
122
+ └─ Implements a simplified CLI for @autodev/codebase using Node.js native parseArgs.
123
+ Manages codebase indexing, searching, and MCP server operations.
124
+
125
+ 27--35 | function initGlobalLogger
126
+ └─ Initializes a global logger instance with specified log level and timestamps.
127
+
128
+ 45--54 | interface SearchResult
129
+ └─ Defines the structure for search result payloads, including file path, code chunk,
130
+ and relevance score.
131
+
132
+ ... (full outline with AI summaries)
133
+ ```
134
+
135
+ **Benefits:**
136
+ - 🧠 **Understand code fast** - Get function-level summaries without reading every line
137
+ - 💾 **Smart caching** - Only summarizes changed code blocks
138
+ - 🌐 **Multi-language** - English/Chinese summaries supported
139
+ - ⚡ **Batch processing** - Efficiently handles large codebases
140
+
141
+ **Quick Setup:**
142
+ ```bash
143
+ # Configure Ollama (recommended for free, local AI)
144
+ codebase --set-config summarizerProvider=ollama,summarizerOllamaModelId=qwen3-vl:4b-instruct
145
+
146
+ # Or use DeepSeek (cost-effective API)
147
+ codebase --set-config summarizerProvider=openai-compatible,summarizerOpenAiCompatibleBaseUrl=https://api.deepseek.com/v1,summarizerOpenAiCompatibleModelId=deepseek-chat,summarizerOpenAiCompatibleApiKey=sk-your-key
148
+ ```
149
+
150
+
110
151
  ### Indexing & Search
111
152
  ```bash
112
153
  # Index the codebase
@@ -117,7 +158,7 @@ codebase --search="error handling" --path-filters="src/**/*.ts"
117
158
 
118
159
  # Search with custom limit and minimum score
119
160
  codebase --search="authentication" --limit=20 --min-score=0.7
120
- codebase --search="API" -l 30 -s 0.5
161
+ codebase --search="API" -l 30 -S 0.5
121
162
 
122
163
  # Search in JSON format
123
164
  codebase --search="authentication" --json
@@ -178,6 +219,29 @@ codebase --search="utils" --path-filters="{src,test}/**/*.ts"
178
219
  codebase --search="auth" --json
179
220
  ```
180
221
 
222
+ #### 📝 AI-Powered Code Outlines
223
+ Generate intelligent code summaries and outlines:
224
+
225
+ ```bash
226
+ # Extract code structure
227
+ codebase --outline src/index.ts
228
+
229
+ # With AI summaries (recommended)
230
+ codebase --outline "src/**/*.ts" --summarize
231
+
232
+ # Preview before processing
233
+ codebase --outline "src/**/*.ts" --dry-run
234
+
235
+ # Clear cache and regenerate
236
+ codebase --outline src/index.ts --summarize --clear-summarize-cache
237
+ ```
238
+
239
+ **Key Benefits:**
240
+ - 🎯 **Function-level summaries**: Understand code purpose at a glance
241
+ - 💾 **Smart caching**: Avoid redundant LLM calls
242
+ - 🌐 **Multi-language**: English / Chinese support
243
+ - ⚡ **Batch processing**: Efficiently handle large codebases
244
+
181
245
  ## ⚙️ Configuration
182
246
 
183
247
  ### Config Layers (Priority Order)
@@ -228,13 +292,19 @@ codebase --search="auth" --json
228
292
  | **Vector Store** | `qdrantUrl`, `qdrantApiKey` | Qdrant connection |
229
293
  | **Search** | `vectorSearchMinScore`, `vectorSearchMaxResults` | Search behavior |
230
294
  | **Reranker** | `rerankerEnabled`, `rerankerProvider` | Result reranking |
295
+ | **Summarizer** | `summarizerProvider`, `summarizerLanguage`, `summarizerBatchSize` | AI summary generation |
231
296
 
232
297
  **Key CLI Arguments:**
233
298
  - `--serve` / `--index` / `--search` - Core operations
299
+ - `--outline <pattern>` - Extract code outlines (supports glob patterns)
300
+ - `--summarize` - Generate AI summaries for code outlines
301
+ - `--dry-run` - Preview operations before execution
302
+ - `--title` - Show only file-level summaries
303
+ - `--clear-summarize-cache` - Clear all summary caches
234
304
  - `--get-config` / `--set-config` - Configuration management
235
305
  - `--path`, `--demo`, `--force` - Common options
236
306
  - `--limit` / `-l <number>` - Maximum number of search results (default: from config, max 50)
237
- - `--min-score` / `-s <number>` - Minimum similarity score for search results (0-1, default: from config)
307
+ - `--min-score` / `-S <number>` - Minimum similarity score for search results (0-1, default: from config)
238
308
  - `--help` - Show all available options
239
309
 
240
310
  For complete CLI reference, see [CONFIG.md](CONFIG.md).