Skip to main content

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.

CI Python License

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docforge_rag-0.1.0.tar.gz (192.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docforge_rag-0.1.0-py3-none-any.whl (120.4 kB view details)

Uploaded Python 3

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

Hashes for docforge_rag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ed072b4ab75fee247a6fe5539fa1e5d1c53e37e51b75ac7463196cf552768020
MD5 43e226e1f1d08452ce1c290c93178964
BLAKE2b-256 5996f5d36f69c88cfb3ebadf12a1ebae3abd7f92eef49d7cd0ee7a0c24727dd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for docforge_rag-0.1.0.tar.gz:

Publisher: release.yml on aritra0309/DocForge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for docforge_rag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c5d416311b0ffc72c1884c6c6f672ad29ec679d542715ad7851482df561682e
MD5 5f1009242feda4bf1e8b2a5bd2005bba
BLAKE2b-256 f939991c5c666c7c3bd86bbafc2e5b79ab5b3a8a2ed1214d2d257af1a360ce98

See more details on using hashes here.

Provenance

The following attestation bundles were made for docforge_rag-0.1.0-py3-none-any.whl:

Publisher: release.yml on aritra0309/DocForge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page