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

sv-agentation

v0.4.0

Published

Dev-mode Svelte inspector for annotating elements, text selections, groups, and areas in the browser.

Readme

Svelte Agentation

Svelte Agentation OG

npm version downloads

Live Preview: Svelte Agentation

Overview

Svelte Agentation turns UI annotations into structured context that AI coding agents can understand and act on.

Installation

pnpm i sv-agentation
npm i sv-agentation
bun i sv-agentation
yarn add sv-agentation

Usage

<script lang="ts">
	import { browser, dev } from '$app/environment';
	import { Agentation } from 'sv-agentation';
</script>

{#if browser && dev}
	<Agentation />
{/if}

Mount the inspector only in development and only in the browser.

Open in Editor

<script lang="ts">
	import { browser, dev } from '$app/environment';
	import { Agentation } from 'sv-agentation';

	// Absolute path to project root
	let workspaceRoot = 'C:/Users/YourName/Projects/YourProject';
</script>

{#if browser && dev}
	<Agentation {workspaceRoot} openSourceOnClick />
{/if}

Annotation Callbacks

<script lang="ts">
	import { browser, dev } from '$app/environment';
	import { Agentation } from 'sv-agentation';
	import type { Annotation, AnnotationPayload } from 'sv-agentation';

	function handleAnnotationAdd(annotation: Annotation) {
		console.log('New annotation added:', annotation);
	}

	function handleCopy(markdown: string, payload: AnnotationPayload) {
		console.log('Notes copied:', markdown, payload);
	}
</script>

{#if browser && dev}
	<Agentation onAnnotationAdd={handleAnnotationAdd} onCopy={handleCopy} />
{/if}

Custom Shortcuts

<Agentation
	{workspaceRoot}
	keyBindings={{
		inspect: 'Alt+I',
		copy: 'Alt+C',
		reset: 'Alt+R',
		open: 'Alt+O',
		delete: 'Alt+D'
	}}
/>

Shortcuts

| Shortcut | Action | Description | | -------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------- | | i | Inspect | Toggle the inspector toolbar and annotation mode. Configurable through keyBindings.inspect. | | c | Copy | Copy notes as Markdown when at least one note exists. Configurable through keyBindings.copy. | | r | Reset | Reset the floating toolbar position. Configurable through keyBindings.reset. | | o | Open | Open the hovered source location. Configurable through keyBindings.open. | | d | Delete | Delete the currently edited note. Configurable through keyBindings.delete. | | esc | Cancel | Clear transient selections, close the composer, or dismiss settings/delete state. | | enter | Submit | Submit the current note from the composer. Configurable through keyBindings.submit. | | shift + ctrl/cmd + click | Build a group selection | Add or remove elements from a grouped annotation target before releasing the modifiers. |

Features

  1. Annotate individual elements directly in the page.
  2. Annotate selected text ranges.
  3. Annotate grouped selections across multiple elements.
  4. Use a draggable floating toolbar.
  5. Toggle the inspector theme inside the tool UI.
  6. Copy notes in compact, standard, detailed, or forensic output modes.
  7. Include computed-style snapshots for forensic exports.
  8. Preview all current-page notes together from the toolbar and jump directly into any saved note.
  9. Toggle marker visibility for notes.
  10. Block normal page interactions while inspecting.
  11. Use a delete-all flow with configurable delay.
  12. Hook into annotation lifecycle and copy events with callbacks.
  13. Mount the inspector only in dev mode with browser && dev.

Props

| Prop | Type | Description | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | workspaceRoot | string \| null | Absolute project root for source lookup and editor links. | | selector | string \| null | Optional selector to scope inspectable elements. | | vscodeScheme | 'vscode' \| 'vscode-insiders' | Choose the VS Code URL scheme for open-in-editor actions. | | openSourceOnClick | boolean | Open source directly on click instead of only showing metadata. | | deleteAllDelayMs | number | Confirmation delay for delete-all notes. | | toolbarPosition | 'top-left' \| 'top-center' \| 'top-right' \| 'mid-right' \| 'mid-left' \| 'bottom-left' \| 'bottom-center' \| 'bottom-right' | When provided, syncs the floating toolbar to this preset and stores it as the latest saved placement. | | outputMode | 'compact' \| 'standard' \| 'detailed' \| 'forensic' | When provided, syncs the copy/export mode and stores it for later sessions. | | pauseAnimations | boolean | When provided, syncs animation pausing while the inspector is active and stores it for later sessions. | | clearOnCopy | boolean | When provided, syncs whether copied notes are cleared and stores it for later sessions. | | includeComponentContext | boolean | When provided, syncs component-context capture and stores it for later sessions. | | includeComputedStyles | boolean | When provided, syncs computed-style capture and stores it for later sessions. | | copyToClipboard | boolean | Disable direct clipboard writes and use callbacks only. | | keyBindings | Partial<Record<'inspect' \| 'copy' \| 'reset' \| 'open' \| 'delete' \| 'cancel' \| 'submit', string \| null>> | Override or disable keyboard actions without changing persisted toolbar settings. | | onAnnotationAdd | (annotation) => void | Called after a note is created. | | onAnnotationUpdate | (annotation) => void | Called after a note is updated. | | onAnnotationDelete | (annotation) => void | Called after a note is deleted. | | onAnnotationsClear | (annotations) => void | Called after all notes are cleared. | | onCopy | (markdown, payload) => void | Called after note export is prepared. |

Credits

This project is highly inspired by Agentation.com.

Sponsor

GitHub Sponsors