rekipedia 0.16.0 → 0.17.18

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
@@ -4,421 +4,140 @@
4
4
 
5
5
  > Your AI tech lead — always available, always up to date.
6
6
 
7
- rekipedia scans any repository into a portable SQLite knowledge store and gives every developer on the team an LLM-powered tech lead they can ask anything: _"How does the auth flow work?", "What's the fastest way to add a new API endpoint?", "What broke the payment service last week?"_
8
-
9
- No hallucinations, no guessing — every answer is grounded in your actual codebase.
10
-
11
- ### Key features
12
- - **Relationship confidence scoring**: every extracted relationship tagged as EXTRACTED/INFERRED/AMBIGUOUS with confidence score
13
- - **Design rationale extraction**: `# NOTE:`, `# HACK:`, `# WHY:` comments extracted as knowledge nodes
14
- - **God nodes**: highest-degree symbols surfaced in index.md and highlighted in the graph UI
15
- - **Interactive dependency graph**: `rekipedia serve` now includes a `/graph` route with D3.js force-directed visualization
16
- - **Git hooks**: `rekipedia hook install` triggers auto-rebuild on every commit
17
- - **Agentic wiki orchestration**: `PlannerAgent` designs the wiki structure dynamically based on your repo
18
- - **Page importance scoring**: planner assigns each page an importance score (0–100); nav sidebar sorts by priority
19
- - **DeepWiki-style sections**: pages grouped into logical sections (`getting-started`, `architecture`, `core-components`, etc.)
20
- - **Wiki sidebar categories**: `reki serve` sidebar groups pages by `section` field with collapsible headers
21
- - **Live search**: type in the sidebar search box to filter wiki pages by title or category instantly
22
- - **Refactor analysis**: `reki refactor` detects code smells (god class, circular deps, dead code, high coupling) with LLM-enriched suggestions — outputs `REFACTOR.md` + `refactor_report.json`
23
- - **Context slicing**: each page only receives the data it needs (~40–60% token reduction vs fixed-layout approach)
24
- - **Hybrid RAG Q&A**: FAISS-indexed code chunks + wiki pages give the LLM full codebase context when answering questions
25
- - **Embed provider choice**: `--embed-provider openai|ollama|azure|...` — any litellm-compatible embedding model
26
- - **Wiki export**: bundle to a single Markdown file, ZIP archive, or structured JSON (`rekipedia export`)
27
- - **Incremental updates**: only re-processes changed files after the first scan
28
- - **Grounded Q&A**: answers cite real file paths and line numbers — no hallucinations
29
- - **Codebase tree index** — every scan builds a hierarchical directory/file tree in SQLite, enabling structured navigation and future reasoning-based retrieval.
30
- - **Rust full symbol extraction** — `RustExtractor` (tree-sitter) now extracts enums, type aliases, `const`/`static`, `macro_rules!`, `mod`, and intra-file call-graph edges — on par with Go, TypeScript, and Python extractors.
31
- - **`--doc-type` flag for `reki scan`** — shape wiki generation style with `api-ref`, `tutorial`, `runbook`, `adr`, or `changelog`. Each type injects a specialist prompt preamble before the standard system prompt. Also readable from env var `REKIPEDIA_DOC_TYPE`.
32
- - **GitHub Actions official action** — use `uses: unrealandychan/rekipedia@v1` in any workflow to scan, generate wiki pages, export HTML, and upload artifacts. Auto-detects LLM provider from model name. Supports `focus` glob filtering and optional GitHub Pages deployment.
33
- - **Interactive HTML export** — `reki export --format html` produces a single self-contained `.html` file with dark/light theme, instant search, sidebar navigation, syntax highlighting (highlight.js), Mermaid diagram rendering, and clickable heading anchors. No server required — open in any browser.
34
- - **OSC-8 clickable citations** — `reki ask` answers now print source citations as terminal hyperlinks (iTerm2, WezTerm, Kitty, Windows Terminal, VSCode). Click `src/auth.py:42` to jump directly to the file and line in your editor. Auto-detects terminal support; disable with `REKIPEDIA_OSC8=0`.
35
- - **`--focus` flag for targeted deep scans** — `reki scan --focus src/auth/** --focus src/payment/**` limits extraction and wiki generation to the matched files/directories, dramatically reducing scan time when you only need docs for a sub-system.
7
+ rekipedia scans any repository into a portable SQLite knowledge store and gives every developer an LLM-powered tech lead they can ask anything.
36
8
 
