Files
fil/docs/snippets/wasm/plugins/list_plugins.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

1.1 KiB

List Registered Plugins

List all registered plugins of each type: OCR backends, post-processors, validators, and document extractors.

import init, {
  listDocumentExtractors,
  listOcrBackends,
  listPostProcessors,
  listValidators,
} from "kreuzberg-wasm";

await init();

// List all document extractors
const extractors = listDocumentExtractors();
console.log("Document extractors:", extractors);

// List all OCR backends
const ocrBackends = listOcrBackends();
console.log("OCR backends:", ocrBackends);

// List all post-processors
const processors = listPostProcessors();
console.log("Post-processors:", processors);

// List all validators
const validators = listValidators();
console.log("Validators:", validators);

// Count registered plugins
console.log(`Total plugins registered:
  Extractors: ${extractors.length}
  OCR backends: ${ocrBackends.length}
  Post-processors: ${processors.length}
  Validators: ${validators.length}`);

Use this to verify which plugins are available before extraction or to debug plugin registration issues.