Skip to content

Plugin System

OpenDocuments uses a modular plugin system with 4 plugin types:

TypePurposeExample
ParserTransform documents into chunksPDF, DOCX, HTML, Code
ConnectorSync from external sourcesGitHub, Notion, Google Drive
ModelLLM generation & embeddingsOllama, OpenAI, Anthropic
MiddlewareHook into processing pipelineCustom filters, transforms

Quick Start

bash
# Create a new plugin
opendocuments plugin create my-parser --type parser

# Develop
cd plugins/my-parser
npm run dev

# Test
npm run test

# Publish
opendocuments plugin publish

Plugin Commands

CommandDescription
plugin create <name> --type <type>Scaffold a new plugin
plugin listShow installed plugins with health status
plugin testRun plugin tests
plugin devWatch mode for development
plugin publishPublish to npm

Naming Convention

  • Official: @opendocuments/parser-*, @opendocuments/connector-*
  • Community: opendocuments-parser-*, opendocuments-connector-*

Learning Path

  1. Start with the Parser API - simplest plugin type
  2. Study parser-html (150 lines) as a reference
  3. Try the Connector API for external integrations
  4. See Model API for custom AI providers

Released under the MIT License.