37
- ## Quick start
38
-
39
- ### via npm / npx (no install required)
9
+ No hallucinations — every answer is grounded in your actual codebase.
40
10
 
41
- ```bash
42
- npx rekipedia init .
43
- npx rekipedia scan .
44
- ```
11
+ ---
45
12
 
46
- ### via uv / uvx (no install required)
13
+ ## Quick start
47
14
 
48
15
  ```bash
49
- uvx rekipedia init .
50
- uvx rekipedia scan .
16
+ # No install required
17
+ npx rekipedia init . && npx rekipedia scan .
18
+ # or
19
+ uvx rekipedia init . && uvx rekipedia scan .
51
20
  ```
52
21
 
53
- ### Permanent install
54
-
55
22
  ```bash
56
- # Core (scan + serve + ask)
57
- pip install rekipedia
58
- # or
59
- uv tool install rekipedia
60
-
61
- # With RAG support (semantic embed + search — needs faiss-cpu + numpy ~100MB)
62
- pip install "rekipedia[rag]"
63
-
64
- # Homebrew (Go single binary — no Python needed)
65
- brew tap unrealandychan/tap
66
- brew install rekipedia
23
+ # Permanent install
24
+ pip install rekipedia # core
25
+ pip install "rekipedia[rag]" # + semantic search (FAISS)
67
26
  ```
68
27
 
69
28
  ---
70
29
 
