docmancer 0.1.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.
- docmancer-0.1.1/.github/workflows/ci.yml +31 -0
- docmancer-0.1.1/.github/workflows/publish.yml +92 -0
- docmancer-0.1.1/.gitignore +17 -0
- docmancer-0.1.1/CHANGELOG.md +13 -0
- docmancer-0.1.1/CONTRIBUTING.md +65 -0
- docmancer-0.1.1/LICENSE +21 -0
- docmancer-0.1.1/PKG-INFO +268 -0
- docmancer-0.1.1/README.md +229 -0
- docmancer-0.1.1/docmancer/__init__.py +32 -0
- docmancer-0.1.1/docmancer/__main__.py +4 -0
- docmancer-0.1.1/docmancer/_version.py +1 -0
- docmancer-0.1.1/docmancer/agent.py +190 -0
- docmancer-0.1.1/docmancer/cli/__init__.py +0 -0
- docmancer-0.1.1/docmancer/cli/__main__.py +33 -0
- docmancer-0.1.1/docmancer/cli/commands.py +603 -0
- docmancer-0.1.1/docmancer/cli/help.py +140 -0
- docmancer-0.1.1/docmancer/connectors/__init__.py +0 -0
- docmancer-0.1.1/docmancer/connectors/embeddings/__init__.py +3 -0
- docmancer-0.1.1/docmancer/connectors/embeddings/base.py +9 -0
- docmancer-0.1.1/docmancer/connectors/embeddings/fastembed.py +30 -0
- docmancer-0.1.1/docmancer/connectors/fetchers/__init__.py +0 -0
- docmancer-0.1.1/docmancer/connectors/fetchers/base.py +8 -0
- docmancer-0.1.1/docmancer/connectors/fetchers/gitbook.py +7 -0
- docmancer-0.1.1/docmancer/connectors/fetchers/llms_txt.py +85 -0
- docmancer-0.1.1/docmancer/connectors/fetchers/mintlify.py +94 -0
- docmancer-0.1.1/docmancer/connectors/parsers/__init__.py +4 -0
- docmancer-0.1.1/docmancer/connectors/parsers/base.py +8 -0
- docmancer-0.1.1/docmancer/connectors/parsers/markdown.py +8 -0
- docmancer-0.1.1/docmancer/connectors/parsers/text.py +8 -0
- docmancer-0.1.1/docmancer/connectors/vector_stores/__init__.py +3 -0
- docmancer-0.1.1/docmancer/connectors/vector_stores/base.py +15 -0
- docmancer-0.1.1/docmancer/connectors/vector_stores/qdrant.py +308 -0
- docmancer-0.1.1/docmancer/core/__init__.py +0 -0
- docmancer-0.1.1/docmancer/core/chunking.py +392 -0
- docmancer-0.1.1/docmancer/core/config.py +59 -0
- docmancer-0.1.1/docmancer/core/html_utils.py +78 -0
- docmancer-0.1.1/docmancer/core/models.py +28 -0
- docmancer-0.1.1/docmancer/templates/__init__.py +0 -0
- docmancer-0.1.1/docmancer/templates/claude_code_skill.md +84 -0
- docmancer-0.1.1/docmancer/templates/claude_desktop_skill.md +36 -0
- docmancer-0.1.1/docmancer/templates/cursor_agents_md.md +33 -0
- docmancer-0.1.1/docmancer/templates/skill.md +74 -0
- docmancer-0.1.1/docmancer.yaml +14 -0
- docmancer-0.1.1/pyproject.toml +36 -0
- docmancer-0.1.1/scripts/smoke_test.sh +24 -0
- docmancer-0.1.1/tests/__init__.py +0 -0
- docmancer-0.1.1/tests/test_agent.py +100 -0
- docmancer-0.1.1/tests/test_chunking.py +290 -0
- docmancer-0.1.1/tests/test_cli.py +217 -0
- docmancer-0.1.1/tests/test_config.py +65 -0
- docmancer-0.1.1/tests/test_embeddings_fastembed.py +30 -0
- docmancer-0.1.1/tests/test_fetcher_gitbook.py +159 -0
- docmancer-0.1.1/tests/test_fetcher_mintlify.py +168 -0
- docmancer-0.1.1/tests/test_install_cmd.py +563 -0
- docmancer-0.1.1/tests/test_models.py +17 -0
- docmancer-0.1.1/tests/test_parsers.py +16 -0
- docmancer-0.1.1/tests/test_vector_store_qdrant.py +137 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: pip install -e ".[dev]"
|
|
29
|
+
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: pytest tests/ -v
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
# Glob (not regex): three-part semver tags like v0.1.1
|
|
7
|
+
- "v*.*.*"
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
smoke-test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
|
|
23
|
+
- name: Install package and build tools
|
|
24
|
+
run: pip install -e ".[dev]" build twine "hatchling<1.27"
|
|
25
|
+
|
|
26
|
+
- name: Verify tag matches package version
|
|
27
|
+
run: |
|
|
28
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
29
|
+
PKG="$(python -c "from docmancer._version import __version__; print(__version__)")"
|
|
30
|
+
if [[ "$TAG" != "$PKG" ]]; then
|
|
31
|
+
echo "::error::Git tag $GITHUB_REF_NAME does not match docmancer._version ($PKG). Bump docmancer/_version.py before tagging."
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: pytest tests/ -v
|
|
37
|
+
|
|
38
|
+
- name: Run smoke CLI checks
|
|
39
|
+
run: |
|
|
40
|
+
python -m docmancer --help
|
|
41
|
+
TMP_DIR="$(mktemp -d)"
|
|
42
|
+
python -m docmancer init --dir "$TMP_DIR"
|
|
43
|
+
test -f "$TMP_DIR/docmancer.yaml"
|
|
44
|
+
python -m docmancer doctor --config "$TMP_DIR/docmancer.yaml"
|
|
45
|
+
|
|
46
|
+
- name: Build artifacts
|
|
47
|
+
run: python -m build --no-isolation
|
|
48
|
+
|
|
49
|
+
- name: Check artifacts
|
|
50
|
+
run: python -m twine check dist/*
|
|
51
|
+
|
|
52
|
+
build:
|
|
53
|
+
needs: smoke-test
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v5
|
|
57
|
+
|
|
58
|
+
- name: Set up Python
|
|
59
|
+
uses: actions/setup-python@v6
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.11"
|
|
62
|
+
|
|
63
|
+
- name: Install build tools
|
|
64
|
+
run: pip install build twine "hatchling<1.27"
|
|
65
|
+
|
|
66
|
+
- name: Build
|
|
67
|
+
run: python -m build --no-isolation
|
|
68
|
+
|
|
69
|
+
- name: Check artifacts
|
|
70
|
+
run: python -m twine check dist/*
|
|
71
|
+
|
|
72
|
+
- name: Upload dist artifacts
|
|
73
|
+
uses: actions/upload-artifact@v4
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
|
|
78
|
+
publish-pypi:
|
|
79
|
+
needs: build
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
environment: release
|
|
82
|
+
permissions:
|
|
83
|
+
id-token: write
|
|
84
|
+
steps:
|
|
85
|
+
- name: Download dist artifacts
|
|
86
|
+
uses: actions/download-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: dist
|
|
89
|
+
path: dist/
|
|
90
|
+
|
|
91
|
+
- name: Publish to PyPI
|
|
92
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
Release numbers were restarted at **0.1.1** after a fresh git history; PyPI installs use this line only going forward.
|
|
8
|
+
|
|
9
|
+
## [0.1.1] - 2026-03-29
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Initial release on the restarted version line: fetch GitBook/Mintlify docs, local FastEmbed + Qdrant ingest, `docmancer query` / `list` / `remove` / `inspect` / `doctor`, and agent skill install targets (Claude Code, Cursor, Codex, OpenCode, Claude Desktop, Gemini, etc.).
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to docmancer
|
|
2
|
+
|
|
3
|
+
Thank you for contributing! This guide covers project layout and common extension points.
|
|
4
|
+
|
|
5
|
+
## Project structure
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
docmancer/
|
|
9
|
+
agent.py # DocmancerAgent; parser registry (_PARSERS); component wiring
|
|
10
|
+
core/
|
|
11
|
+
config.py # DocmancerConfig (pydantic-settings)
|
|
12
|
+
models.py # Document, Chunk, RetrievedChunk
|
|
13
|
+
chunking.py # Text/markdown chunking
|
|
14
|
+
connectors/
|
|
15
|
+
fetchers/ # GitBook and other doc sources (base + gitbook)
|
|
16
|
+
embeddings/ # Embedding backends (FastEmbed)
|
|
17
|
+
parsers/ # Document loaders (text, markdown)
|
|
18
|
+
vector_stores/ # Qdrant store
|
|
19
|
+
cli/
|
|
20
|
+
commands.py # Click commands
|
|
21
|
+
__main__.py # CLI entry point
|
|
22
|
+
tests/ # pytest tests (mirror docmancer/ where useful)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Adding a new document parser
|
|
26
|
+
|
|
27
|
+
1. Implement a loader subclassing `BaseLoader` in `docmancer/connectors/parsers/`.
|
|
28
|
+
2. Register the file extension in `_PARSERS` in `docmancer/agent.py` (dotted import path to the class).
|
|
29
|
+
|
|
30
|
+
## Adding a new embedding provider
|
|
31
|
+
|
|
32
|
+
1. Implement the dense (and if needed sparse) API following `docmancer/connectors/embeddings/base.py`.
|
|
33
|
+
2. Extend the `embedding.provider` branch in `DocmancerAgent._init_components()` in `docmancer/agent.py`.
|
|
34
|
+
3. Extend `DocmancerConfig` / YAML schema in `docmancer/core/config.py` if new settings are required.
|
|
35
|
+
4. Add optional dependencies in `pyproject.toml` if the provider needs extra packages.
|
|
36
|
+
|
|
37
|
+
## Adding a new vector store
|
|
38
|
+
|
|
39
|
+
1. Implement `BaseVectorStore` in `docmancer/connectors/vector_stores/`.
|
|
40
|
+
2. Extend the `vector_store.provider` branch in `DocmancerAgent._init_components()` and add config fields as needed.
|
|
41
|
+
|
|
42
|
+
## Adding a new doc source (fetcher)
|
|
43
|
+
|
|
44
|
+
1. Subclass `BaseFetcher` in `docmancer/connectors/fetchers/`.
|
|
45
|
+
2. Wire the new source into the CLI `fetch` / `ingest` paths in `docmancer/cli/commands.py` (and any agent helpers) following the GitBook pattern.
|
|
46
|
+
|
|
47
|
+
## Running tests
|
|
48
|
+
|
|
49
|
+
**On macOS (to avoid arm64/x86_64 Rosetta issues):**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
arch -arm64 .venv/bin/python -m pytest tests/ -v
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**On Linux / CI:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pytest tests/ -v
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Submitting a PR
|
|
62
|
+
|
|
63
|
+
- Branch name: `feat/<topic>` or `fix/<description>`
|
|
64
|
+
- Run the full test suite before opening the PR
|
|
65
|
+
- New connectors or fetchers should include tests where practical
|
docmancer-0.1.1/LICENSE
ADDED
|
@@ -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.
|
docmancer-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: docmancer
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Fetch docs, embed locally, expose to AI agents via skills.
|
|
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.14,>=3.11
|
|
27
|
+
Requires-Dist: click>=8.0.0
|
|
28
|
+
Requires-Dist: fastembed>=0.6.0
|
|
29
|
+
Requires-Dist: filelock>=3.0.0
|
|
30
|
+
Requires-Dist: httpx>=0.27.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
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# docmancer
|
|
41
|
+
|
|
42
|
+
[](https://pypi.org/project/docmancer/)
|
|
43
|
+
[](LICENSE)
|
|
44
|
+
[](https://pypi.org/project/docmancer/)
|
|
45
|
+
[](https://github.com/docmancer/docmancer/actions/workflows/ci.yml)
|
|
46
|
+
|
|
47
|
+
Fetch docs from GitBook, Mintlify, or local files, embed them locally, and teach AI agents to search them via installed **skills** (CLI commands). No API keys for the default embedding path. No background server—agents run `docmancer` from the terminal.
|
|
48
|
+
|
|
49
|
+
## What it does
|
|
50
|
+
|
|
51
|
+
- Fetches public docs from **GitBook** and **Mintlify** sites via `/llms-full.txt` and `/llms.txt`, with a **sitemap.xml** fallback on Mintlify when those endpoints are missing
|
|
52
|
+
- **`docmancer ingest`:** `--provider auto` (default) uses a combined strategy (llms endpoints → sitemap). **`--provider gitbook`** uses the GitBook-only fetcher; **`--provider mintlify`** uses the same pipeline as `auto`
|
|
53
|
+
- Ingests local `.md` and `.txt` files
|
|
54
|
+
- Stores vectors in **embedded Qdrant** on disk — typically `~/.docmancer/qdrant` when using the auto-created user config, or `.docmancer/qdrant` (resolved relative to your `docmancer.yaml`) for a project-local config from `docmancer init`
|
|
55
|
+
- **Hybrid retrieval** (dense embeddings + sparse / BM25-style vectors) for `docmancer query` and agent-driven queries
|
|
56
|
+
- Installs **skill files** into Claude Code, Cursor, Codex, OpenCode, and Claude Desktop so agents run `docmancer` over the shell
|
|
57
|
+
- Concurrent CLI runs coordinate with a **file lock** on the local Qdrant path
|
|
58
|
+
|
|
59
|
+
## Install
|
|
60
|
+
|
|
61
|
+
Recommended: **`pipx`** so `docmancer` is on your PATH:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pipx install docmancer
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Install `pipx` if needed:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
brew install pipx
|
|
71
|
+
pipx ensurepath
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or **`pip`** inside a virtual environment:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install docmancer
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Quickstart
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# 1. Install (once)
|
|
84
|
+
pipx install docmancer
|
|
85
|
+
|
|
86
|
+
# 2. Ingest docs
|
|
87
|
+
docmancer ingest https://docs.example.com
|
|
88
|
+
|
|
89
|
+
# 3. Install skill into your agent
|
|
90
|
+
docmancer install claude-code # or: cursor, codex, opencode, claude-desktop
|
|
91
|
+
|
|
92
|
+
# 4. Use the agent — it can run docmancer query / list / ingest when relevant
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
No server to start. On first use, config and the default vector store path are created under **`~/.docmancer/`** unless you use a project-local `docmancer.yaml`.
|
|
96
|
+
|
|
97
|
+
## How it works
|
|
98
|
+
|
|
99
|
+
docmancer installs a **skill** (Markdown + YAML frontmatter) into each tool’s skills directory. The skill tells the agent when to use docmancer and which commands to run (`query`, `list`, `ingest`, `remove`, `inspect`, `doctor`, …). Agents execute **`docmancer`** via their normal terminal integration.
|
|
100
|
+
|
|
101
|
+
For more architecture detail (config resolution, layout, security posture), see [docs/project-overview.md](docs/project-overview.md).
|
|
102
|
+
|
|
103
|
+
## Install targets
|
|
104
|
+
|
|
105
|
+
| Command | Where the skill lands |
|
|
106
|
+
|---------|------------------------|
|
|
107
|
+
| `docmancer install claude-code` | `~/.claude/skills/docmancer/SKILL.md` |
|
|
108
|
+
| `docmancer install codex` | `~/.codex/skills/docmancer/SKILL.md` (also mirrors to `~/.agents/skills/docmancer/SKILL.md` for compatibility) |
|
|
109
|
+
| `docmancer install cursor` | `~/.cursor/skills/docmancer/SKILL.md` + marked block in `~/.cursor/AGENTS.md` when needed |
|
|
110
|
+
| `docmancer install opencode` | `~/.config/opencode/skills/docmancer/SKILL.md` (and may mirror under `~/.agents/skills/` if absent) |
|
|
111
|
+
| `docmancer install claude-desktop` | `~/.docmancer/exports/claude-desktop/docmancer.zip` — upload via Claude Desktop **Customize → Skills** |
|
|
112
|
+
|
|
113
|
+
`codex-app` and `codex-desktop` are accepted aliases for the Codex install path.
|
|
114
|
+
|
|
115
|
+
Use **`--project`** with `claude-code` for `.claude/skills/docmancer/SKILL.md` in the current repo.
|
|
116
|
+
|
|
117
|
+
## Commands
|
|
118
|
+
|
|
119
|
+
### `docmancer install <agent>`
|
|
120
|
+
|
|
121
|
+
Install the docmancer skill into a supported agent.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
docmancer install claude-code
|
|
125
|
+
docmancer install cursor
|
|
126
|
+
docmancer install codex
|
|
127
|
+
docmancer install opencode
|
|
128
|
+
docmancer install claude-desktop
|
|
129
|
+
docmancer install claude-code --project
|
|
130
|
+
docmancer install cursor --config ./docmancer.yaml
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If no config is found, **`~/.docmancer/docmancer.yaml`** is created automatically (non-project installs).
|
|
134
|
+
|
|
135
|
+
### `docmancer ingest <path-or-url>`
|
|
136
|
+
|
|
137
|
+
Ingest a local file, directory, or documentation URL.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
docmancer ingest ./docs
|
|
141
|
+
docmancer ingest https://docs.example.com
|
|
142
|
+
docmancer ingest https://docs.example.com --provider gitbook
|
|
143
|
+
docmancer ingest ./docs --recreate
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`--provider`: `auto` (default), `gitbook`, or `mintlify`.
|
|
147
|
+
|
|
148
|
+
### `docmancer query <text>`
|
|
149
|
+
|
|
150
|
+
Run hybrid retrieval from the CLI.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
docmancer query "How do I authenticate?"
|
|
154
|
+
docmancer query "getting started" --limit 3
|
|
155
|
+
docmancer query "season 5 end date" --full
|
|
156
|
+
docmancer query "..." --config ./docmancer.yaml
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Use `--full` when you want the entire chunk body instead of the default preview.
|
|
160
|
+
|
|
161
|
+
### `docmancer list`
|
|
162
|
+
|
|
163
|
+
List ingested sources with ingestion timestamps.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
docmancer list
|
|
167
|
+
docmancer list --config ./docmancer.yaml
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### `docmancer fetch <url>`
|
|
171
|
+
|
|
172
|
+
Download **GitBook** docs as Markdown files only (does not embed). For Mintlify or mixed hosting, use **`docmancer ingest`** or copy files locally first.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
docmancer fetch https://docs.example.com
|
|
176
|
+
docmancer fetch https://docs.example.com --output ./downloaded-docs
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### `docmancer remove <source>`
|
|
180
|
+
|
|
181
|
+
Remove an ingested source by URL or file path.
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
docmancer remove https://docs.example.com/page
|
|
185
|
+
docmancer remove ./docs/getting-started.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### `docmancer inspect`
|
|
189
|
+
|
|
190
|
+
Show collection stats and embedding settings.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
docmancer inspect
|
|
194
|
+
docmancer inspect --config ./docmancer.yaml
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### `docmancer doctor`
|
|
198
|
+
|
|
199
|
+
Check `docmancer` on PATH, effective config, Qdrant path / connectivity, and which skills are installed.
|
|
200
|
+
|
|
201
|
+
For Codex installs, `doctor` reports both the native `~/.codex/skills/...` install and the shared compatibility mirror under `~/.agents/skills/...` when present.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
docmancer doctor
|
|
205
|
+
docmancer doctor --config ./docmancer.yaml
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### `docmancer init`
|
|
209
|
+
|
|
210
|
+
Create a project-local **`docmancer.yaml`** (optional if you rely on `~/.docmancer/docmancer.yaml`).
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
docmancer init
|
|
214
|
+
docmancer init --dir ./sandbox
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Configuration
|
|
218
|
+
|
|
219
|
+
**Resolution order:** `--config` → `./docmancer.yaml` in the current working directory → `~/.docmancer/docmancer.yaml` (created on first use when applicable).
|
|
220
|
+
|
|
221
|
+
Example **project-local** `docmancer.yaml` from `docmancer init`:
|
|
222
|
+
|
|
223
|
+
```yaml
|
|
224
|
+
embedding:
|
|
225
|
+
provider: fastembed
|
|
226
|
+
model: BAAI/bge-small-en-v1.5
|
|
227
|
+
|
|
228
|
+
vector_store:
|
|
229
|
+
provider: qdrant
|
|
230
|
+
local_path: .docmancer/qdrant # resolved relative to this file’s directory
|
|
231
|
+
collection_name: knowledge_base
|
|
232
|
+
retrieval_limit: 5
|
|
233
|
+
score_threshold: 0.35
|
|
234
|
+
|
|
235
|
+
ingestion:
|
|
236
|
+
chunk_size: 800
|
|
237
|
+
chunk_overlap: 120
|
|
238
|
+
bm25_model: Qdrant/bm25
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
The auto-created **user** config under `~/.docmancer/` sets `local_path` to an absolute directory under **`~/.docmancer/qdrant`**. To use a **remote** Qdrant instance, set `vector_store.url` and leave local storage unused.
|
|
242
|
+
|
|
243
|
+
## Supported sources
|
|
244
|
+
|
|
245
|
+
| Source | Strategy |
|
|
246
|
+
|--------|----------|
|
|
247
|
+
| GitBook sites | `/llms-full.txt` → `/llms.txt` (GitBook fetcher); `auto` / `mintlify` use the broader pipeline below |
|
|
248
|
+
| Mintlify & typical llms.txt sites | `/llms-full.txt` → `/llms.txt` → `/sitemap.xml` |
|
|
249
|
+
| Local `.md` / `.txt` | Read from disk |
|
|
250
|
+
|
|
251
|
+
## Requirements
|
|
252
|
+
|
|
253
|
+
- **Python 3.11–3.13** (`requires-python` excludes 3.14+ while dependencies such as `onnxruntime` lack wheels)
|
|
254
|
+
- Disk space for the embedding model (on the order of tens of MB for the default model)
|
|
255
|
+
|
|
256
|
+
If your default `python` is 3.14:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
pipx install docmancer --python python3.13
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Migration from v0.1.x
|
|
263
|
+
|
|
264
|
+
Older releases wired a separate server into some agent configs. Use **skills + CLI** instead.
|
|
265
|
+
|
|
266
|
+
1. Remove any legacy **docmancer** server block from `~/.claude/settings.json`, Cursor or Codex tool-server config, `~/.codex/config.toml`, etc., if you still have one from an old install.
|
|
267
|
+
2. Run **`docmancer install <agent>`** again to install skills.
|
|
268
|
+
3. Existing **`~/.docmancer/docmancer.yaml`** and ingested data remain valid.
|