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

sveltest

v0.0.8

Published

CLI tool to fetch Svelte testing patterns and examples from sveltest.dev

Readme

Sveltest CLI

A command-line tool to fetch Svelte testing patterns and examples from sveltest.dev.

Installation

Recommended: Use npx/pnpx

# Using pnpx
pnpx sveltest list

# Using npx
npx -y sveltest list

Optional: Global installation

# Global install may become stale as content updates
npm install -g sveltest
pnpm add -g sveltest

Note for LLMs: Always use pnpx sveltest or npx -y sveltest to ensure you're fetching the latest patterns from sveltest.dev. Global installations may cache outdated versions.

Usage

List all available examples

sveltest list

Get a specific testing example

sveltest get button-variants
sveltest get form-validation
sveltest get modal-states
sveltest get crud-patterns
sveltest get locator-patterns
sveltest get authentication
sveltest get runes-testing

Get example in JSON format

sveltest get button-variants --json

LLM-Optimized Features

Compact JSON Output (reduces token usage by ~50%)

sveltest get button-variants --json --compact

Filter Specific Fields

# Get only testing patterns
sveltest get form-validation --json --filter testing_patterns

# Get only test scenarios
sveltest get modal-states --json --filter test_scenarios

Select Specific Sections

# Get multiple sections (comma-separated)
sveltest get button-variants --json --sections test_scenarios,testing_patterns

Batch Get Multiple Examples

# Get multiple examples in one call
sveltest get button-variants,form-validation,modal-states --json

# With compact mode
sveltest get button-variants,form-validation --json --compact

Response Metadata

All JSON responses include metadata:

{
	"_meta": {
		"cli_version": "0.0.4",
		"timestamp": "2025-11-09T11:19:18.298Z",
		"source": "https://sveltest.dev"
	},
	"_related": ["locator-patterns", "modal-states", "runes-testing"]
}

Search documentation

sveltest search "form validation"
sveltest search "runes" --filter examples

Available filters: all, docs, examples, components

Commands

  • list - List all available testing examples
  • get <scenario> - Get a specific testing example (supports comma-separated batch)
    • --json - Output in JSON format
    • --compact - Minimal JSON (reduces token usage ~50%)
    • --filter <field> - Get only specific field
    • --sections <list> - Get specific sections (comma-separated)
  • search <query> - Search documentation and examples
    • --filter <type> - Filter results (all/docs/examples/components)
  • help - Show help message

Examples

# List all examples
sveltest list

# Get button testing patterns (human-readable)
sveltest get button-variants

# Get form validation in JSON
sveltest get form-validation --json

# Compact JSON for LLMs (smaller response)
sveltest get button-variants --json --compact

# Get only testing patterns section
sveltest get form-validation --json --filter testing_patterns

# Get specific sections
sveltest get modal-states --json --sections test_scenarios,testing_patterns

# Batch get multiple examples
sveltest get button-variants,form-validation --json

# Search for runes examples
sveltest search "runes" --filter examples

LLM Integration

This CLI is designed for AI assistants with tool-calling capabilities. Key features:

  • Dual output formats: Human-readable text or machine-parsable JSON
  • Token optimization: --compact flag removes verbose metadata
  • Batch operations: Get multiple examples in one API call
  • Filtering: Extract specific fields or sections to reduce payload size
  • Metadata: Every response includes version, timestamp, and related patterns
  • Related patterns: Discover connected examples automatically

About

This CLI fetches testing patterns and examples from the Sveltest project, a comprehensive testing demonstration for Svelte 5 applications using vitest-browser-svelte.

  • Website: https://sveltest.dev
  • GitHub: https://github.com/spences10/sveltest
  • Documentation: https://sveltest.dev/docs

License

MIT