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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vscode-docpilot

v0.6.0

Published

AI-Powered PDF Assistant & Quick Prompts Manager for VSCode

Downloads

8

Readme

DocPilot

VSCode extension for PDF viewing, AI-powered document analysis, and productivity tools.

Features

PDF Viewer

  • Automatic activation when opening .pdf files via File → Open
  • Local and remote PDFs (filesystem paths or URLs)
  • Navigation & zoom controls with fit-to-width/page options
  • Text search with keyboard navigation (Ctrl/Cmd+F)
  • Screenshot tool with drag-to-select and clipboard support
  • Object inspector for analyzing PDF structure (images, tables, fonts, annotations, metadata, etc.)
  • Theme integration with VSCode dark/light modes

Screenshots

pdf-viewer-01

pdf-viewer-03

pdf-viewer-04

AI Document Analysis

Requires active GitHub Copilot subscription.

  • Document summarization with smart caching
  • Mindmap generation in Mermaid format
  • Semantic chunking for large documents
  • Multi-model support (GPT-4, Gemini, etc.)
  • Cache management (stats, export, clear)

Screenshots

pdf-viewer-02

Quick Prompts

  • Customizable text processing for selected text in any editor
  • Context menu integration (right-click selected text)
  • Template system with {selectedText} placeholder
  • Direct Copilot integration for instant AI processing
  • Built-in defaults (Explain Code, Find Issues)

Screenshots

quick-prompts-01

quick-prompts-02

Markdown Enhancement

  • Automatic Mermaid rendering in markdown preview
  • All diagram types supported (flowcharts, sequence, class, state, ER, gantt, mindmap, etc.)
  • Theme-aware visualization
  • Zero configuration required

Screenshots

mermaid-01

mermaid-02

Installation

Marketplace:

Development:

git clone https://github.com/DTeam-Top/vscode-docpilot
cd vscode-docpilot
npm install
npm run compile
# Press F5 in VSCode to launch Extension Development Host

Quick Start

Opening PDFs

# Automatic - just open a PDF file
File → Open → select.pdf

# Command palette
Ctrl/Cmd+Shift+P → "DocPilot: Open Local PDF"
Ctrl/Cmd+Shift+P → "DocPilot: Open PDF from URL"

# Context menu
Right-click .pdf in Explorer → "Open Local PDF"

AI Commands

Open Copilot Chat (Ctrl/Cmd+Alt+I) and use:

@docpilot /summarise path/to/file.pdf
@docpilot /summarise https://example.com/doc.pdf
@docpilot /summarise                    # Shows file picker

@docpilot /mindmap path/to/file.pdf     # Generate Mermaid mindmap
@docpilot /cache-stats                  # View cache info
@docpilot /clear-cache                  # Clear all caches
@docpilot /cache-export                 # Export to markdown

Quick Prompts

  1. Select text in any editor
  2. Right-click → DocPilot → Quick Prompts
  3. Choose a prompt (or create custom ones in settings)

Configure custom prompts:

{
  "docpilot.quickPrompts": [
    {
      "name": "Explain Code",
      "prompt": "Explain this code:\n\n{selectedText}"
    },
    {
      "name": "Find Bugs",
      "prompt": "Review for bugs:\n\n{selectedText}"
    }
  ]
}

Mermaid Diagrams

Create markdown files with Mermaid code blocks:

# My Document

```mermaid
flowchart TD
    A[Start] --> B[Process]
    B --> C[End]
```

Open preview (Ctrl/Cmd+Shift+V) to see rendered diagrams.

Keyboard Shortcuts

PDF Viewer:

  • Ctrl/Cmd + F - Search text
  • Enter - Next search result
  • Shift + Enter - Previous search result
  • ESC - Close search
  • Ctrl/Cmd + +/-/0 - Zoom in/out/reset
  • Ctrl/Cmd + Scroll - Zoom with mouse

Configuration

Key settings (access via VSCode Settings):

{
  "docpilot.textProcessing.chunkSizeRatio": 0.8,
  "docpilot.textProcessing.overlapRatio": 0.1,
  "docpilot.pdfViewer.maxCachedTextLayers": 10,
  "docpilot.timeouts.textExtractionMs": 30000
}

See full configuration options in VSCode Settings UI.

Development

Build Commands

npm run compile          # Build TypeScript + assets + bundle
npm run watch            # Watch mode for development
npm run bundle-webview   # Bundle webview scripts/styles

npm run test             # All tests
npm run test:unit        # Unit tests only
npm run test:integration # Integration tests only
npm run test:e2e         # End-to-end tests (Playwright)

npm run lint             # Lint with Biome
npm run format           # Format with Biome
npm run check            # Lint + format check

npm run package          # Create .vsix package

Architecture

src/
├── extension.ts         # Entry point
├── chat/                # Copilot integration (@docpilot commands)
├── commands/            # VSCode commands (open PDF, quick prompts)
├── editors/             # Custom PDF editor provider
├── webview/             # PDF viewer frontend
│   ├── scripts/         # JavaScript modules (PDF.js integration)
│   ├── styles/          # CSS (theme-aware)
│   └── templates/       # HTML templates
├── pdf/                 # Text/object extraction, chunking
├── cache/               # Summary/document caching
├── markdown/            # Mermaid preview scripts
├── utils/               # Shared utilities
└── test/                # Unit/integration/E2E tests

Key Technologies:

  • TypeScript 5.9 - Strict mode with ES2020 target for type safety
  • PDF.js 5.3.93 - Mozilla's modern PDF rendering engine with ES modules
  • VSCode Extension API 1.102+ - Custom editor, webview panels, chat participant
  • Language Model API - GitHub Copilot integration for AI features
  • Mermaid v11 - Diagram rendering loaded from CDN
  • Rollup - Module bundling with esbuild minification for webview assets
  • Biome - Fast linting and code formatting
  • Mocha + Chai + Sinon - Unit and integration testing framework
  • Playwright - End-to-end testing in real VSCode environment

Limitations

  • AI features require active GitHub Copilot subscription
  • Initial load time scales with document size
  • Very large documents (>100MB) may have performance issues

License

MIT License - see LICENSE file for details.

Links