deepdoc 2.1.0__tar.gz → 2.2.1__tar.gz
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.
- {deepdoc-2.1.0 → deepdoc-2.2.1}/PKG-INFO +159 -245
- {deepdoc-2.1.0 → deepdoc-2.2.1}/README.md +158 -244
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/__init__.py +1 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/changelog_writer.py +10 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/indexer.py +36 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/persistence.py +53 -17
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/service.py +14 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/source_archive.py +72 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/cli.py +77 -9
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/config.py +12 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/__init__.py +8 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/evidence.py +17 -8
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/generation.py +180 -29
- deepdoc-2.2.1/deepdoc/generator/mdx_compile_gate.py +390 -0
- deepdoc-2.2.1/deepdoc/generator/mdx_validator/__init__.py +182 -0
- deepdoc-2.2.1/deepdoc/generator/mdx_validator/package.json +12 -0
- deepdoc-2.2.1/deepdoc/generator/mdx_validator/validate.mjs +53 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/post_processors.py +11 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/validation.py +85 -16
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/client.py +13 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/persistence_v2.py +124 -17
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/pipeline_v2.py +97 -41
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/bucket_injection.py +20 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/bucket_refinement.py +164 -83
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/common.py +186 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/endpoint_refs.py +4 -142
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/engine.py +80 -7
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/heuristics.py +4 -142
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/nav_shaping.py +9 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/topology.py +10 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/artifacts.py +17 -5
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/clustering.py +6 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/database.py +9 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/endpoints.py +3 -3
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/integrations.py +3 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/runtime.py +8 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/utils.py +4 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/engine.py +1 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/scaffold_files.py +45 -2
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/smart_update_v2.py +115 -26
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/v2_models.py +33 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/PKG-INFO +159 -245
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/SOURCES.txt +5 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/pyproject.toml +4 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_index.py +81 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_source_archive.py +78 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_serve.py +92 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_fumadocs_builder.py +45 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_generation_evidence.py +99 -0
- deepdoc-2.2.1/tests/test_mdx_compile_gate.py +287 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_parallel_pipeline.py +160 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_planner_granularity.py +104 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_smart_update.py +149 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_stale.py +28 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_state.py +16 -1
- {deepdoc-2.1.0 → deepdoc-2.2.1}/LICENSE +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/__main__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/_legacy_types.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/benchmark_v2.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/call_graph.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/answer_mixin.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/chunker.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/deep_research.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/docs_summary.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/embeddings.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/linking.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/live_fallback_mixin.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/providers.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/retrieval_mixin.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/routes.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/scaffold.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/settings.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/symbol_index.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/types.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/json_utils.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/litellm_compat.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/manifest.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/openapi.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/api_detector.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/base.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/go_parser.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/js_ts_parser.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/php_parser.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/python_parser.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/registry.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/base.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/common.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/detector.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/django.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/express.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/falcon.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/fastify.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/go.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/js_shared.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/laravel.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/nestjs.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/python_shared.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/registry.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/repo_resolver.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/vue_parser.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/flow_candidates.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/specializations.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/utils.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/bucket_types.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/page_types.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/selectors.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/system.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/update.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts_v2.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/py.typed +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/common.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/__init__.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/chatbot_components.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/common.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/mdx_utils.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/templates.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/source_metadata.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/updater_v2.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/dependency_links.txt +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/entry_points.txt +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/requires.txt +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/top_level.txt +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/setup.cfg +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_benchmark_scorecard.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_call_graph.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_changelog.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_config.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_embeddings.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_eval.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_persistence.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_providers.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_query.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_relationship.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_scaffold.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_classify.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_generate.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_update.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_flow_candidates.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_framework_fixtures.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_framework_support.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_internal_docs_metadata.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_litellm_compat.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_llm_json_utils.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_parser_ranges.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_planner_consolidation.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_route_registry.py +0 -0
- {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_runtime_scan.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepdoc
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Auto-generate beautiful docs from any codebase
|
|
5
5
|
Author: Pranav Kumar
|
|
6
6
|
License: MIT
|
|
@@ -43,33 +43,52 @@ Dynamic: license-file
|
|
|
43
43
|
[](https://pypi.org/project/deepdoc/)
|
|
44
44
|
[](./LICENSE)
|
|
45
45
|
|
|
46
|
+
## Repository Layout
|
|
47
|
+
|
|
48
|
+
| Directory | What it is | Where to start |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| [`deepdoc/`](./deepdoc/) | The Python package — CLI, pipeline, planner, generator, chatbot, and site builder. This is the core product. | [`deepdoc/README.md`](./deepdoc/README.md) |
|
|
51
|
+
| [`web/`](./web/) | Marketing and changelog site built with Astro 5 + Tailwind. Deployed to the public DeepDoc website. | [`web/README.md`](./web/README.md) |
|
|
52
|
+
| [`vscode-extension/`](./vscode-extension/) | VS Code extension — explains selected code snippets in Fast or Deep mode and inserts AI-generated comments inline. | [`vscode-extension/README.md`](./vscode-extension/README.md) |
|
|
53
|
+
| [`tests/`](./tests/) | pytest test suite for the Python package. | Run `python3 -m pytest -q` from repo root. |
|
|
54
|
+
| [`scripts/`](./scripts/) | One-off release and maintenance scripts. | — |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
46
58
|
Auto-generate deep engineering documentation from real codebases using AI.
|
|
47
59
|
|
|
48
60
|
DeepDoc scans your repo, builds a bucket-based documentation plan, generates rich MDX pages with Mermaid diagrams, and builds a local-first Fumadocs site with Orama search.
|
|
49
61
|
|
|
62
|
+
## Contents
|
|
63
|
+
|
|
64
|
+
- [Quick Start](#quick-start)
|
|
65
|
+
- [Chatbot in 5 Minutes](#chatbot-in-5-minutes)
|
|
66
|
+
- [Installation](#installation)
|
|
67
|
+
- [Commands](#commands)
|
|
68
|
+
- [LLM Provider Setup](#llm-provider-setup)
|
|
69
|
+
- [Configuration](#configuration)
|
|
70
|
+
- [Chatbot](#chatbot)
|
|
71
|
+
- [Supported Languages & Frameworks](#supported-languages--frameworks)
|
|
72
|
+
- [Architecture](#architecture)
|
|
73
|
+
- [Generated Files](#generated-files)
|
|
74
|
+
- [GitHub Actions CI/CD](#github-actions-cicd)
|
|
75
|
+
- [Requirements](#requirements)
|
|
76
|
+
- [Contributing & Release Flow](./CONTRIBUTING.md)
|
|
77
|
+
|
|
50
78
|
---
|
|
51
79
|
|
|
52
80
|
## Features
|
|
53
81
|
|
|
54
|
-
- **Bucket-
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
61
|
-
- **
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- **Incremental Updates** — `deepdoc update` uses persisted plan and ledger data to regenerate only stale or structurally affected docs.
|
|
65
|
-
- **Full Refresh and Clean Rebuild Modes** — `generate --force` fully refreshes DeepDoc-managed docs and removes stale generated pages; `generate --clean --yes` wipes output and rebuilds from scratch.
|
|
66
|
-
- **Safe Existing-Docs Behavior** — Plain `generate` refuses to run over an existing DeepDoc-managed docs set and will not silently mix into a non-DeepDoc `docs/` folder.
|
|
67
|
-
- **Multi-Language Support** — JavaScript/TypeScript, Python, Go, PHP/Laravel with tree-sitter AST parsing and regex fallback.
|
|
68
|
-
- **Configurable LLM** — Works with Anthropic, OpenAI, Azure OpenAI, Ollama, and other LiteLLM-compatible providers.
|
|
69
|
-
- **Mermaid Diagrams** — Generated pages can include architecture, flow, and request-sequence diagrams.
|
|
70
|
-
- **OpenAPI-Aware API Docs** — Auto-detects OpenAPI/Swagger specs and stages canonical interactive `/api/*` pages in the generated site.
|
|
71
|
-
- **Local-First Fumadocs Site** — Generates a `site/` Next.js app with Fumadocs UI, Mermaid rendering, and built-in Orama search.
|
|
72
|
-
- **Static Export** — `deepdoc deploy` exports a static site to `site/out/` for any static host.
|
|
82
|
+
- **Bucket-based documentation architecture** — system, feature, endpoint, integration, and database buckets instead of one-file-per-page noise.
|
|
83
|
+
- **Multi-step AI planner** — classifies the repo, proposes buckets, then assigns files, symbols, artifacts, and dependencies into a final reader-first plan.
|
|
84
|
+
- **Giant-file handling** — large files are decomposed into feature-aligned clusters so a single controller can feed multiple doc pages.
|
|
85
|
+
- **MDX compile gate** — every page is compile-checked before being written; broken MDX is auto-fixed via LLM retry or degraded to safe Markdown rather than shipped.
|
|
86
|
+
- **Evidence-first chatbot answers** — final code proof is hydrated from archived source snippets with exact file paths and line ranges, not just retrieval guesses.
|
|
87
|
+
- **Incremental updates** — `deepdoc update` regenerates only stale or structurally affected docs against the last synced commit.
|
|
88
|
+
- **OpenAPI-aware API docs** — auto-detects OpenAPI/Swagger specs and stages interactive `/api/*` pages in the generated site.
|
|
89
|
+
- **Local-first Fumadocs site** — generates a `site/` Next.js app with Fumadocs UI, Mermaid rendering, and built-in search; `deepdoc deploy` exports a static site to any host.
|
|
90
|
+
|
|
91
|
+
Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider. Parses Python, JavaScript/TypeScript, Go, PHP, and Vue.
|
|
73
92
|
|
|
74
93
|
---
|
|
75
94
|
|
|
@@ -110,12 +129,15 @@ pip install click litellm gitpython rich pyyaml jinja2
|
|
|
110
129
|
pip install -e . --no-deps
|
|
111
130
|
```
|
|
112
131
|
|
|
132
|
+
You will also need **Node 18+** on `PATH`. DeepDoc uses Node at generate time to compile-check each MDX page before writing it, and at `serve`/`deploy` time for the Fumadocs site. The small set of MDX validation dependencies installs into `deepdoc/generator/mdx_validator/node_modules/` automatically on first `deepdoc generate`.
|
|
133
|
+
|
|
113
134
|
### Verify installation
|
|
114
135
|
|
|
115
136
|
```bash
|
|
116
137
|
deepdoc --version
|
|
117
138
|
deepdoc --help
|
|
118
139
|
python -m deepdoc --help
|
|
140
|
+
node --version # must report 18 or higher
|
|
119
141
|
```
|
|
120
142
|
|
|
121
143
|
If you installed the chatbot extra, you can verify those dependencies with:
|
|
@@ -128,128 +150,85 @@ pip show faiss-cpu fastapi uvicorn
|
|
|
128
150
|
|
|
129
151
|
## Quick Start
|
|
130
152
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
- `llm.*` powers planning and doc generation.
|
|
134
|
-
- `chatbot.answer.*` and `chatbot.embeddings.*` power the optional chatbot.
|
|
135
|
-
|
|
136
|
-
If you only want generated docs, configure `llm.*` and skip the chatbot sections.
|
|
137
|
-
If you want docs plus chatbot, install `deepdoc[chatbot]` and configure both.
|
|
138
|
-
|
|
139
|
-
When `chatbot.enabled` is `false`, DeepDoc now generates a docs-only site: no chatbot route, no chatbot UI components, and no `chatbot_backend/` scaffold.
|
|
140
|
-
|
|
141
|
-
### Docs Only
|
|
153
|
+
### Docs only
|
|
142
154
|
|
|
143
155
|
```bash
|
|
144
|
-
# 1. Go to your project
|
|
145
156
|
cd /path/to/your-project
|
|
146
|
-
|
|
147
|
-
# 2. Initialize DeepDoc
|
|
148
157
|
deepdoc init --provider anthropic
|
|
149
|
-
|
|
150
|
-
# 3. Set your API key
|
|
151
158
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
152
|
-
|
|
153
|
-
# 4. Generate docs
|
|
154
159
|
deepdoc generate
|
|
160
|
+
deepdoc serve # → http://localhost:3000
|
|
161
|
+
```
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
### Docs + chatbot — one env var
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
cd /path/to/your-project
|
|
167
|
+
pip install "deepdoc[chatbot]"
|
|
168
|
+
deepdoc init --with-chatbot --provider anthropic
|
|
169
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
170
|
+
deepdoc generate
|
|
171
|
+
deepdoc serve # → http://localhost:3000 • chatbot at /ask
|
|
159
172
|
```
|
|
160
173
|
|
|
161
|
-
|
|
174
|
+
The chatbot reuses your doc-gen LLM and runs embeddings locally via `fastembed`. **No extra keys, no extra config.** Swap `--provider anthropic` for `openai`, `gemini`, `azure`, or `ollama` to use a different LLM.
|
|
162
175
|
|
|
163
|
-
|
|
176
|
+
When `chatbot.enabled` is `false`, DeepDoc generates a docs-only site: no chatbot route, no chatbot UI components, and no `chatbot_backend/` scaffold.
|
|
164
177
|
|
|
165
178
|
---
|
|
166
179
|
|
|
167
180
|
## Chatbot in 5 Minutes
|
|
168
181
|
|
|
169
|
-
|
|
182
|
+
> **Defaults work out of the box.** The chatbot inherits your `llm.*` config and runs embeddings locally via `fastembed`. The recipes below only add config when you actually need to override the defaults (Azure endpoints, custom Ollama base URL, or mixing providers).
|
|
170
183
|
|
|
171
|
-
|
|
184
|
+
### Single provider — one key for everything
|
|
172
185
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
Simplest setup. One API key powers docs, answers, and embeddings.
|
|
186
|
+
This is the path 95% of users want. Anthropic shown; swap `--provider` for `openai`, `gemini`, etc.
|
|
176
187
|
|
|
177
188
|
```bash
|
|
178
189
|
pip install "deepdoc[chatbot]"
|
|
179
190
|
cd /path/to/your-project
|
|
180
191
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
deepdoc init --with-chatbot --provider openai --model gpt-4o
|
|
184
|
-
|
|
185
|
-
# Wire chatbot to the same OpenAI key
|
|
186
|
-
deepdoc config set chatbot.answer.provider openai
|
|
187
|
-
deepdoc config set chatbot.answer.model gpt-4o-mini
|
|
188
|
-
deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
|
|
189
|
-
deepdoc config set chatbot.embeddings.provider openai
|
|
190
|
-
deepdoc config set chatbot.embeddings.model text-embedding-3-large
|
|
191
|
-
deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
|
|
192
|
+
deepdoc init --with-chatbot --provider anthropic
|
|
193
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
192
194
|
|
|
193
195
|
deepdoc generate
|
|
194
196
|
deepdoc serve
|
|
195
197
|
# → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
|
|
196
198
|
```
|
|
197
199
|
|
|
198
|
-
###
|
|
200
|
+
### Mix providers — different LLM for chat than for docs
|
|
199
201
|
|
|
200
|
-
Claude for docs
|
|
202
|
+
Use Claude for docs (great long-form), GPT-4o-mini for chat answers (fast + cheap), local embeddings.
|
|
201
203
|
|
|
202
204
|
```bash
|
|
203
205
|
pip install "deepdoc[chatbot]"
|
|
204
206
|
cd /path/to/your-project
|
|
205
207
|
|
|
208
|
+
deepdoc init --with-chatbot --provider anthropic
|
|
206
209
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
207
210
|
export OPENAI_API_KEY=sk-...
|
|
208
211
|
|
|
209
|
-
deepdoc
|
|
210
|
-
|
|
211
|
-
deepdoc config set chatbot.answer.
|
|
212
|
-
deepdoc config set chatbot.answer.model claude-3-5-sonnet-20241022
|
|
213
|
-
deepdoc config set chatbot.answer.api_key_env ANTHROPIC_API_KEY
|
|
214
|
-
deepdoc config set chatbot.embeddings.provider openai
|
|
215
|
-
deepdoc config set chatbot.embeddings.model text-embedding-3-large
|
|
216
|
-
deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
|
|
212
|
+
deepdoc config set chatbot.answer.provider openai
|
|
213
|
+
deepdoc config set chatbot.answer.model gpt-4o-mini
|
|
214
|
+
deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
|
|
217
215
|
|
|
218
216
|
deepdoc generate
|
|
219
217
|
deepdoc serve
|
|
220
|
-
# → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
|
|
221
218
|
```
|
|
222
219
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
One Gemini API key for docs, answers, and embeddings. Keep the `gemini/` prefix.
|
|
220
|
+
Want cloud embeddings instead of local? Add:
|
|
226
221
|
|
|
227
222
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
deepdoc init --with-chatbot
|
|
234
|
-
deepdoc config set llm.provider gemini
|
|
235
|
-
deepdoc config set llm.model gemini/gemini-2.0-flash
|
|
236
|
-
deepdoc config set llm.api_key_env GEMINI_API_KEY
|
|
237
|
-
|
|
238
|
-
deepdoc config set chatbot.answer.provider gemini
|
|
239
|
-
deepdoc config set chatbot.answer.model gemini/gemini-2.0-flash
|
|
240
|
-
deepdoc config set chatbot.answer.api_key_env GEMINI_API_KEY
|
|
241
|
-
deepdoc config set chatbot.embeddings.provider gemini
|
|
242
|
-
deepdoc config set chatbot.embeddings.model gemini/text-embedding-004
|
|
243
|
-
deepdoc config set chatbot.embeddings.api_key_env GEMINI_API_KEY
|
|
244
|
-
|
|
245
|
-
deepdoc generate
|
|
246
|
-
deepdoc serve
|
|
247
|
-
# → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
|
|
223
|
+
deepdoc config set chatbot.embeddings.backend litellm
|
|
224
|
+
deepdoc config set chatbot.embeddings.provider openai
|
|
225
|
+
deepdoc config set chatbot.embeddings.model text-embedding-3-large
|
|
226
|
+
deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
|
|
248
227
|
```
|
|
249
228
|
|
|
250
229
|
### Azure OpenAI
|
|
251
230
|
|
|
252
|
-
Replace `YOUR-RESOURCE` and deployment names with your actual
|
|
231
|
+
Azure deployments need explicit endpoint + API-version values. Replace `YOUR-RESOURCE` and deployment names with your actual values.
|
|
253
232
|
|
|
254
233
|
```bash
|
|
255
234
|
pip install "deepdoc[chatbot]"
|
|
@@ -261,11 +240,8 @@ export AZURE_API_BASE=https://YOUR-RESOURCE.openai.azure.com
|
|
|
261
240
|
deepdoc init --with-chatbot --provider azure --model azure/gpt-4o
|
|
262
241
|
deepdoc config set llm.base_url $AZURE_API_BASE
|
|
263
242
|
|
|
264
|
-
|
|
265
|
-
deepdoc config set chatbot.
|
|
266
|
-
deepdoc config set chatbot.answer.api_key_env AZURE_API_KEY
|
|
267
|
-
deepdoc config set chatbot.answer.base_url $AZURE_API_BASE
|
|
268
|
-
deepdoc config set chatbot.answer.api_version 2024-02-01
|
|
243
|
+
# Only embeddings need separate Azure config (different deployment)
|
|
244
|
+
deepdoc config set chatbot.embeddings.backend litellm
|
|
269
245
|
deepdoc config set chatbot.embeddings.provider azure
|
|
270
246
|
deepdoc config set chatbot.embeddings.model azure/text-embedding-3-large
|
|
271
247
|
deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
|
|
@@ -274,10 +250,11 @@ deepdoc config set chatbot.embeddings.api_version 2024-02-01
|
|
|
274
250
|
|
|
275
251
|
deepdoc generate
|
|
276
252
|
deepdoc serve
|
|
277
|
-
# → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
|
|
278
253
|
```
|
|
279
254
|
|
|
280
|
-
|
|
255
|
+
The answer LLM inherits `llm.*` (Azure deployment + base URL + key) automatically.
|
|
256
|
+
|
|
257
|
+
### Ollama — Fully local, no API keys
|
|
281
258
|
|
|
282
259
|
Free and private. Runs everything on your machine.
|
|
283
260
|
|
|
@@ -289,11 +266,7 @@ cd /path/to/your-project
|
|
|
289
266
|
ollama pull llama3.2
|
|
290
267
|
|
|
291
268
|
deepdoc init --with-chatbot --provider ollama --model ollama/llama3.2
|
|
292
|
-
|
|
293
|
-
deepdoc config set chatbot.answer.provider ollama
|
|
294
|
-
deepdoc config set chatbot.answer.model ollama/llama3.2
|
|
295
|
-
deepdoc config set chatbot.answer.base_url http://localhost:11434
|
|
296
|
-
deepdoc config set chatbot.embeddings.backend fastembed
|
|
269
|
+
deepdoc config set llm.base_url http://localhost:11434
|
|
297
270
|
|
|
298
271
|
deepdoc generate
|
|
299
272
|
deepdoc serve
|
|
@@ -373,7 +346,7 @@ deepdoc generate --exclude "tests/**"
|
|
|
373
346
|
|
|
374
347
|
1. **Phase 1: Scan** — Walk the repo, parse supported languages, detect endpoints, config/setup artifacts, runtime surfaces, integration signals, and OpenAPI specs.
|
|
375
348
|
2. **Phase 2: Plan** — Run the multi-step bucket planner. It classifies the repo, proposes bucket candidates, and assigns files/symbols/artifacts to the final doc structure.
|
|
376
|
-
3. **Phase 3: Generate** — Generate bucket pages in batches with parallel workers. High-level buckets are AI-planned; scanned endpoints enrich grouped API-reference pages instead of creating one page per route.
|
|
349
|
+
3. **Phase 3: Generate** — Generate bucket pages in batches with parallel workers. High-level buckets are AI-planned; scanned endpoints enrich grouped API-reference pages instead of creating one page per route. Each page passes through an MDX compile-check (with bounded LLM-driven retry on failure) before being written to disk.
|
|
377
350
|
4. **Phase 4: API Ref** — Stage OpenAPI assets for the generated Fumadocs `/api/*` pages when a spec exists.
|
|
378
351
|
5. **Phase 5: Build** — Write the generated `site/` Fumadocs scaffold, page tree, search route, and static assets from the generated plan.
|
|
379
352
|
|
|
@@ -398,6 +371,7 @@ deepdoc update # Normal ongoing refresh
|
|
|
398
371
|
deepdoc update --since HEAD~3 # Changes in last 3 commits
|
|
399
372
|
deepdoc update --since main # All changes since branching from main
|
|
400
373
|
deepdoc update --replan # Force a full replan
|
|
374
|
+
deepdoc update --strict-quality # Fail if generated docs are invalid/degraded
|
|
401
375
|
deepdoc update --deploy # Update + deploy
|
|
402
376
|
```
|
|
403
377
|
|
|
@@ -415,6 +389,7 @@ deepdoc update --deploy # Update + deploy
|
|
|
415
389
|
8. Rebuilds site config and nav afterward.
|
|
416
390
|
|
|
417
391
|
If git is unavailable, it falls back to hash-based staleness detection for recovery.
|
|
392
|
+
When `--deploy` is used, DeepDoc deploys only after a fully successful update; failed page generation or chatbot sync blocks deployment.
|
|
418
393
|
|
|
419
394
|
Generation writes quality artifacts under `.deepdoc/`:
|
|
420
395
|
|
|
@@ -429,7 +404,7 @@ Generated MDX pages include provenance frontmatter such as `deepdoc_generated_co
|
|
|
429
404
|
|------|---------|-------------|
|
|
430
405
|
| `--since` | last synced commit | Git ref to diff against |
|
|
431
406
|
| `--replan` | off | Force a full replan even if the change set looks incremental |
|
|
432
|
-
| `--deploy` | off | Deploy after
|
|
407
|
+
| `--deploy` | off | Deploy after a fully successful update |
|
|
433
408
|
|
|
434
409
|
### `deepdoc status`
|
|
435
410
|
|
|
@@ -748,9 +723,11 @@ site:
|
|
|
748
723
|
|
|
749
724
|
DeepDoc can generate an AI-powered chatbot that answers questions about your codebase using evidence-first RAG. Retrieval indexes find candidate files, but final code proof always comes from archived source/config snippets with exact file paths and line ranges. Generated docs and repo-authored docs can help explain concepts, but they are returned as references, not right-pane code evidence.
|
|
750
725
|
|
|
726
|
+
> **Defaults you should know.** The chatbot **inherits** `provider`, `model`, and `api_key_env` from your `llm.*` config when `chatbot.answer.*` is empty (the scaffolded default). Embeddings default to `fastembed` — fully local, no API key. You only need extra config if (a) you want a different LLM for chat than for docs, or (b) you want cloud embeddings.
|
|
727
|
+
|
|
751
728
|
If chatbot is disabled, DeepDoc keeps the generated site docs-only: it does not generate the `/ask` route, chatbot frontend components, or `chatbot_backend/` scaffold.
|
|
752
729
|
|
|
753
|
-
> **Already running?** If you followed the [Chatbot in 5 Minutes](#chatbot-in-5-minutes) guide above, your chatbot is already configured and working. Everything below is for advanced configuration, tuning, and production deployment.
|
|
730
|
+
> **Already running?** If you followed the [Chatbot in 5 Minutes](#chatbot-in-5-minutes) guide above, your chatbot is already configured and working. Everything below is for advanced configuration, tuning, and production deployment.
|
|
754
731
|
|
|
755
732
|
### How the Model Surfaces Work
|
|
756
733
|
|
|
@@ -787,99 +764,70 @@ Public endpoints remain stable:
|
|
|
787
764
|
|
|
788
765
|
### Provider Recipes
|
|
789
766
|
|
|
790
|
-
|
|
767
|
+
These are advanced recipes that override the inheritance defaults — e.g. mixing providers or using cloud embeddings. For the simple "one key for everything" path, see [Chatbot in 5 Minutes](#chatbot-in-5-minutes) above.
|
|
768
|
+
|
|
769
|
+
#### Claude for docs, OpenAI for embeddings
|
|
791
770
|
|
|
792
|
-
|
|
771
|
+
Claude doesn't offer embedding models, so cloud embeddings need a separate provider. (Or just keep the default `fastembed` and skip this entirely.)
|
|
793
772
|
|
|
794
773
|
```bash
|
|
795
774
|
export ANTHROPIC_API_KEY=...
|
|
796
775
|
export OPENAI_API_KEY=...
|
|
797
|
-
export DEEPDOC_CHAT_API_KEY=$ANTHROPIC_API_KEY
|
|
798
|
-
export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
|
|
799
776
|
|
|
800
777
|
deepdoc config set llm.provider anthropic
|
|
801
778
|
deepdoc config set llm.model claude-3-5-sonnet-20241022
|
|
802
779
|
deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
|
|
803
780
|
|
|
804
781
|
deepdoc config set chatbot.enabled true
|
|
805
|
-
deepdoc config set chatbot.
|
|
806
|
-
deepdoc config set chatbot.answer.model claude-3-5-sonnet-20241022
|
|
807
|
-
deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
|
|
808
|
-
|
|
782
|
+
deepdoc config set chatbot.embeddings.backend litellm
|
|
809
783
|
deepdoc config set chatbot.embeddings.provider openai
|
|
810
784
|
deepdoc config set chatbot.embeddings.model text-embedding-3-large
|
|
811
|
-
deepdoc config set chatbot.embeddings.api_key_env
|
|
785
|
+
deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
|
|
812
786
|
```
|
|
813
787
|
|
|
814
|
-
|
|
788
|
+
The chatbot answer LLM inherits `llm.*` (Claude) automatically.
|
|
789
|
+
|
|
790
|
+
#### Different model for chat than for docs
|
|
791
|
+
|
|
792
|
+
Claude for docs, GPT-4o-mini for cheaper/faster chat answers. Embeddings stay local.
|
|
815
793
|
|
|
816
794
|
```bash
|
|
795
|
+
export ANTHROPIC_API_KEY=...
|
|
817
796
|
export OPENAI_API_KEY=...
|
|
818
|
-
export DEEPDOC_CHAT_API_KEY=$OPENAI_API_KEY
|
|
819
|
-
export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
|
|
820
797
|
|
|
821
|
-
deepdoc config set llm.provider
|
|
822
|
-
deepdoc config set llm.model
|
|
823
|
-
deepdoc config set llm.api_key_env
|
|
798
|
+
deepdoc config set llm.provider anthropic
|
|
799
|
+
deepdoc config set llm.model claude-3-5-sonnet-20241022
|
|
800
|
+
deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
|
|
824
801
|
|
|
825
802
|
deepdoc config set chatbot.enabled true
|
|
826
803
|
deepdoc config set chatbot.answer.provider openai
|
|
827
804
|
deepdoc config set chatbot.answer.model gpt-4o-mini
|
|
828
|
-
deepdoc config set chatbot.answer.api_key_env
|
|
829
|
-
|
|
830
|
-
deepdoc config set chatbot.embeddings.provider openai
|
|
831
|
-
deepdoc config set chatbot.embeddings.model text-embedding-3-large
|
|
832
|
-
deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
|
|
805
|
+
deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
|
|
833
806
|
```
|
|
834
807
|
|
|
835
|
-
####
|
|
808
|
+
#### Azure with separate embedding deployment
|
|
836
809
|
|
|
837
|
-
|
|
810
|
+
Azure deployments need explicit `base_url` + `api_version`, and embeddings typically live on a different deployment.
|
|
838
811
|
|
|
839
812
|
```bash
|
|
840
|
-
export
|
|
841
|
-
export DEEPDOC_CHAT_API_KEY=$GEMINI_API_KEY
|
|
842
|
-
export DEEPDOC_EMBED_API_KEY=$GEMINI_API_KEY
|
|
843
|
-
|
|
844
|
-
deepdoc config set llm.provider gemini
|
|
845
|
-
deepdoc config set llm.model gemini/gemini-2.0-flash
|
|
846
|
-
deepdoc config set llm.api_key_env GEMINI_API_KEY
|
|
847
|
-
|
|
848
|
-
deepdoc config set chatbot.enabled true
|
|
849
|
-
deepdoc config set chatbot.answer.provider gemini
|
|
850
|
-
deepdoc config set chatbot.answer.model gemini/gemini-2.0-flash
|
|
851
|
-
deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
|
|
852
|
-
|
|
853
|
-
deepdoc config set chatbot.embeddings.provider gemini
|
|
854
|
-
deepdoc config set chatbot.embeddings.model gemini/text-embedding-004
|
|
855
|
-
deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
|
|
856
|
-
```
|
|
857
|
-
|
|
858
|
-
#### Azure For Docs + Chatbot
|
|
859
|
-
|
|
860
|
-
```bash
|
|
861
|
-
export AZURE_OPENAI_API_KEY=...
|
|
862
|
-
export AZURE_EMBEDDING_API_KEY=...
|
|
813
|
+
export AZURE_API_KEY=...
|
|
863
814
|
|
|
864
815
|
deepdoc config set llm.provider azure
|
|
865
816
|
deepdoc config set llm.model azure/gpt-4.1
|
|
866
|
-
deepdoc config set llm.api_key_env
|
|
817
|
+
deepdoc config set llm.api_key_env AZURE_API_KEY
|
|
867
818
|
deepdoc config set llm.base_url https://YOUR-RESOURCE.openai.azure.com/
|
|
868
819
|
|
|
869
820
|
deepdoc config set chatbot.enabled true
|
|
870
|
-
deepdoc config set chatbot.
|
|
871
|
-
deepdoc config set chatbot.answer.model azure/gpt-4.1
|
|
872
|
-
deepdoc config set chatbot.answer.api_key_env AZURE_OPENAI_API_KEY
|
|
873
|
-
deepdoc config set chatbot.answer.base_url https://YOUR-RESOURCE.openai.azure.com/
|
|
874
|
-
deepdoc config set chatbot.answer.api_version 2024-02-15-preview
|
|
875
|
-
|
|
821
|
+
deepdoc config set chatbot.embeddings.backend litellm
|
|
876
822
|
deepdoc config set chatbot.embeddings.provider azure
|
|
877
823
|
deepdoc config set chatbot.embeddings.model azure/text-embedding-3-small
|
|
878
|
-
deepdoc config set chatbot.embeddings.api_key_env
|
|
824
|
+
deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
|
|
879
825
|
deepdoc config set chatbot.embeddings.base_url https://YOUR-RESOURCE.openai.azure.com/
|
|
880
826
|
deepdoc config set chatbot.embeddings.api_version 2024-02-15-preview
|
|
881
827
|
```
|
|
882
828
|
|
|
829
|
+
The answer LLM inherits `llm.*` (Azure deployment, base URL, version, key) automatically — no `chatbot.answer.*` config needed for Azure.
|
|
830
|
+
|
|
883
831
|
### Installation
|
|
884
832
|
|
|
885
833
|
The chatbot requires extra dependencies not included in the base install:
|
|
@@ -1009,10 +957,15 @@ chatbot:
|
|
|
1009
957
|
|
|
1010
958
|
### Chatbot Configuration Reference
|
|
1011
959
|
|
|
960
|
+
The defaults work for almost every project. Expand below only when you need to tune a specific knob.
|
|
961
|
+
|
|
962
|
+
<details>
|
|
963
|
+
<summary><strong>Full chatbot configuration reference (60+ keys)</strong></summary>
|
|
964
|
+
|
|
1012
965
|
| Key | Default | Description |
|
|
1013
966
|
|-----|---------|-------------|
|
|
1014
967
|
| **General** | | |
|
|
1015
|
-
| `chatbot.enabled` | `false` | Enable chatbot indexing and backend |
|
|
968
|
+
| `chatbot.enabled` | `false` | Enable chatbot indexing and backend (set automatically by `deepdoc init --with-chatbot`) |
|
|
1016
969
|
| `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
|
|
1017
970
|
| **Indexing** | | |
|
|
1018
971
|
| `chatbot.indexing.include_repo_docs` | `true` | Index selected repo-authored docs such as README/design notes in a separate corpus |
|
|
@@ -1099,6 +1052,8 @@ chatbot:
|
|
|
1099
1052
|
| `chatbot.chunking.max_doc_summary_chunks_per_page` | `4` | Doc summary chunks extracted per page |
|
|
1100
1053
|
| `chatbot.chunking.max_doc_summary_chars` | `4000` | Max chars per doc summary chunk |
|
|
1101
1054
|
|
|
1055
|
+
</details>
|
|
1056
|
+
|
|
1102
1057
|
### Chatbot Provider Examples
|
|
1103
1058
|
|
|
1104
1059
|
The chatbot's `answer` and `embeddings` sections are configured independently from the main `llm` section, so you can use different providers for doc generation vs. chatbot.
|
|
@@ -1490,7 +1445,7 @@ jobs:
|
|
|
1490
1445
|
env:
|
|
1491
1446
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
1492
1447
|
run: |
|
|
1493
|
-
deepdoc update --deploy
|
|
1448
|
+
deepdoc update --strict-quality --deploy
|
|
1494
1449
|
|
|
1495
1450
|
- name: Upload Pages artifact
|
|
1496
1451
|
uses: actions/upload-pages-artifact@v3
|
|
@@ -1509,101 +1464,59 @@ jobs:
|
|
|
1509
1464
|
|
|
1510
1465
|
Add your API key to repo Settings → Secrets → Actions → `ANTHROPIC_API_KEY`.
|
|
1511
1466
|
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
## Releasing
|
|
1515
|
-
|
|
1516
|
-
DeepDoc now supports automated releases through GitHub Actions.
|
|
1517
|
-
|
|
1518
|
-
### Release tracks
|
|
1467
|
+
If you self-host and just want docs kept fresh without deploying to GitHub Pages, use this minimal variant instead — it commits the refreshed `docs/` and `.deepdoc/` state back to the branch:
|
|
1519
1468
|
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
- **VS Code extension (`vscode-extension/`)**: controlled by `vscode-extension/package.json`, `vscode-extension/CHANGELOG.md`, and `.github/workflows/release-vscode-extension.yml`.
|
|
1524
|
-
|
|
1525
|
-
Keep versions and changelog entries separated by track.
|
|
1526
|
-
|
|
1527
|
-
### What happens automatically
|
|
1528
|
-
|
|
1529
|
-
When you push to `main`, the release workflow checks the version in `pyproject.toml`.
|
|
1530
|
-
If that version does not already have a matching Git tag like `v0.1.1`, GitHub Actions will:
|
|
1531
|
-
|
|
1532
|
-
- build the package
|
|
1533
|
-
- publish it to PyPI
|
|
1534
|
-
- create the Git tag
|
|
1535
|
-
- create a GitHub Release and attach the built files
|
|
1536
|
-
- use the matching section from `CHANGELOG.md` as the release notes when present
|
|
1537
|
-
|
|
1538
|
-
### Your release flow
|
|
1469
|
+
```yaml
|
|
1470
|
+
# .github/workflows/deepdoc-refresh.yml
|
|
1471
|
+
name: Refresh Docs
|
|
1539
1472
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
4. Commit your changes
|
|
1544
|
-
5. Push to `main`
|
|
1473
|
+
on:
|
|
1474
|
+
push:
|
|
1475
|
+
branches: [main]
|
|
1545
1476
|
|
|
1546
|
-
|
|
1477
|
+
jobs:
|
|
1478
|
+
refresh:
|
|
1479
|
+
runs-on: ubuntu-latest
|
|
1480
|
+
permissions:
|
|
1481
|
+
contents: write
|
|
1547
1482
|
|
|
1548
|
-
|
|
1483
|
+
steps:
|
|
1484
|
+
- uses: actions/checkout@v4
|
|
1485
|
+
with:
|
|
1486
|
+
fetch-depth: 0 # Full history needed for git diff
|
|
1549
1487
|
|
|
1550
|
-
|
|
1551
|
-
|
|
1488
|
+
- uses: actions/setup-python@v5
|
|
1489
|
+
with:
|
|
1490
|
+
python-version: "3.11"
|
|
1552
1491
|
|
|
1553
|
-
-
|
|
1554
|
-
|
|
1555
|
-
-
|
|
1556
|
-
- `## [0.1.2] - 2026-04-03`
|
|
1492
|
+
- uses: actions/setup-node@v4
|
|
1493
|
+
with:
|
|
1494
|
+
node-version: "20"
|
|
1557
1495
|
|
|
1558
|
-
|
|
1496
|
+
- name: Install deepdoc
|
|
1497
|
+
run: pip install deepdoc
|
|
1559
1498
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1499
|
+
- name: Refresh docs
|
|
1500
|
+
env:
|
|
1501
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
1502
|
+
run: deepdoc update --strict-quality
|
|
1562
1503
|
|
|
1563
|
-
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1504
|
+
- name: Commit updated docs
|
|
1505
|
+
run: |
|
|
1506
|
+
git config user.name "github-actions[bot]"
|
|
1507
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
1508
|
+
git add docs/ .deepdoc/
|
|
1509
|
+
git diff --cached --quiet || git commit -m "chore: refresh docs [skip ci]"
|
|
1510
|
+
git push
|
|
1566
1511
|
```
|
|
1567
1512
|
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
### One-time setup
|
|
1513
|
+
The `[skip ci]` tag on the commit message prevents the workflow from triggering itself again.
|
|
1571
1514
|
|
|
1572
|
-
|
|
1573
|
-
2. Go to `Publishing`
|
|
1574
|
-
3. Add a Trusted Publisher for GitHub Actions with:
|
|
1575
|
-
- owner: `tss-pranavkumar`
|
|
1576
|
-
- repository: `deepdoc`
|
|
1577
|
-
- workflow filename: `release.yml`
|
|
1578
|
-
- environment name: `pypi`
|
|
1579
|
-
4. In GitHub, open Settings → Actions → General
|
|
1580
|
-
5. Set Workflow permissions to `Read and write permissions`
|
|
1581
|
-
|
|
1582
|
-
After that, every new version pushed to `main` can publish without a PyPI token.
|
|
1583
|
-
|
|
1584
|
-
### VS Code extension release flow
|
|
1585
|
-
|
|
1586
|
-
The VS Code extension release is automated from `main` when files under `vscode-extension/` change.
|
|
1587
|
-
|
|
1588
|
-
What the extension workflow does:
|
|
1589
|
-
|
|
1590
|
-
- reads `vscode-extension/package.json` version
|
|
1591
|
-
- checks whether tag `vscode-extension-v<version>` already exists
|
|
1592
|
-
- builds and packages the extension
|
|
1593
|
-
- publishes to Marketplace using `VSCE_PAT`
|
|
1594
|
-
- creates and pushes the matching git tag
|
|
1595
|
-
- creates a GitHub release with notes from `vscode-extension/CHANGELOG.md` (fallback to generated notes)
|
|
1596
|
-
|
|
1597
|
-
One-time setup for extension publishing:
|
|
1598
|
-
|
|
1599
|
-
1. Create a VS Code Marketplace PAT with Manage scope for publisher `Pranawww`
|
|
1600
|
-
2. Add repo secret `VSCE_PAT` in GitHub Actions secrets
|
|
1515
|
+
---
|
|
1601
1516
|
|
|
1602
|
-
|
|
1517
|
+
## Contributing & Releases
|
|
1603
1518
|
|
|
1604
|
-
|
|
1605
|
-
2. Add matching section to `vscode-extension/CHANGELOG.md`
|
|
1606
|
-
3. Commit and push to `main`
|
|
1519
|
+
Release flow for the Python package and the VS Code extension, plus repo layout and test-running notes, lives in [CONTRIBUTING.md](./CONTRIBUTING.md). Both tracks publish automatically when you push a version bump to `main`.
|
|
1607
1520
|
|
|
1608
1521
|
---
|
|
1609
1522
|
|
|
@@ -1649,6 +1562,7 @@ deepdoc generate --force # Full regen with new model
|
|
|
1649
1562
|
## Requirements
|
|
1650
1563
|
|
|
1651
1564
|
- Python 3.10+
|
|
1565
|
+
- **Node 18+** on `PATH` — used at generate time for MDX compile validation, and at `serve`/`deploy` time for the Fumadocs site
|
|
1652
1566
|
- Git (for `deepdoc update` and `deepdoc deploy`)
|
|
1653
1567
|
- An LLM API key (or Ollama running locally)
|
|
1654
1568
|
|