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

ghostcode-canary

v2.0.0

Published

Terminal AI coding assistant — chat with OpenAI, Anthropic, Grok, Ollama & more

Readme

GhostCode

Terminal AI coding assistant. Chat with 9 AI providers, auto-save code blocks, keep persistent memory, and delegate read-only exploration to a subagent.

npm i -g ghostcode
ghostcode

Requirements

  • Node.js ≥ 22 (npm distribution), or Bun ≥ 1.1 (preferred — single binary, no install step)
  • SQLite via bun:sqlite (Bun) or better-sqlite3 (Node fallback)

Install

# npm (Node 22+)
npm i -g ghostcode

# single binary (Bun) — build yourself
bun run build:binary
./dist/ghostcode

# Homebrew / Scoop (see distrib/ for manifests)
brew install ghostcode
scoop install ghostcode

Quick start

# connect a provider key
ghostcode api connect openai sk-...

# start the chat REPL
ghostcode

# non-interactive question, writes files on approval
ghostcode ask "add error handling to src/main.ts"

# point the agent at a directory (security boundary)
ghostcode --dir ~/my-project

# pick a different provider/model for this session
ghostcode --provider grok --model grok-3

Features

  • 9 AI providers — OpenAI, Grok (xAI), Anthropic, Ollama (local), Groq, OpenRouter, NVIDIA, OpenCode Zen, OpenCode Go
  • Tool-calling — file read/write/edit, shell commands, web search/fetch, grep, glob
  • Persistent memory — save/recall knowledge across sessions with 4 types: user, feedback, project, reference
  • Auto-save — code blocks in AI responses saved to ghostcode_gen/ in cwd
  • Security — configurable tool approval (ask/auto/deny) and secret scanning
  • Multi-runtime — same code runs on Bun (primary) and Node 22+, shipped as ESM via tsup

In-app commands

| Command | What it does | |---|---| | /help | List commands | | /quit or Ctrl-C | Exit | | /provider <id> | Switch provider | | /model <name> | Switch model | | /api connect <provider> <key> | Save an API key | | /memory | Manage memories | | /plan | Read-only exploration agent | | /deny | Add a deny rule | | /clear | Clear session context |

CLI commands

| Command | What it does | |---|---| | ghostcode | Interactive chat REPL | | ghostcode ask <question> | One-shot question, tool-approved writes | | ghostcode api <list\|connect\|disconnect> | Manage provider API keys | | ghostcode providers | List available providers | | ghostcode model [provider] [model] | Set or list default model | | ghostcode config | Show current configuration | | ghostcode init [--provider --model] | Analyze codebase and write GHOST.md | | ghostcode memory <list\|save\|search\|delete\|summary> | Manage persistent memories | | ghostcode update --check | Check for updates |

Configuration

Runtime state lives in ~/.config/ghostcode/:

  • config.json — default provider, saved models, API keys (via conf)
  • ghostcode.db — SQLite database for persistent memory

Per-project settings and secrets go in .env (see .env.example).

Architecture

src/
  index.ts          citty CLI — subcommands, env/config boot
  commands/         one file per CLI subcommand
  core/             chat session, prompt building, security, file ops
  ai/               provider registry + per-kind clients (openai-compat/anthropic/ollama)
  tools/            tool definitions + executor (security-gated)
  storage/          config (conf) + SQLite adapter (bun:sqlite / better-sqlite3)
  utils/            logger (consola), env loader, markdown renderer, platform
  agents/           subagent definitions
  • UIconsola for logging, @clack/prompts for interactive input
  • Buildtsup (ESM for Node) and bun build --compile (single binary)
  • Distribution — npm + Homebrew + Scoop manifests in distrib/

Development

bun install
bun run dev          # run from source
bun run typecheck    # tsc --noEmit
bun run build        # tsup → dist/index.js
bun run build:all    # tsup + bun build --compile

License

Apache-2.0