71
- ## Python API
72
-
73
- Use rekipedia programmatically inside Jupyter notebooks, CI pipelines, or any Python application:
74
-
75
- ```python
76
- import rekipedia
77
-
78
- # Scan a local repo
79
- result = rekipedia.scan("/path/to/repo")
80
- print(result.page_count) # number of wiki pages generated
81
- print(result.symbol_count) # number of code symbols extracted
82
- print(result.token_count) # estimated token count of the wiki
30
+ ## Quick Start — No API Key Needed
83
31
 
84
- # Ask a question grounded answer with file:line citations
85
- answer = rekipedia.ask("/path/to/repo", "How does the auth flow work?")
86
- print(answer.text)
87
- for citation in answer.citations:
88
- print(f" {citation.file}:{citation.line}")
32
+ Run a full static analysis without any LLM API key:
89
33
 
90
- # Async variants (Jupyter-friendly)
91
- result = await rekipedia.scan_async("/path/to/repo")
92
- answer = await rekipedia.ask_async("/path/to/repo", "What is the entry point?")
34
+ ```bash
35
+ pip install rekipedia
36
+ reki scan . --no-llm # ~5-10s, zero API calls
37
+ reki onboard . # architecture overview
38
+ reki tour . # guided walkthrough by dependency depth
39
+ reki domain . # business domain layer map
40
+ reki diff . # impact analysis on changed files
41
+ reki export . --format md # export full wiki to markdown
93
42
  ```
94
43
 
95
- **Return types:**
96
-
97
- | Type | Key fields |
98
- |---|---|
99
- | `ScanResult` | `page_count`, `symbol_count`, `token_count`, `wiki_pages`, `db_path`, `wiki_dir` |
100
- | `AskResult` | `text`, `citations: list[Citation]`, `model_used` |
101
- | `Citation` | `file`, `line`, `snippet` |
44
+ > **Note:** `reki ask` (AI Q&A) requires an LLM API key. See [LLM Setup](#llm-setup) below.
102
45
 
103
46
  ---
104
47
 
105
- ## Commands
48
+ ## Core commands
106
49
 
107
- | Command | Description |
50
+ | Command | What it does |
108
51
  |---|---|
109
- | `rekipedia init [REPO]` | Scaffold `.rekipedia/` with `config.yml` and update `.gitignore` |
110
- | `rekipedia scan [REPO]` | Full analysis extracts symbols, synthesises wiki pages, exports JSON |
111
- | `rekipedia update [REPO]` | Incremental refresh — re-extracts only changed files, keeps the rest |
112
- | `rekipedia ask [QUESTION]` | Interactive Q&A REPLstreaming answers, Ctrl+C to quit |
113
- | `rekipedia serve [REPO]` | Start a local web UI to browse wiki pages and ask questions |
114
- | `rekipedia embed [REPO]` | Build (or rebuild) the FAISS semantic search index for hybrid RAG Q&A |
115
- | `rekipedia export [REPO]` | Bundle the wiki to a single file (`--format md\|zip\|json`) |
116
- | `rekipedia hook install/uninstall/status` | Manage git post-commit hook for auto wiki rebuild |
117
- | `rekipedia diff [A] [B]` | Compare two graph snapshots (defaults to last two) |
118
- | `rekipedia impact <file>` | Show blast-radius all affected files, symbols, tests for a changed file |
119
- | `rekipedia search <query>` | Search symbols (`--all-repos` for cross-repo parallel search) |
120
- | `rekipedia export --format graphml\|cypher\|obsidian` | Export graph to GraphML / Neo4j Cypher / Obsidian wikilinks |
121
- | `rekipedia mcp` | Start JSON-RPC 2.0 MCP stdio server (6 tools for AI coding assistants) |
122
- | `rekipedia watch add\|start\|list\|remove` | Watch repos and auto-index on file change |
123
- | `rekipedia refactor [REPO]` | Detect code smells + generate `REFACTOR.md` and `refactor_report.json` (use `--no-llm` for static only) |
124
- | `rekipedia note add\|list\|remove\|edit\|import` | Manage persistent tech lead notes injected into `reki ask` context automatically |
125
- | `rekipedia review` | LLM-powered PR diff review grounded in the wiki — `--staged`, `--branch`, `--pr`, `--diff` |
52
+ | `reki init .` | Scaffold config |
53
+ | `reki scan .` | Full analysis wiki + knowledge store |
54
+ | `reki update .` | Incremental refresh (changed files only) |
55
+ | `reki serve .` | Local web UIbrowse, search, ask AI |
56
+ | `reki ask` | Interactive Q&A REPL (streamed) |
57
+ | `reki embed .` | Build FAISS semantic index for hybrid RAG |
58
+ | `reki export .` | Bundle wiki `--format md\|zip\|json\|html` |
59
+ | `reki diff` | Uncommitted-change impact analysis |
60
+ | `reki domain .` | Map codebase to business layers (API/Service/Data/UI) |
61
+ | `reki tour .` | Guided learning walkthrough by dependency depth |
62
+ | `reki onboard .` | Static onboarding guide for new developers |
63
+ | `reki review` | LLM PR review grounded in wiki context |
64
+ | `reki refactor .` | Detect code smells `REFACTOR.md` |
65
+ | `reki watch .` | Auto-index on file change (OS watcher) |
66
+ | `reki hook install` | Git post-commit auto-rebuild |
67
+ | `reki mcp` | MCP stdio server for AI coding assistants |
126
68
 
127
69
  ---
128
70
 
129
- ## LLM configuration
71
+ ## LLM Setup
130
72
 
131
- After running `rekipedia init`, edit `.rekipedia/config.yml`:
73
+ rekipedia uses [litellm](https://github.com/BerriAI/litellm) and supports any provider:
74
+
75
+ | Provider | Example |
76
+ |---|---|
77
+ | OpenAI | `OPENAI_API_KEY=sk-... reki scan .` |
78
+ | Anthropic Claude | `REKIPEDIA_MODEL=claude-3-5-sonnet-20241022 REKIPEDIA_API_KEY=sk-ant-... reki scan .` |
79
+ | Google Gemini | `REKIPEDIA_MODEL=gemini/gemini-2.0-flash REKIPEDIA_API_KEY=AIza... reki scan .` |
80
+ | OpenRouter | `REKIPEDIA_MODEL=openrouter/anthropic/claude-3.5-sonnet REKIPEDIA_API_KEY=sk-or-... reki scan .` |
81
+ | Local Ollama (default) | `REKIPEDIA_MODEL=ollama/llama4 reki scan .` |
82
+ | Azure OpenAI | `REKIPEDIA_MODEL=azure/gpt-4o REKIPEDIA_BASE_URL=https://your-resource.openai.azure.com REKIPEDIA_API_KEY=... reki scan .` |
83
+
84
+ After `reki init`, edit `.rekipedia/config.yml`:
132
85
 
