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

svelte-beacon

v0.2.0

Published

Contextual feedback collection and AI-assisted resolution for SvelteKit applications

Readme

svelte-beacon

Contextual feedback collection and AI-assisted resolution for SvelteKit applications.

Svelte Beacon captures user feedback in context — screenshots, element selectors, browser metadata — and provides a dashboard for managing tasks and an AI agent for executing them. It integrates into any SvelteKit app with two lines of code.

Features

  • Feedback widget — floating button with type/priority selectors, description field, and email capture
  • Screenshot annotation — capture and annotate screenshots with brush, arrow, and text tools
  • Element selector — point-and-click to identify specific UI elements
  • AI-assisted descriptions — Anthropic-powered suggestion to improve feedback quality
  • Task dashboard — admin interface at /__beacon/ with filters, bulk actions, and activity logs
  • AI agent — Claude Code integration for automated task execution with git branch/PR workflow
  • CLI sync — pull tasks from a remote Beacon instance for local development

Requirements

  • SvelteKit 2
  • Svelte 5
  • Node.js 18+

Quick Start

1. Install

npm install svelte-beacon
npx beacon init

The init command creates a .beacon/ directory for the local database and adds it to .gitignore.

2. Add the handle hook

In src/hooks.server.ts:

import { beacon } from 'svelte-beacon/server';
import { sequence } from '@sveltejs/kit/hooks';
import { dev } from '$app/environment';

export const handle = sequence(
  beacon({
    enabled: true,
    mode: dev ? 'development' : 'deployed',
  }),
  // ...your other hooks
);

3. Add the widget component

In src/routes/+layout.svelte:

<script>
  import { Beacon } from 'svelte-beacon';
  let { children } = $props();
</script>

{@render children()}
<Beacon />

That's it. Visit your app and click the feedback button in the bottom-right corner. Access the dashboard at /__beacon/.

Configuration

The beacon() function accepts a BeaconOptions object:

beacon({
  enabled: true,
  mode: 'development',
  database: 'file:.beacon/beacon.db',
  databaseAuthToken: undefined,
  adminEmails: ['[email protected]'],
  widget: {
    screenshot: true,
    elementSelector: true,
    aiAssist: true,
    requireEmail: false,
    position: 'bottom-right',
  },
  ai: {
    anthropicApiKey: process.env.ANTHROPIC_API_KEY,
    maxDurationMinutes: 30,
    requireTestsForBugs: true,
    createPR: false,
  },
})

Mode defaults

| Option | development | deployed | |--------|--------------|------------| | Auth required | No | Yes | | Screenshot capture | Yes | No | | Element selector | Yes | Yes | | AI assist | Yes (if API key) | No | | Email required | No | No |

Dashboard

Access the dashboard at /__beacon/ in your running app. It provides:

  • Task list with status, type, and priority filters
  • Task detail drawer with status transitions, admin notes, and activity log
  • Media tab for viewing screenshots and attachments
  • AI controls for starting/stopping the Claude Code agent
  • Bulk actions for updating or deleting multiple tasks

In deployed mode, the dashboard requires authentication via magic link email sent to addresses in the adminEmails list.

CLI Commands

# Initialize Beacon in your project
npx beacon init

# Remove Beacon from your project
npx beacon teardown

# Pull tasks from a remote Beacon instance
npx beacon pull --remote https://example.com --token <bearer-token>

AI Features

Layer 1: Widget Assist

When an anthropicApiKey is configured, the widget offers AI-assisted description improvement. The AI analyzes the feedback context (type, priority, page URL, selected element) and suggests a more detailed description.

Layer 2: Agent

When the Claude Code CLI is installed, the dashboard can start an AI agent to work on tasks. The agent:

  1. Analyzes the task and project context
  2. Creates a git branch
  3. Implements changes using Claude Code
  4. Runs verification (TypeScript, tests, linting)
  5. Optionally creates a pull request

Environment Variables

| Variable | Purpose | |----------|---------| | ANTHROPIC_API_KEY | Enables AI widget assist (Layer 1) and agent (Layer 2) | | BEACON_DATABASE | Override database URL (default: file:.beacon/beacon.db) | | BEACON_AUTH_TOKEN | Database auth token for Turso connections |

Uninstallation

npx beacon teardown

This removes the .beacon/ directory and its .gitignore entry. Then remove the beacon() call from your hook and the <Beacon /> component from your layout.

License

MIT