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

@derped/docexplorer

v0.1.1

Published

CLI tool for crawling external documentation sites, converting pages to Markdown via OpenRouter, and materializing the docs into each of your local projects

Readme

docexplorer

CLI tool for crawling external documentation sites, converting pages to Markdown via OpenRouter, and materializing the docs into each of your local projects. It supports a system-wide local cache and can sync with a remote backend to share docsets across your team.

Installation

Prerequisites

  • Node.js / Bun installed
  • An OpenRouter API key

Install from npm (Recommended)

Install globally using npm:

npm install -g @derped/docexplorer

This makes a global docexplorer command available on your PATH. You can then run docexplorer ... from any project directory.

Development Installation

If you want to build from source or contribute:

Install dependencies

bun install

Build the CLI

bun run build

This compiles TypeScript into dist/docexplorer.js, which is what the CLI entry point uses.

Optional: Install globally (development)

From the project root:

npm link

This makes a global docexplorer command available on your PATH. You can then run docexplorer ... from any project directory.

If you do not want to link globally, you can always run via Bun directly from this repo:

bun run docexplorer -- <command> [...args]

Quick Start (Interactive Mode)

Simply run the tool without arguments to enter the interactive menu:

bun run docexplorer

This will guide you through indexing, listing, pulling, pushing, and configuring the tool.

Configuration

OpenRouter API Key

docexplorer needs an OpenRouter API key to call the model that converts HTML into Markdown and infers docs path prefixes.

  1. Environment variable (takes precedence)

    • Set OPENROUTER_API_KEY in your shell.
  2. Stored user config (persistent)

    • Run docexplorer config (or set-api-key) to save it to ~/.mineperial/docsexplorer/config.json.

Backend URL (Optional)

To share docsets with a team or across machines, you can configure a backend URL (pointing to a running docgrabber-backend instance).

  • Environment variable: DOCEXPLORER_BACKEND_URL
  • Default: https://docexplorer.derped.dev

Other Environment Variables

  • OPENROUTER_MODEL
    • Default: openai/gpt-oss-safeguard-20b
    • Controls the model used for HTML→Markdown conversion.
  • DOCEXPLORER_CONCURRENCY
    • Default: 5, maximum 16
    • Controls parallel processing of pages.
  • DOCEXPLORER_MAX_PAGES
    • Default: 20000
    • Limit on the number of pages to crawl per site.

Cache and Docs Layout

Global Cache

Cached docsets are stored in:

  • POSIX: ~/.mineperial/docsexplorer/cache
  • Windows: C:\Users\<you>\.mineperial\docsexplorer\cache

Project Docs

When running index or pull, docs are written to:

<your-project>/
  .mineperial/
    docs/
      <docName>/
        ... Markdown tree ...

CLI Commands

index

Crawl a site and create a local docset.

docexplorer index <name> <url> [pathPrefix] [--force]
  • name: Friendly name (e.g. nextjs).
  • url: Base URL (e.g. https://nextjs.org/docs).
  • pathPrefix: Optional path to restrict crawling (e.g. /docs).
  • --force: Re-crawl even if cached.

list

List all docsets in your local global cache.

docexplorer list

list-remote

List docsets available on the configured backend.

docexplorer list-remote [query] [--limit <n>] [--offset <n>]

pull

Install a docset into your current project. Checks local cache first, then tries to download from the backend.

docexplorer pull <docId-or-name>

push

Upload all locally cached docsets to the configured backend.

docexplorer push

config

Open the interactive configuration menu to set API keys, defaults, and limits.

docexplorer config

set-api-key

Quickly set the OpenRouter API key in the persistent config.

docexplorer set-api-key <apiKey>

Development

  • Source code: src/
  • Entry point: src/docexplorer.ts
  • Build: bun run build