133
86
  ```yaml
134
- version: 1
135
- ignore:
136
- - .git
137
- - node_modules
138
- - __pycache__
139
- - .rekipedia
140
- languages:
141
- - python
142
- - typescript
143
87
  llm:
144
88
  model: ollama/llama4 # any litellm model string
145
- api_key: "" # or set REKIPEDIA_API_KEY env var
89
+ api_key: "" # or REKIPEDIA_API_KEY env var
146
90
  base_url: "" # for local / self-hosted endpoints
147
91
  temperature: 0.2
148
92
  ```
149
93
 
150
- ### Supported providers (via [litellm](https://docs.litellm.ai))
151
-
152
- | Provider | Example model string |
153
- |---|---|
154
- | Ollama (local, free) | `ollama/llama4` |
155
- | OpenAI | `gpt-5.5` |
156
- | Anthropic | `claude-opus-4-6` |
157
- | Google Gemini | `gemini/gemini-3.0-pro` |
158
- | Any OpenAI-compatible | set `base_url` in config |
94
+ Supported providers: Ollama, OpenAI, Anthropic, Gemini, any OpenAI-compatible endpoint.
159
95
 
160
- ### Runtime overrides (env vars)
161
-
162
- ```bash
163
- export REKIPEDIA_MODEL=gpt-5.5
164
- export REKIPEDIA_API_KEY=sk-...
165
- export REKIPEDIA_BASE_URL=https://my-proxy/v1
166
- export REKIPEDIA_SHARD_TOKEN_BUDGET=40000
167
- ```
168
-
169
- | Variable | Description |
170
- |---|---|
171
- | `REKIPEDIA_MODEL` | LLM model name to use |
172
- | `REKIPEDIA_API_KEY` | API key for the LLM provider |
173
- | `REKIPEDIA_BASE_URL` | Base URL for OpenAI-compatible endpoints |
174
- | `REKIPEDIA_SHARD_TOKEN_BUDGET` | Max tokens per shard group (default: 40000) |
175
- | `REKIPEDIA_AGENT_ASK` | Set to `1` to enable agentic ReAct ask loop (default: `0` — single-shot) |
176
- | `REKIPEDIA_ASK_MAX_ITER` | Max tool-call iterations for agentic ask (default: `5`) |
177
- | `REKIPEDIA_STREAM` | Set to `0` to disable streaming output for `reki ask` (default: `1` — streaming on) |
178
- | `REKIPEDIA_AGENT_PLANNER` | Set to `1` to enable tool-calling wiki planner (default: `0`) |
96
+ Environment variables:
97
+ - `REKIPEDIA_MODEL` — litellm model string (default: `ollama/llama4`)
98
+ - `REKIPEDIA_API_KEY` — API key for the chosen provider
99
+ - `REKIPEDIA_BASE_URL` — custom base URL (for Azure, Ollama, proxies)
100
+ - `REKIPEDIA_TIMEOUT` — LLM call timeout in seconds (default: 180)
179
101
 
180
102
  ---
181
103
 
182
- ## Output
183
-
184
- `rekipedia scan` writes everything to `.rekipedia/` inside your repo:
104
+ ## Output layout
185
105
 
