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

@chara-codes/tunnel

v0.1.27

Published

A lightweight tunneling service that exposes local development servers to the internet through custom subdomains

Readme

Chara Tunnel

Chara Tunnel is a lightweight, easy-to-use tunneling service that exposes your local development servers to the internet through custom subdomains. Similar to tools like ngrok or localtunnel, Chara Tunnel allows you to share your work, test webhooks, and demo applications without deploying.

Features

  • 🌐 Expose local servers to the internet with custom subdomains
  • 🔄 Stream HTTP requests and responses
  • 🧩 Modify response content on-the-fly via configurable replacements
  • 🔒 WebSocket-based secure communication
  • 🔍 Detailed logging for troubleshooting

Installation

# Install globally
bun add -g @chara-codes/tunnel

# Or use with bunx
bunx @chara-codes/tunnel [command]

# Or install locally
bun add @chara-codes/tunnel

Usage

Chara Tunnel consists of two parts: a server component that receives internet traffic and a client component that connects to the server and forwards requests to your local application.

Start a tunnel server

tunnel server --port 1337 --domain chara-ai.dev --controlDomain control.chara-ai.dev

Connect a local server

tunnel client --port 3000 --host localhost --remoteHost control.chara-ai.dev --subdomain myapp.chara-ai.dev

This will make your local server available at myapp.chara-ai.dev.

Using a random domain

If you don't specify a subdomain when connecting a client, the server will generate a random one for you:

tunnel client --port 3000 --host localhost --remoteHost control.chara-ai.dev

You'll receive output similar to:

✓ Connected to tunnel server!
✓ Tunnel established! Your local server is now available at:
  https://random-words-123456.chara-ai.dev

Command Options

Server Command

tunnel server [options]

| Option | Description | Default | |--------|-------------|---------| | --port, -p | Port to listen on | 1337 | | --domain | Root domain for generating subdomains | chara-ai.dev | | --controlDomain | Control domain for WebSocket connections | control.chara-ai.dev | | --debug, -D | Enable debug logging | false | | --configFile, -c | Path to a JSON configuration file for replacements | - |

Client Command

tunnel client [options]

| Option | Description | Default | |--------|-------------|---------| | --port, -p | Local port to forward | 3000 | | --host, -h | Local host to forward | localhost | | --remoteHost, -r | Remote tunnel server host | control.localhost:1337 | | --secure, -s | Use secure WebSocket connection (wss://) | true | | --subdomain, -d | Desired subdomain (random if not specified) | - | | --debug, -D | Enable debug logging | false |

Content Replacements

Chara Tunnel can modify HTML responses on-the-fly by applying text replacements. This is useful for injecting scripts, modifying content, or adding analytics.

Create a config file (e.g., config.json):

{
  "replacements": [
    {
      "pattern": "</body>",
      "replacement": "<script>console.log('Injected via Chara Tunnel');</script></body>"
    },
    {
      "pattern": "<title>(.*?)</title>",
      "replacement": "<title>$1 [Dev]</title>"
    }
  ]
}

Then start the server with:

tunnel server --configFile config.json

Use Cases

  • Development & Testing: Expose your local dev server to the internet
  • Demos & Sharing: Share your work with clients or team members
  • Webhook Testing: Test webhook integrations with third-party services
  • Mobile App Testing: Test your APIs with mobile applications over the internet
  • Content Injection: Add scripts or stylesheets to any web page for testing

Programmatic Usage

import { TunnelClient, startServer } from '@chara-codes/tunnel';

// Start a client
const client = new TunnelClient({
  port: 3000,
  host: 'localhost',
  remoteHost: 'control.chara-ai.dev',
  subdomain: 'test.chara-ai.dev'
});

await client.connect();

// Start a server
startServer({
  port: 1337,
  domain: 'chara-ai.dev',
  controlDomain: 'control.chara-ai.dev',
  replacements: [
    { pattern: '</body>', replacement: '<script>console.log("Hello");</script></body>' }
  ]
});

License

Apache License 2.0

Copyright (c) 2025 Chara Codes

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See the main LICENSE file for details.