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

@hevmind/ask

v0.3.4

Published

hev ask: a heading-anchored, agentic search overlay for Astro docs sites.

Readme

@hevmind/ask

hev ask is a heading-anchored search overlay for docs sites. The digest is built from your markdown, not your renderer — Astro gets the turnkey integration below, and Docusaurus, VitePress, MkDocs, or any static site get the same overlay as a one-script drop-in (see Frameworks). Typing runs instant keyword search; pressing Enter runs an optional Claude search loop that chooses sub-queries and ranks section results.

Install

pnpm add @hevmind/ask

For the current GitHub-hosted monorepo package before npm publication:

pnpm add "git+ssh://[email protected]/hev/ask.git#main&path:/packages/ui"

Configure

// astro.config.mjs
import { defineConfig } from 'astro/config';
import hevAsk from '@hevmind/ask';

export default defineConfig({
  integrations: [
    hevAsk({
      collections: ['docs'],
      basePath: '/docs/',
    }),
  ],
});

| Option | Default | Description | | --- | --- | --- | | collections | - | Content collections to index. | | provider | anthropic | Inference provider: anthropic, openai, or openrouter. Each reads its own key: ANTHROPIC_API_KEY, OPENAI_API_KEY, or OPENROUTER_API_KEY. | | providerBaseUrl | per provider | Base URL override for the OpenAI-compatible providers (any Chat Completions endpoint). | | model | per provider | Runtime search-loop model; claude-haiku-4-5 on the default provider. | | endpoint | /api/ask | Injected on-demand route. | | basePath | /docs/ | Turns a doc slug into its page URL. | | maxResults | 6 | Max results returned. | | maxIterations | 4 | Max search-loop rounds. | | chunkHeadingDepth | 3 | Chunk at ## through this heading depth. | | candidatePerSearch | 8 | Chunks returned by each search tool call. | | perDocCap | 2 | Max chunks per document in one prefilter call. | | digestModel | per provider | Offline digest build model; claude-opus-4-8 on the default provider. | | digestDir | .hev-ask | Committed digest tree directory. | | digestPath | .hev-ask | Deprecated alias for digestDir. | | digestContentGlobs | derived from collections | Build-time Markdown/MDX corpus globs. |

Add the overlay

---
import SearchOverlay from '@hevmind/ask/components/SearchOverlay.astro';
---
<button data-hev-ask-open>Search <kbd>⌘K</kbd></button>

<!-- once per page, e.g. at the end of your layout -->
<SearchOverlay />

Open with ⌘K / Ctrl+K, or /. Any element with data-hev-ask-open also opens it. Typing returns keyword results immediately. Press Enter to ask AI, or move the selection with arrows/hover and press Enter to open a keyword hit.

Ask digest

ask digest build
ask digest verify

The builder writes the .hev-ask/ markdown tree, which should be committed. Builds are hash-gated, so unchanged content does not spend another Opus call. verify builds the site and checks that every chunk anchor exists in dist.

hev ask uses github-slugger to match Astro heading anchors exactly.

Recommended CI gates:

pnpm test
pnpm typecheck
pnpm build
pnpm digest:verify

Publishing

This package is intended to publish as @hevmind/ask. Before publishing, bump the version, run the verification gates, inspect pnpm --filter @hevmind/ask pack --dry-run, then publish from this package directory with:

pnpm publish --access public

After publish, consumers should depend on the npm semver range instead of the Git path:/packages/ui dependency.

Git dependencies are acceptable for local integration while the package is not yet published, but they are not the long-term distribution path.

Other frameworks

The Astro integration above is the turnkey path. On any other framework you build the digest the same way (ask digest build), bundle the static assets (ask digest bundle), and drop in the prebuilt overlay as a <script> tag — keyword search runs fully static, no server. For agentic answers, deploy the standalone endpoint and point the overlay at it. See Frameworks for Docusaurus, VitePress, MkDocs, and plain-HTML recipes.

Server Requirements

  • Keyword search runs fully static — the drop-in overlay reads the committed digest in the browser, no server required.
  • The agentic path needs a runtime: on Astro, /api/ask is rendered on demand (so the site needs a server adapter in production); on other frameworks, it's the standalone hostable endpoint.
  • Set the provider's API key (ANTHROPIC_API_KEY by default) in that server environment for AI search and fresh digest generation. Without a runtime key, the endpoint still serves keyword results.

Theming

The overlay reads your site's CSS custom properties with dark fallbacks: --paper (background), --ink (text), --muted, --signal (accent), and --font-mono. Define these on :root to match your brand.