186
106
  ```
187
107
  .rekipedia/
188
- ├── config.yml # your settings (committed)
189
- ├── store.db # SQLite knowledge store (git-ignored)
190
- ├── scan_meta.json # last scan metadata (model, timestamp, file count)
191
- ├── wiki/ # generated Markdown pages (3–15 pages, dynamically planned)
192
- ├── index.md
193
- │ ├── architecture-overview.md
194
- │ ├── repository-structure.md
195
- │ └── ... (pages vary by repo)
196
- ├── rag/ # RAG index (git-ignored)
197
- │ ├── index.faiss # FAISS flat L2 index
198
- │ └── chunks.json # source code chunks + metadata
199
- ├── diagrams/ # Mermaid diagram files
200
- │ ├── module-graph.md
201
- │ └── class-hierarchy.md
202
- └── exports/ # JSON exports
203
- ├── symbols.json
204
- ├── relationships.json
205
- └── manifest.json # run summary + metadata + page importance scores
206
- ```
207
-
208
- Dynamically generates 3–15 wiki pages based on repo complexity (powered by PlannerAgent).
209
-
210
- The wiki structure is designed dynamically by `PlannerAgent` based on what's actually present in your repo:
211
-
212
- | Section | Example pages | When generated |
213
- |---|---|---|
214
- | Getting Started | index, installation, quick-start | Always |
215
- | Architecture | architecture-overview, data-flow, repository-structure | ≥3 modules |
216
- | Core Components | One page per major module | ≥2 modules |
217
- | API Reference | cli-reference, python-api, rest-api | CLI/HTTP handlers found |
218
- | Development | testing, contributing, ci-cd | Test files found |
219
- | Ecosystem | integrations, deployment | ≥3 external deps |
220
-
221
- ### Scan options
222
-
223
- ```bash
224
- # Use a specific LLM model
225
- rekipedia scan . --model gpt-5.5
226
-
227
- # Skip Docker (run extractors in-process)
228
- rekipedia scan . --no-docker
229
-
230
- # Write output to a custom directory
231
- rekipedia scan . --output-dir /tmp/wiki-output
232
-
233
- # Enable debug logging (litellm, HTTP, full tracebacks)
234
- rekipedia scan . --verbose
235
-
236
- # Auto-embed for RAG after scan
237
- rekipedia scan . --embed-model text-embedding-3-small --embed-provider openai
238
- ```
239
-
240
- ### RAG / semantic search
241
-
242
- `rekipedia ask` uses **hybrid retrieval** — wiki pages + FAISS-indexed code chunks — to answer questions with full codebase context.
243
-
244
- ```bash
245
- # Build or rebuild the FAISS index
246
- rekipedia embed .
247
-
248
- # Custom embedding model + provider
249
- rekipedia embed . --model text-embedding-3-small --provider openai
250
- rekipedia embed . --model nomic-embed-text --provider ollama
251
-
252
- # If your embed provider uses a DIFFERENT API key from your main LLM:
253
- rekipedia embed . --model text-embedding-3-small --provider openai
254
- # set embed_api_key in config.yml, or:
255
- export REKIPEDIA_EMBED_API_KEY=sk-your-openai-key
256
-
257
- # Or configure everything in .rekipedia/config.yml:
258
- # llm:
259
- # model: ollama/llama4 # main LLM (local)
260
- # embed_model: text-embedding-3-small
261
- # embed_provider: openai
262
- # embed_api_key: sk-xxx # separate key for embed provider
263
- # embed_base_url: "" # optional: custom endpoint
264
-
265
- # Env var overrides (all optional):
266
- export REKIPEDIA_EMBED_MODEL=nomic-embed-text
267
- export REKIPEDIA_EMBED_PROVIDER=ollama
268
- export REKIPEDIA_EMBED_API_KEY=sk-xxx
269
- export REKIPEDIA_EMBED_BASE_URL=https://my-proxy.example.com/v1
270
- ```
271
-
272
- The FAISS index is saved to `.rekipedia/rag/index.faiss` and chunked source code to `.rekipedia/rag/chunks.json`.
273
-
274
- ### Export the wiki
275
-
276
- ```bash
277
- # Single combined Markdown file (default)
278
- rekipedia export . --format md --output ./wiki-export.md
279
-
280
- # ZIP archive (one .md per page + manifest.json)
281
- rekipedia export . --format zip --output ./wiki.zip
282
-
283
- # Structured JSON (all pages + metadata)
284
- rekipedia export . --format json --output ./wiki.json
108
+ ├── config.yml # settings (committed)
109
+ ├── store.db # SQLite knowledge store (git-ignored)
110
+ ├── wiki/ # generated Markdown pages
111
+ ├── rag/ # FAISS index + chunks (git-ignored)
112
+ ├── diagrams/ # Mermaid diagrams
113
+ └── exports/ # JSON exports + manifest
285
114
  ```
286
115
 
