docs-kit 0.1.1__py3-none-any.whl

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.
@@ -0,0 +1,268 @@
1
+ Metadata-Version: 2.3
2
+ Name: docs-kit
3
+ Version: 0.1.1
4
+ Summary: Fetch docs, embed locally, expose via MCP for AI agents.
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 Docs Kit Limited
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+ Requires-Python: >=3.11
27
+ Requires-Dist: click>=8.0.0
28
+ Requires-Dist: fastembed>=0.6.0
29
+ Requires-Dist: httpx>=0.27.0
30
+ Requires-Dist: mcp>=1.0.0
31
+ Requires-Dist: pydantic-settings>=2.2.1
32
+ Requires-Dist: pydantic>=2.0.0
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: qdrant-client>=1.10.0
35
+ Requires-Dist: tomli-w>=1.0.0
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
38
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
39
+ Requires-Dist: starlette>=0.36.0; extra == 'dev'
40
+ Requires-Dist: uvicorn>=0.27.0; extra == 'dev'
41
+ Provides-Extra: sse
42
+ Requires-Dist: starlette>=0.36.0; extra == 'sse'
43
+ Requires-Dist: uvicorn>=0.27.0; extra == 'sse'
44
+ Description-Content-Type: text/markdown
45
+
46
+ # docs-kit
47
+
48
+ [![PyPI version](https://img.shields.io/pypi/v/docs-kit)](https://pypi.org/project/docs-kit/)
49
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
50
+ [![Python](https://img.shields.io/pypi/pyversions/docs-kit)](https://pypi.org/project/docs-kit/)
51
+ [![CI](https://github.com/docs-kit/docs-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/docs-kit/docs-kit/actions/workflows/ci.yml)
52
+
53
+ Fetch docs from GitBook, Mintlify, or local files, embed them locally, and expose retrieval to AI tools over MCP.
54
+
55
+ No API keys are required for the default local embedding path.
56
+
57
+ ## What it does
58
+
59
+ - Fetches public docs from GitBook and Mintlify sites via `llms-full.txt` / `llms.txt` (with sitemap.xml fallback for Mintlify)
60
+ - Ingests local `.md` and `.txt` files
61
+ - Stores vectors in local Qdrant by default
62
+ - Serves an MCP server over `stdio` or SSE
63
+ - Exposes MCP tools to ingest, remove, and list sources at runtime
64
+ - Installs MCP config for supported AI clients
65
+
66
+ ## Install
67
+
68
+ ```bash
69
+ pip install docs-kit
70
+ ```
71
+
72
+ Or with `npx`:
73
+
74
+ ```bash
75
+ npx docs-kit ingest https://docs.example.com
76
+ ```
77
+
78
+ ## Quickstart
79
+
80
+ ```bash
81
+ # 1. Create a config file
82
+ docs-kit init
83
+
84
+ # 2. Ingest docs (GitBook or Mintlify — auto-detected)
85
+ docs-kit ingest https://docs.elevenlabs.io
86
+
87
+ # 3. Check the collection
88
+ docs-kit inspect
89
+
90
+ # 4. Install into your client
91
+ docs-kit install claude-code
92
+ ```
93
+
94
+ ## Commands
95
+
96
+ ### `docs-kit init`
97
+
98
+ Create `docs-kit.yaml`.
99
+
100
+ ```bash
101
+ docs-kit init
102
+ docs-kit init --dir ./sandbox
103
+ ```
104
+
105
+ ### `docs-kit ingest <path-or-url>`
106
+
107
+ Ingest a local file, directory, or documentation URL into the vector store. Supports GitBook and Mintlify sites out of the box — auto-detected by default.
108
+
109
+ ```bash
110
+ docs-kit ingest ./docs
111
+ docs-kit ingest https://docs.example.com
112
+ docs-kit ingest https://docs.mintlify-site.com --provider mintlify
113
+ docs-kit ingest https://docs.gitbook-site.com --provider gitbook
114
+ docs-kit ingest ./docs --recreate
115
+ ```
116
+
117
+ `--provider` accepts `auto` (default), `gitbook`, or `mintlify`. In `auto` mode, the fetcher tries `/llms-full.txt` → `/llms.txt` → `/sitemap.xml` in order.
118
+
119
+ ### `docs-kit fetch <url>`
120
+
121
+ Download GitBook docs as Markdown without ingesting them.
122
+
123
+ ```bash
124
+ docs-kit fetch https://docs.example.com
125
+ docs-kit fetch https://docs.example.com --output ./downloaded-docs
126
+ ```
127
+
128
+ ### `docs-kit serve`
129
+
130
+ Run the MCP server. `stdio` is the default. Use SSE for HTTP clients.
131
+
132
+ ```bash
133
+ docs-kit serve
134
+ docs-kit serve --transport sse --port 3001
135
+ docs-kit serve --config ./docs-kit.yaml
136
+ ```
137
+
138
+ ### `docs-kit install <agent>`
139
+
140
+ Install docs-kit into a supported client config.
141
+
142
+ ```bash
143
+ docs-kit install claude-code
144
+ docs-kit install codex
145
+ docs-kit install claude-code --project
146
+ docs-kit install cursor --config ./docs-kit.yaml
147
+ ```
148
+
149
+ ### `docs-kit query <text>`
150
+
151
+ Run retrieval directly from the CLI.
152
+
153
+ ```bash
154
+ docs-kit query "How do I authenticate?"
155
+ docs-kit query "getting started" --limit 3
156
+ ```
157
+
158
+ ### `docs-kit inspect`
159
+
160
+ Show collection and embedding configuration details.
161
+
162
+ ```bash
163
+ docs-kit inspect
164
+ docs-kit inspect --config ./docs-kit.yaml
165
+ ```
166
+
167
+ ### `docs-kit doctor`
168
+
169
+ Check environment variables, config presence, and Qdrant connectivity.
170
+
171
+ ```bash
172
+ docs-kit doctor
173
+ docs-kit doctor --config ./docs-kit.yaml
174
+ ```
175
+
176
+ ### `docs-kit list`
177
+
178
+ List ingested sources with their ingestion timestamps.
179
+
180
+ ```bash
181
+ docs-kit list
182
+ docs-kit list --config ./docs-kit.yaml
183
+ ```
184
+
185
+ ### `docs-kit remove <source>`
186
+
187
+ Remove an ingested source by URL or file path.
188
+
189
+ ```bash
190
+ docs-kit remove https://docs.example.com/page
191
+ docs-kit remove ./docs/getting-started.md
192
+ ```
193
+
194
+ ## MCP Tools
195
+
196
+ When connected to an MCP client, docs-kit exposes:
197
+
198
+ | Tool | Description |
199
+ |------|-------------|
200
+ | `search_docs(query, limit=5)` | Hybrid dense + BM25 retrieval |
201
+ | `list_sources()` | List all ingested source URLs/paths |
202
+ | `list_ingested_sources()` | List sources with ingestion timestamps |
203
+ | `get_collection_info()` | Collection stats (exists, point count) |
204
+ | `get_full_document(source)` | Retrieve full stored document by source |
205
+ | `ingest_urls(urls, provider="auto")` | Ingest comma-separated URLs at runtime |
206
+ | `remove_source(source)` | Remove a source and all its chunks |
207
+
208
+ ## Install Targets
209
+
210
+ Local config install is supported for:
211
+
212
+ - `claude-code`
213
+ - `claude-desktop`
214
+ - `cursor`
215
+ - `codex`
216
+
217
+ Codex aliases:
218
+
219
+ - `codex-app`
220
+
221
+ ChatGPT aliases are accepted for guidance only:
222
+
223
+ - `chatgpt`
224
+ - `chatgpt-desktop`
225
+
226
+ `chatgpt` and `chatgpt-desktop` do not currently use a local stdio config written by this command. The installer prints guidance for the current OpenAI flow, which uses remote MCP apps/connectors in ChatGPT settings.
227
+
228
+ ## Configuration
229
+
230
+ `docs-kit.yaml` created by `docs-kit init`:
231
+
232
+ ```yaml
233
+ embedding:
234
+ provider: fastembed
235
+ model: BAAI/bge-small-en-v1.5
236
+
237
+ vector_store:
238
+ provider: qdrant
239
+ local_path: .docs-kit/qdrant
240
+ collection_name: knowledge_base
241
+
242
+ ingestion:
243
+ chunk_size: 800
244
+ chunk_overlap: 120
245
+ bm25_model: Qdrant/bm25
246
+
247
+ mcp:
248
+ transport: stdio
249
+ host: localhost
250
+ port: 3001
251
+ ```
252
+
253
+ ## Supported Sources
254
+
255
+ | Source | Strategy |
256
+ |--------|----------|
257
+ | GitBook sites | `/llms-full.txt` → `/llms.txt` |
258
+ | Mintlify sites | `/llms-full.txt` → `/llms.txt` → `/sitemap.xml` |
259
+ | Local `.md` files | Direct file read |
260
+ | Local `.txt` files | Direct file read |
261
+
262
+ Both GitBook and Mintlify support the [`llms.txt` standard](https://llmstxt.org), so in most cases the same auto strategy works for both. The Mintlify fetcher adds a `/sitemap.xml` fallback for sites where `llms.txt` is disabled.
263
+
264
+ ## Requirements
265
+
266
+ - Python 3.11+
267
+ - Disk space for the local embedding model download
268
+ - Local Qdrant storage under `.docs-kit/` by default
@@ -0,0 +1,37 @@
1
+ docs_kit/__init__.py,sha256=Ju6_YlS3DNr3it6mY0Z0NmHoFurexx-2k-1sF0ImR1c,843
2
+ docs_kit/__main__.py,sha256=N9j2trAOPKXRqvBrcq59fe9UtlxvCr28bxaL9vuzO9g,76
3
+ docs_kit/_version.py,sha256=rnObPjuBcEStqSO0S6gsdS_ot8ITOQjVj_-P1LUUYpg,22
4
+ docs_kit/agent.py,sha256=Ee-PvlZsS_-FbrV3edSepnBRJlNF6-lts30Cx57bJdY,8270
5
+ docs_kit/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ docs_kit/cli/__main__.py,sha256=gxVzgiELaOi3IMLr8am4XUzqBnSHcaCBRBH6wqyZ3-0,1071
7
+ docs_kit/cli/commands.py,sha256=JAMUhUH9BOPmSYsxLXuWnFqHZTuFQqayEnR1RHC0MF0,19560
8
+ docs_kit/cli/help.py,sha256=Aad7SZMvx73sQ25JnOPRu3xVInV5ZOh54sg8-Zfa698,5242
9
+ docs_kit/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ docs_kit/connectors/embeddings/__init__.py,sha256=ePxSyg5IL1oJ6Y4m0p-dn_2cDCbBzt7mhzfGu1uLkHA,170
11
+ docs_kit/connectors/embeddings/base.py,sha256=zQzAFYjZModSrjDuVzht9inixfxvFwjDsCeM3KGpR78,317
12
+ docs_kit/connectors/embeddings/fastembed.py,sha256=LeO58DAgrtup3hPm-IuffBd4ZaEWji_hua6C-1bhUwE,1222
13
+ docs_kit/connectors/fetchers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ docs_kit/connectors/fetchers/base.py,sha256=5MgXNkRM4myTO5M9Z7ykDO4wTEoyuYh1l6_ZfZCeIQw,223
15
+ docs_kit/connectors/fetchers/gitbook.py,sha256=WC7m-0PbLM90zPIkJSfICeZsQdZWdGvnQ-ZooEy2ruQ,224
16
+ docs_kit/connectors/fetchers/llms_txt.py,sha256=o9zNlvogwFWwXN2DzdPWwpDehBdqZrsZFW1TsMJ48q0,3275
17
+ docs_kit/connectors/fetchers/mintlify.py,sha256=Bj2OAySUFmDJKCrQqVyi4xE_H1an3uV1NctLqrluzoU,3565
18
+ docs_kit/connectors/parsers/__init__.py,sha256=_zLpEQsMYt5kUZMgbFRlFDnx_hmI2COntUjlMvunqZM,164
19
+ docs_kit/connectors/parsers/base.py,sha256=2Eb4kyPqb8kpUY8_CGpAorT-IzTbrW2ITsR8LOYtzA8,247
20
+ docs_kit/connectors/parsers/markdown.py,sha256=h8qxmoOCO--__8OgwVOZm_bHSKl7A4s_eLoLFZ8XsJg,288
21
+ docs_kit/connectors/parsers/text.py,sha256=vFnKyxdR_B0v-GT-Iz7uCYWB73gqqPf11_X0dfC3IQg,285
22
+ docs_kit/connectors/vector_stores/__init__.py,sha256=HVhPoG5DOhrc1b1NrRhCG0SME3bzWEOwdvrTxECmc_M,92
23
+ docs_kit/connectors/vector_stores/base.py,sha256=5Z6vV4DCaDJ33TfUVp8ZXY9BTPLV9MGi9hnvFZrgMgs,961
24
+ docs_kit/connectors/vector_stores/qdrant.py,sha256=YkYmEailguY1wp3MVapuRPjq7tkIhwk7Yg3uVj1cbFA,12854
25
+ docs_kit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ docs_kit/core/chunking.py,sha256=vatKS8FzDBbqH2e0PgnH7-57_iFXZl4a2HxGVIwX4n8,7735
27
+ docs_kit/core/config.py,sha256=sQbFA2Ojdca8t2uXSF1VHWj7a2CZOWpP4ZOBUrfaGx4,2201
28
+ docs_kit/core/html_utils.py,sha256=1VftGb3fn4rjUPlbAqDILROjJE5fzTOgHyn9IBa15m4,2358
29
+ docs_kit/core/models.py,sha256=teeBraRU-uWxugO2YN6fNtPoZ44iFPL-bwjy3WLfzyw,636
30
+ docs_kit/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ docs_kit/mcp/server.py,sha256=uFrX4heZG1NEAKyZUsHO8XM6Fks_po7OS5Qc6s48CIw,3929
32
+ docs_kit/mcp/tools.py,sha256=9xYeZh7AJmI8VDuVFuPsuCnG8U6-DCIP0s6LVgo8j28,413
33
+ docs_kit-0.1.1.dist-info/METADATA,sha256=tsNk4nczg8t9AUsNETRAfkR-_97EJLxxtIzm_uxrznQ,7650
34
+ docs_kit-0.1.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
35
+ docs_kit-0.1.1.dist-info/entry_points.txt,sha256=RhCUnf0jJen8J_vEtUPLeSMoGDijS1dZMAGKj75q4H8,55
36
+ docs_kit-0.1.1.dist-info/licenses/LICENSE,sha256=nebWVE48X1TP4rEUOkbPvawhavjs6i-XAAjLkjECi1U,1073
37
+ docs_kit-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.26.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ docs-kit = docs_kit.cli.__main__:cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Docs Kit Limited
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.