npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@drdoc-com/pi-drdoc

v1.0.4

Published

Dr.DOC DMS Integration Package for PI Agent

Readme

Pi Plugin for Dr.DOC DMS

An integration plugin Package for the Pi Agent (pi.dev) ecosystem to interact seamlessly with the Dr.DOC Document Management System (DMS/ECM).

This plugin allows the Pi Agent to query Dr.DOC archives, fetch document blobs, store files locally, generate direct web links, and display inline document previews.


System Architecture & Integration Directions

The integration between Pi Agent and Dr.DOC is split into two primary operational directions:

1. Pi → Dr.DOC (This Plugin)

This plugin enables the Pi Agent to make outgoing API calls to Dr.DOC. The agent uses these tool functions to search archives, retrieve documents, save them locally, and process binary/image data.

2. Dr.DOC → Pi (OpenAI API Wrapper)

To allow Dr.DOC (or external tools) to send requests to Pi using the standard OpenAI API format, the @drdoc-com/pi-openai-api-wrapper package can be used.


Features

  • Document Retrieval: Fetches document blobs and metadata from Dr.DOC using archive names and record IDs.
  • Safe Local Storage: Automatically saves retrieved files to a reliable user directory (~/.drdoc/downloads/), avoiding conflicts with host extension directories.
  • Inline Image Previews: Generates Base64 data URLs for image files (image/*), enabling direct rendering in the Pi Agent interface.
  • Direct Web URL Generation: Creates browser-accessible URLs for fetched documents (https://drdoc.com/model/document?action=get&...).
  • Robust Error Handling: Checks HTTP status codes (response.ok) and handles binary buffers cleanly.

Installation

Install the package via npm or directly into your Pi extension environment:

pi install npm:@drdoc-com/pi-drdoc

Or via GitHub:

pi install git:https://github.com/drdoc-com/pi-drdoc

Usage

Pi Slash Commands (within Pi Agent)

Use Pi Slash Command (within Pi Agent) to signin/login. Format:

/drdoc_login <baseUrl> <username> <password> <totp> <ignoreSSL:1,0>

Example:

/drdoc_login https://drdoc.com demo password "" 1

And signout/logout:

/drdoc_logout

Pi Agent Tool Calling

Example:

Suche im Dr.DOC Archiv "rec" alle Rechnungen von Firma Amazon aus diesem Jahr.

Configuration

The plugin utilizes configuration options supplied by the Dr.DOC client or environment variables.

Environment Variables

| Variable | Description | Default | | --- | --- | --- | | DRDOC_BASE_URL | Base URL of the Dr.DOC instance | https://drdoc.com | | DRDOC_CONFIG_DIR (alt. PI_CONFIG_DIR) | Custom directory for config files | ~/.pi/agent | | DRDOC_DOWNLOAD_DIR | Custom directory for downloaded files | ~/.drdoc/downloads | | DRDOC_IGNORE_SSL | Ignore TLS/SSL Errors (Set NODE_TLS_REJECT_UNAUTHORIZED=0) | | | `DRDOC_AI_FS` | Dr.DOC IMPORT_ASCII FieldSelection Name for Field Descriptions. | `STD_AI_INVOICE_IN`, `DD_FIELD_DESC`, `STD_FIELD_DESC` | | `DRDOC_DEBUG` | Enable Debugging | |


Security Notes

  • Pi Agent is designed as a personal AI agent. Users must operate their own private Pi Agent instance rather than using an instance hosted on the Dr.DOC Web Server.
  • Credential Persistence (/drdoc_login): When using the Dr.DOC AI Chat with Pi configured as the AI endpoint (via @drdoc-com/pi-openai-api-wrapper), the /drdoc_login command MUST NOT be executed. Authentication credentials within the Pi Agent instance are persistent and could potentially be exposed to other users sharing the same instance.
  • Dedicated Service Account: Use a dedicated Dr.DOC user account with limited permissions (e.g. Datensatzspezifische Berechtigungen) based on the principle of least privilege ("need-to-know") specifically for AI tasks and the /drdoc_login command.
  • Containerized Deployment: Whenever possible, run Pi Agent inside an isolated container environment (e.g., Docker, Podman) to ensure process isolation and security boundaries.

License

This project is licensed under the Apache License 2.0. Dr.DOC DMS is licensed is under proprietary License.


Documentation

See Dr.DOC Web REST API Documentation: https://drdoc.com/node/de/products/web/doku/rest-api