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

@puttyapp/core

v0.1.1

Published

Core network interceptor functionality - open source

Downloads

7

Readme

npm version License: MIT PRs Welcome

⚡ Putty - Network Interceptor Core

Intercept, mock, and debug network requests in real-time with a beautiful developer tool

✨ Features

🚀 Real-time Request Interception - Capture and inspect all HTTP requests as they happen
🎯 Smart Request Matching - Intercept requests by URL patterns, methods, or custom rules
🔄 Dynamic Response Mocking - Replace API responses with custom JSON, status codes, and headers
Zero Configuration - Works out of the box with any web application
🎨 Beautiful UI - Modern, intuitive interface that feels native to your development workflow
🔧 Developer Friendly - Built with TypeScript, React, and modern web standards
📦 Lightweight - Minimal bundle size with no external dependencies
🌐 Framework Agnostic - Works with React, Vue, Angular, vanilla JS, and more

🎯 Use Cases

  • API Development - Test your frontend against mock APIs before backend is ready
  • Error Testing - Simulate network errors, timeouts, and edge cases
  • Performance Testing - Mock slow responses to test loading states
  • Offline Development - Continue development when APIs are down
  • QA Testing - Create consistent test scenarios for different API states
  • Debugging - Inspect request/response data in real-time

🚀 Quick Start

Installation

npm install @puttyapp/core

Basic Usage

import { NetworkInterceptorWidget } from '@puttyapp/core';

// Initialize the widget
const interceptor = new NetworkInterceptorWidget();
interceptor.init();

Advanced Usage

import { NetworkInterceptorWidget } from '@puttyapp/core';

// Create interceptor with custom options
const interceptor = new NetworkInterceptorWidget({
  position: 'bottom-right', // Widget position
  theme: 'dark',            // UI theme
  autoStart: true,          // Start intercepting immediately
});

// Initialize and start intercepting
interceptor.init();

// Programmatically add intercept rules
interceptor.addInterceptRule({
  url: '/api/users/*',
  method: 'GET',
  responseStatus: 200,
  responseBody: JSON.stringify({ users: [] }),
  enabled: true
});

🎮 Interactive Demo

See the demo above or try the live demo.

📖 Documentation

API Reference

NetworkInterceptorWidget

The main class for managing network interception.

class NetworkInterceptorWidget {
  constructor(options?: WidgetOptions)
  init(): void
  destroy(): void
  addInterceptRule(rule: InterceptRule): void
  removeInterceptRule(id: string): void
  toggleInterceptRule(id: string): void
  getRequests(): NetworkRequest[]
  clearRequests(): void
  setGlobalPassthrough(enabled: boolean): void
}

InterceptRule

Define how requests should be intercepted and mocked.

interface InterceptRule {
  id?: string
  url: string
  method: string
  enabled: boolean
  responseStatus: number
  responseBody: string
  responseHeaders?: Record<string, string>
  createdAt?: number
}

Configuration Options

interface WidgetOptions {
  position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
  theme?: 'light' | 'dark' | 'auto'
  autoStart?: boolean
  globalPassthrough?: boolean
  maxRequests?: number
}

🎮 Interactive Demo

Try the live demo: Demo App

🛠️ Development

We welcome contributions! To develop or test changes to this package:

Prerequisites

  • Node.js 18+
  • npm

Setup

# Clone the repository
git clone https://github.com/puttyapp/core.git
cd core

# Install dependencies
npm install

# Build the package
npm run build

# Run tests
npm test

See CONTRIBUTING.md for more details on our development workflow and guidelines.

🤝 Contributing

We love contributions! Please see our Contributing Guide for how to get started.

📦 Packages

  • @puttyapp/core – This package (open source)

🏗️ Architecture

  • TypeScript, React, Tailwind CSS, Web Components, Service Workers

🎯 Roadmap

  • [ ] Request History Persistence - Save and restore intercept rules
  • [ ] Import/Export Rules - Share configurations between team members
  • [ ] Advanced Matching - Regex patterns, custom matchers
  • [ ] Response Templates - Pre-built response templates
  • [ ] Performance Metrics - Request timing and performance insights
  • [ ] Plugin System - Extend functionality with plugins
  • [ ] Team Collaboration - Share rules across team members

📄 License

MIT License – see LICENSE

🙏 Acknowledgments

  • Built with ❤️ by the Putty team
  • Inspired by Postman, Charles Proxy, browser dev tools

Made with ❤️ for developers everywhere