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

cocod

v0.0.16

Published

`cocod` is a Cashu wallet CLI with a local daemon.

Downloads

553

Readme

cocod

cocod is a Cashu wallet CLI with a local daemon.

If you like simple tools: run commands in your terminal, and let the daemon handle wallet state in the background.

What it does

  • Initialize and secure a Cashu wallet
  • Check balances and transaction history
  • Send and receive Cashu tokens
  • Send and receive Lightning payments (BOLT11)
  • Handle HTTP 402 payments with X-Cashu
  • Manage trusted mints

Install

bun install --global cocod

Or from source:

git clone <repository-url>
cd cocod
bun install

Quick start

# Check daemon status
cocod status

# Create a wallet (auto-generates mnemonic)
cocod init

# If encrypted during init, unlock it
cocod unlock "your-passphrase"

# Check balance
cocod balance

Most common commands

# Receive
cocod receive cashu "cashuA..."
cocod receive bolt11 1000

# Send
cocod send cashu 500
cocod send bolt11 "lnbc..."

# Mints
cocod mints add https://mint.example.com/Bitcoin
cocod mints list

# History
cocod history --limit 10
cocod history --watch

# Logs
cocod logs
cocod logs --follow
cocod logs --path

NPC (Lightning Address)

# Your NPC address
cocod npc address

# Check username price, then confirm purchase
cocod npc username myname
cocod npc username myname --confirm

HTTP 402 / X-Cashu

# Inspect request from a 402 response
cocod x-cashu parse "<encoded-x-cashu-request>"

# Settle and get header value for retry
cocod x-cashu handle "<encoded-x-cashu-request>"

How it works

  • CLI: src/cli.ts
  • Daemon: src/daemon.ts
  • Routes: src/routes.ts
  • IPC transport: HTTP over UNIX socket

Defaults:

  • Socket: ~/.cocod/cocod.sock (or COCOD_SOCKET)
  • PID file: ~/.cocod/cocod.pid (or COCOD_PID)
  • Daemon log: ~/.cocod/daemon.log (or COCOD_LOG_FILE)
  • Config: ~/.cocod/config.json
  • Database: ~/.cocod/coco.db

Logging defaults:

  • Structured JSON logs are written to ~/.cocod/daemon.log
  • Rotation keeps 5 files at 5 MiB each by default
  • Override with COCOD_LOG_LEVEL, COCOD_LOG_MAX_BYTES, and COCOD_LOG_MAX_FILES

Development

# Run CLI from source
bun src/index.ts --help

# Run daemon directly
bun run daemon

# Typecheck
bun run lint

# Tests
bun test

# Isolated daemon smoke test
bun run smoke:daemon

Docs

License

MIT