287
- ### Incremental update
288
-
289
- After the first scan, `rekipedia update` only re-processes files whose SHA-256 has changed. Unchanged symbols and relationships are carried forward from the previous run — the wiki is refreshed in seconds.
290
-
291
- ```bash
292
- rekipedia update . # auto-detect changed files
293
- rekipedia update . --no-docker # skip Docker
294
- ```
295
-
296
- If no previous scan is found, `update` automatically falls back to a full scan.
297
-
298
- ### Ask the wiki
299
-
300
- ```bash
301
- # Start interactive Q&A session (streams answers token-by-token, Ctrl+C to quit)
302
- rekipedia ask
303
- rekipedia ask --repo ./my-project
304
- rekipedia ask --model gpt-4o
305
-
306
- # Single-shot mode (backward compat)
307
- rekipedia ask -q "How does the auth flow work?"
308
-
309
- # Disable streaming — wait for the full response before printing
310
- rekipedia ask --no-stream
311
- rekipedia ask -q "Explain the architecture" --no-stream
312
- ```
313
-
314
- Answers are grounded **entirely** in your wiki pages and symbol index — the LLM cannot hallucinate details that aren't in the scanned knowledge store. Answers are streamed token-by-token using **rich Markdown rendering** — headers, code blocks, and bullet points render live as the model writes them. Set `REKIPEDIA_STREAM=0` or pass `--no-stream` to disable streaming and wait for the full response first.
315
-
316
- Not happy with a generated page? See **[docs/customizing.md](docs/customizing.md)** — you can pin pages, override prompts, change the writing style, or add your own pages that scans will never touch.
317
-
318
- ### Serve the wiki
319
-
320
- ```bash
321
- rekipedia serve . # opens browser at http://127.0.0.1:7070
322
- rekipedia serve . --port 8080 # custom port
323
- rekipedia serve . --no-browser # don't auto-open browser
324
- ```
325
-
326
- - Browse generated wiki pages in a dark-themed web UI
327
- - Ask questions with the same grounded Q&A (answers streamed via the web)
328
- - Q&A history stored in SQLite
329
-
330
- ### Review a PR or diff
331
-
332
- `reki review` produces a structured LLM code review grounded in the repository's wiki pages and symbol index — it knows your architecture, naming conventions, and known risks:
333
-
334
- ```bash
335
- reki review # auto-detect: review git diff HEAD
336
- reki review --staged # review staged changes
337
- reki review --branch main # diff current branch vs main
338
- reki review --diff changes.patch # review from a patch file
339
- git diff HEAD~1 | reki review # pipe diff from stdin
340
- reki review --pr 42 # fetch & review a GitHub PR (requires GH_TOKEN)
341
- reki review --out review.md # save review to a markdown file
342
- reki review --no-stream # wait for full response before printing
343
- ```
344
-
345
- The review includes: **summary**, **per-file analysis**, **issues rated by severity** (🔴 Critical → 🔵 Nit), **suggestions**, and a **verdict** (✅ LGTM / ⚠️ LGTM with comments / ❌ Needs changes). If no knowledge store is found, the review still works — it just lacks codebase context.
346
-
347
116
  ---
348
117
 
349
- ## Prerequisites
350
-
351
- - **Python ≥ 3.11** (or `uv` which manages its own Python)
352
- - **Docker** — optional; used for isolated extraction. Falls back to in-process runner automatically if Docker is not available (`--no-docker` forces in-process mode)
353
-
354
- ---
355
-
356
- ## Using rekipedia with AI coding agents
357
-
358
- rekipedia ships a **Hermes agent skill** (`rekipedia-agent-skill.md`) that teaches AI assistants (Copilot, Claude Code, Codex) to use rekipedia as their codebase intelligence layer:
359
-
360
- 1. Copy `rekipedia-agent-skill.md` into your Hermes skills directory
361
- 2. Any agent with the skill loaded will automatically scan + query rekipedia before diving into source files
362
- 3. Dramatically reduces context window usage for large codebases
363
-
364
- ---
365
-
366
- ## Agentic Mode
367
-
368
- rekipedia supports an experimental agentic mode where LLM calls use tool-calling (ReAct) instead of single large context dumps.
369
-
370
- ### Agentic Ask
118
+ ## Python API
371
119
 
