Automatically discovers, crawls, versions, chunks, and indexes official software documentation into a RAG-ready knowledge base.
Project description
DocForge
Build a versioned, RAG-ready knowledge base from official software documentation.
DocForge discovers documentation, crawls pages, extracts clean Markdown, classifies and chunks content, creates embeddings, and stores vectors for semantic search. It supports versioned indexes, incremental updates, and replaceable pipeline providers.
Features
- Zero-config discovery for PostgreSQL, MySQL, MongoDB, FastAPI, React, Kubernetes, and Redis
- Version-aware indexing and filtered semantic search
- Type-aware chunking for guides, tutorials, API references, code, and tables
- Incremental updates and re-embedding without a fresh crawl
- Embedding providers: Sentence Transformers, OpenAI, Voyage, BGE, and Jina
- Vector backends: ChromaDB, FAISS, Qdrant, LanceDB, and Weaviate
- CLI, async Python API, custom plugin contracts, and MkDocs documentation
Quickstart
Requires Python 3.11+ and internet access. First index downloads default local embedding model and fetches documentation pages.
git clone https://github.com/aritra0309/DocForge.git
cd DocForge
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
docforge index postgresql --version 17
docforge search "how to create an index" --software postgresql --version 17 --top-k 5
DocForge stores local data in ~/.docforge by default.
Python API
import asyncio
from docforge import DocForge
async def main() -> None:
async with DocForge() as forge:
await forge.index("postgresql", version="17")
results = await forge.search(
"how to create an index",
software="postgresql",
version="17",
k=5,
)
for result in results:
print(f"{result.metadata.title}: {result.metadata.url}")
asyncio.run(main())
Configuration
Create docforge.toml in project directory. Environment variables with DOCFORGE_ prefix override file values.
[crawler]
max_pages_per_version = 500
rate_limit_rps = 2
[storage]
backend = "chromadb"
path = "~/.docforge/vectordb"
export DOCFORGE_CRAWLER__MAX_PAGES_PER_VERSION=100
export DOCFORGE_STORAGE__PATH="$PWD/.docforge/vectordb"
docforge config --source
Common commands
docforge index redis
docforge update postgresql
docforge reembed postgresql --model BAAI/bge-small-en-v1.5
docforge list
docforge stats postgresql
docforge delete postgresql --version 17
Run docforge --help or docforge COMMAND --help for all options.
Documentation and examples
Development
pip install -e ".[dev,docs]"
make lint
make typecheck
make test
make docs-build
See CONTRIBUTING.md for pull-request process and registry contributions.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docforge_rag-0.1.0.tar.gz.
File metadata
- Download URL: docforge_rag-0.1.0.tar.gz
- Upload date:
- Size: 192.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed072b4ab75fee247a6fe5539fa1e5d1c53e37e51b75ac7463196cf552768020
|
|
| MD5 |
43e226e1f1d08452ce1c290c93178964
|
|
| BLAKE2b-256 |
5996f5d36f69c88cfb3ebadf12a1ebae3abd7f92eef49d7cd0ee7a0c24727dd6
|
Provenance
The following attestation bundles were made for docforge_rag-0.1.0.tar.gz:
Publisher:
release.yml on aritra0309/DocForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docforge_rag-0.1.0.tar.gz -
Subject digest:
ed072b4ab75fee247a6fe5539fa1e5d1c53e37e51b75ac7463196cf552768020 - Sigstore transparency entry: 2328816042
- Sigstore integration time:
-
Permalink:
aritra0309/DocForge@b04839f185908aa79be0b240dc346b47980bc160 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aritra0309
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b04839f185908aa79be0b240dc346b47980bc160 -
Trigger Event:
push
-
Statement type:
File details
Details for the file docforge_rag-0.1.0-py3-none-any.whl.
File metadata
- Download URL: docforge_rag-0.1.0-py3-none-any.whl
- Upload date:
- Size: 120.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c5d416311b0ffc72c1884c6c6f672ad29ec679d542715ad7851482df561682e
|
|
| MD5 |
5f1009242feda4bf1e8b2a5bd2005bba
|
|
| BLAKE2b-256 |
f939991c5c666c7c3bd86bbafc2e5b79ab5b3a8a2ed1214d2d257af1a360ce98
|
Provenance
The following attestation bundles were made for docforge_rag-0.1.0-py3-none-any.whl:
Publisher:
release.yml on aritra0309/DocForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docforge_rag-0.1.0-py3-none-any.whl -
Subject digest:
1c5d416311b0ffc72c1884c6c6f672ad29ec679d542715ad7851482df561682e - Sigstore transparency entry: 2328816334
- Sigstore integration time:
-
Permalink:
aritra0309/DocForge@b04839f185908aa79be0b240dc346b47980bc160 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aritra0309
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b04839f185908aa79be0b240dc346b47980bc160 -
Trigger Event:
push
-
Statement type: