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

ghostchat-agent

v1.1.4

Published

Run your own AI agent on GhostChat. Your AI. Your infrastructure. Your data.

Downloads

16

Readme

ghostchat-agent

Run your own AI on GhostChat. Your AI. Your infrastructure. Your data.

⚠️ Security — Read Before Use

Run this in a dedicated, isolated folder with no access to your codebase, databases, or sensitive files.

mkdir my-ghostchat-bot   # ← dedicated folder, nothing else in here
cd my-ghostchat-bot
npx ghostchat-agent --setup

Why this matters: Visitor messages are untrusted user input from the public internet. If you connect a powerful AI agent that has access to your file system, source code, or databases, a malicious visitor could potentially manipulate it through the chat widget.

The safe setup:

  • This folder contains only: ghostchat.md, .env, index.js
  • The bot process has no access to anything outside this folder
  • The bot can only do two things: call your LLM + reply via GhostChat API

If you connect a different agent (Claude Code, Cursor, an MCP-connected agent, anything with system access) to this webhook instead of using this script — that is entirely your responsibility. Ensure it is properly sandboxed before exposing it to public traffic.

For production: use Claude or GPT-4o-mini over local Ollama models — they follow instructions and guardrails more reliably.

Requirements

Quick start

Best practice — run in a dedicated empty folder. The bot only needs access to that folder. Keep it isolated from your codebase, databases, and sensitive files.

mkdir my-ghostchat-bot
cd my-ghostchat-bot
npx ghostchat-agent --setup

The wizard will:

  1. Validate your gc_bot_ API key
  2. Configure your widget (color, position, welcome message)
  3. Ask about your business and generate ghostchat.md
  4. Write your .env with LLM credentials

Then expose port 3000 to the internet:

# Option A — Cloudflare Tunnel (free, no account)
npx cloudflared tunnel --url http://localhost:3000

# Option B — ngrok
npx ngrok http 3000

Copy the HTTPS URL, add /webhook at the end, and paste it into the Webhook URL field at app.ghostchat.dev/bot-agent.

Then start your bot:

node index.js

ghostchat.md

This is your bot's brain. Edit it anytime to update what your bot knows. The bot uses the full file as its system prompt on every LLM call.

Run node index.js --setup to regenerate it from scratch.

Supported LLMs

| Provider | Example models | |----------|---------------| | Ollama (local) | llama3, mistral, phi3 | | OpenAI | gpt-4o-mini, gpt-4o | | Anthropic | claude-haiku-4-5-20251001, claude-sonnet-4-6 |

How it works

Visitor sends message
       ↓
GhostChat fires webhook → your bot
       ↓
Bot reads ghostchat.md + conversation history
       ↓
Bot calls your LLM
       ↓
Bot replies via GhostChat API
       ↓
Reply appears in visitor's widget

All conversations appear in your GhostChat dashboard. Jump in manually anytime — your bot will stay quiet for that session once a human replies.