372
- Set `REKIPEDIA_AGENT_ASK=1` to enable:
120
+ ```python
121
+ import rekipedia
373
122
 
374
- ```bash
375
- REKIPEDIA_AGENT_ASK=1 reki ask "How does authentication work?"
123
+ result = rekipedia.scan("/path/to/repo")
124
+ answer = rekipedia.ask("/path/to/repo", "How does the auth flow work?")
125
+ print(answer.text)
126
+ for c in answer.citations:
127
+ print(f" {c.file}:{c.line}")
376
128
  ```
377
129
 
378
- The LLM issues tool calls to retrieve information on demand:
379
- - `search_code(query)` — semantic search over source code
380
- - `get_symbol(name)` — look up symbol location and signature
381
- - `get_page(slug)` — fetch a wiki page on demand
382
- - `get_relationships(target)` — dependency graph for a symbol/file
383
- - `finish(answer)` — provide final answer
384
-
385
- Max iterations can be configured with `REKIPEDIA_ASK_MAX_ITER` (default: 5).
386
-
387
- ### Agentic Planner
130
+ Async variants: `rekipedia.scan_async()`, `rekipedia.ask_async()`
388
131
 
389
- Set `REKIPEDIA_AGENT_PLANNER=1` to enable tool-calling wiki structure planning:
390
-
391
- ```bash
392
- REKIPEDIA_AGENT_PLANNER=1 reki scan .
393
- ```
394
-
395
- The planner builds the wiki structure incrementally using tool calls instead of generating a single large JSON response.
132
+ ---
396
133
 
397
134
  ## Development
398
135
 
399
136
  ```bash
400
- # Install all deps
401
- make dev
402
-
403
- # Run tests
404
- make test
405
-
406
- # Lint
407
- make lint
408
-
409
- # Build wheel + npm tarball
410
- make build
411
- ```
412
-
413
- ### Release
414
-
415
- ```bash
416
- PYPI_TOKEN=*** NPM_TOKEN=*** make release
417
-
418
- # Full release: build + tag + push + PyPI + npm
419
- make release-all PYPI_TOKEN=*** NPM_TOKEN=***
420
- # With version bump
421
- make release-all PYPI_TOKEN=*** NPM_TOKEN=*** VERSION=0.5.0
137
+ make dev # install deps
138
+ make test # run tests
139
+ make lint # lint
140
+ make build # wheel + npm tarball
422
141
  ```
423
142
 
424
143
  ---
@@ -426,6 +145,3 @@ make release-all PYPI_TOKEN=*** NPM_TOKEN=*** VERSION=0.5.0
426
145
  ## License
427
146
 
428
147
  Proprietary and Confidential — Copyright © 2026 Eddie Chan. All Rights Reserved.
429
-
430
- Unauthorized copying, distribution, or modification of this software is strictly prohibited.
431
- See [LICENSE](LICENSE) for details.
package/README.zh-CN.md CHANGED
@@ -62,6 +62,24 @@ brew install rekipedia
62
62
 
63
63
  ---
64
64
 
65
+ ## 快速开始——无需 API 密钥
66
+
67
+ 无需任何 LLM API 密钥即可执行完整静态分析:
68
+
69
+ ```bash
70
+ pip install rekipedia
71
+ reki scan . --no-llm # ~5-10 秒,零 API 调用
72
+ reki onboard . # 架构总览
73
+ reki tour . # 依赖深度导览
74
+ reki domain . # 业务领域层次图
75
+ reki diff . # 变更影响分析
76
+ reki export . --format md # 导出完整 wiki 为 Markdown
77
+ ```
78
+
79
+ > **注意:** `reki ask`(AI 问答)需要 LLM API 密钥。请参阅下方 [LLM 配置](#llm-配置)。
80
+
81
+ ---
82
+
65
83
  ## Python API
66
84
 
67
85
  在 Jupyter Notebook、CI 流水线或任意 Python 应用中以编程方式使用 rekipedia:
@@ -121,6 +139,23 @@ answer = await rekipedia.ask_async("/path/to/repo", "What is the entry point?")
121
139
 
122
140
  ## LLM 配置
123
141
 
142
+ rekipedia 使用 [litellm](https://github.com/BerriAI/litellm),支持任何提供商:
143
+
144
+ | 提供商 | 示例 |
145
+ |---|---|
146
+ | OpenAI | `OPENAI_API_KEY=sk-... reki scan .` |
147
+ | Anthropic Claude | `REKIPEDIA_MODEL=claude-3-5-sonnet-20241022 REKIPEDIA_API_KEY=sk-ant-... reki scan .` |
148
+ | Google Gemini | `REKIPEDIA_MODEL=gemini/gemini-2.0-flash REKIPEDIA_API_KEY=AIza... reki scan .` |
149
+ | OpenRouter | `REKIPEDIA_MODEL=openrouter/anthropic/claude-3.5-sonnet REKIPEDIA_API_KEY=sk-or-... reki scan .` |
150
+ | 本地 Ollama(默认) | `REKIPEDIA_MODEL=ollama/llama4 reki scan .` |
151
+ | Azure OpenAI | `REKIPEDIA_MODEL=azure/gpt-4o REKIPEDIA_BASE_URL=https://your-resource.openai.azure.com REKIPEDIA_API_KEY=... reki scan .` |
152
+
153
+ 环境变量:
154
+ - `REKIPEDIA_MODEL` — litellm 模型字符串(默认:`ollama/llama4`)
155
+ - `REKIPEDIA_API_KEY` — 所选提供商的 API 密钥
156
+ - `REKIPEDIA_BASE_URL` — 自定义基础 URL(用于 Azure、Ollama、代理)
157
+ - `REKIPEDIA_TIMEOUT` — LLM 调用超时秒数(默认:180)
158
+
124
159
  运行 `rekipedia init` 后,编辑 `.rekipedia/config.yml`:
