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

astro-openvscode-inspector

v2.1.1

Published

Astro DevToolbar inspector — open components in VS Code, Cursor, JetBrains, Zed, Vim, and other editors supported by launch-editor.

Readme

Astro VSCode Inspector

alt text A seamless integration between Astro's DevToolbar and your editor that allows you to open files directly from your browser during development.

Features

  • Click to open components directly in VS Code or Zed
  • Smart tooltip with file information
  • Visual highlighting while inspecting
  • Automatic detection up to 20 levels deep
  • Inspector mode auto-closes after opening a file
  • Cross-platform support for Windows, macOS, and Linux

Installation

npm install @react-dev-inspector/babel-plugin vite
npm install astro-openvscode-inspector

Dependencies

This package requires:

  • vite
  • @react-dev-inspector/babel-plugin

Usage

Add the integration to your astro.config.mjs:

import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import astroVSCodeInspector from "astro-openvscode-inspector";
import { loadEnv } from "vite";

const { PUBLIC_PROJECT_FOLDER } = loadEnv(process.env.NODE_ENV, process.cwd(), "");
const isDev = process.env.NODE_ENV === "development";

export default defineConfig({
  integrations: [
    react(isDev ? { babel: { plugins: ["@react-dev-inspector/babel-plugin"] } } : {}),
    isDev &&
      astroVSCodeInspector({
        projectFolder: PUBLIC_PROJECT_FOLDER,
      }),
  ],
});

Open in Zed

To use Zed instead of VS Code, pass the editor option:

astroVSCodeInspector({
  projectFolder: PUBLIC_PROJECT_FOLDER,
  editor: "zed",
});

The package currently supports:

  • editor: "vscode" (default)
  • editor: "zed"

Environment Variables

Set the project folder path in your .env file.

Windows

PUBLIC_PROJECT_FOLDER=C:/Users/username/project
# or
PUBLIC_PROJECT_FOLDER=C:\Users\username\project

macOS/Linux

PUBLIC_PROJECT_FOLDER=/Users/username/project

How it works

  1. Click the inspector icon in the Astro DevToolbar.
  2. Hover over components to preview the file and line.
  3. Click any component to open it in your configured editor.
  4. Inspector mode turns itself off after the click.

Platform Support

  • Windows
  • macOS
  • Linux

The package normalizes the project path and uses the matching editor protocol:

  • VS Code: vscode://file/...
  • Zed: zed://file... On Windows, the drive separator is encoded so the browser preserves C:/... correctly.

Troubleshooting

The editor does not open

  1. Make sure the editor is installed.
  2. Verify that PUBLIC_PROJECT_FOLDER points to the real project root.
  3. Check the browser console for warnings.
  4. If you use Zed, confirm that the zed:// protocol is registered on your system.

Wrong file or wrong path

  • Windows: use C:/Users/... or escaped backslashes
  • macOS/Linux: use absolute paths starting with /

Inspector does not find components

  • Install @react-dev-inspector/babel-plugin
  • Enable the integration only in development mode
  • Confirm your components are emitting the inspector attributes