125
160
 
126
161
  ```yaml
package/README.zh-TW.md CHANGED
@@ -62,6 +62,24 @@ brew install rekipedia
62
62
 
63
63
  ---
64
64
 
65
+ ## 快速開始——無需 API 金鑰
66
+
67
+ 無需任何 LLM API 金鑰即可執行完整靜態分析:
68
+
69
+ ```bash
70
+ pip install rekipedia
71
+ reki scan . --no-llm # ~5-10 秒,零 API 呼叫
72
+ reki onboard . # 架構總覽
73
+ reki tour . # 依賴深度導覽
74
+ reki domain . # 業務領域層次圖
75
+ reki diff . # 變更影響分析
76
+ reki export . --format md # 匯出完整 wiki 為 Markdown
77
+ ```
78
+
79
+ > **注意:** `reki ask`(AI 問答)需要 LLM API 金鑰。請參閱下方 [LLM 設定](#llm-設定)。
80
+
81
+ ---
82
+
65
83
  ## Python API
66
84
 
67
85
  在 Jupyter 筆記本、CI 流水線或任何 Python 應用程式中以程式化方式使用 rekipedia:
@@ -121,6 +139,23 @@ answer = await rekipedia.ask_async("/path/to/repo", "What is the entry point?")
121
139
 
122
140
  ## LLM 設定
123
141
 
142
+ rekipedia 使用 [litellm](https://github.com/BerriAI/litellm),支援任何提供者:
143
+
144
+ | 提供者 | 範例 |
145
+ |---|---|
146
+ | OpenAI | `OPENAI_API_KEY=sk-... reki scan .` |
147
+ | Anthropic Claude | `REKIPEDIA_MODEL=claude-3-5-sonnet-20241022 REKIPEDIA_API_KEY=sk-ant-... reki scan .` |
148
+ | Google Gemini | `REKIPEDIA_MODEL=gemini/gemini-2.0-flash REKIPEDIA_API_KEY=AIza... reki scan .` |
149
+ | OpenRouter | `REKIPEDIA_MODEL=openrouter/anthropic/claude-3.5-sonnet REKIPEDIA_API_KEY=sk-or-... reki scan .` |
150
+ | 本地 Ollama(預設) | `REKIPEDIA_MODEL=ollama/llama4 reki scan .` |
151
+ | Azure OpenAI | `REKIPEDIA_MODEL=azure/gpt-4o REKIPEDIA_BASE_URL=https://your-resource.openai.azure.com REKIPEDIA_API_KEY=... reki scan .` |
152
+
153
+ 環境變數:
154
+ - `REKIPEDIA_MODEL` — litellm 模型字串(預設:`ollama/llama4`)
155
+ - `REKIPEDIA_API_KEY` — 所選提供者的 API 金鑰
156
+ - `REKIPEDIA_BASE_URL` — 自訂基礎 URL(用於 Azure、Ollama、代理)
157
+ - `REKIPEDIA_TIMEOUT` — LLM 呼叫逾時秒數(預設:180)
158
+
124
159
  執行 `rekipedia init` 後,編輯 `.rekipedia/config.yml`:
125
160
 
126
161
  ```yaml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rekipedia",
3
- "version": "0.16.0",
3
+ "version": "0.17.18",
4
4
  "description": "Agentic repo-to-wiki: scan any repository into a portable SQLite knowledge store with wiki pages, diagrams, and grounded Q&A.",
5
5
  "bin": {
6
6
  "rekipedia": "./bin/rekipedia.js"