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

@shakespeare.diy/opencode-plugin

v0.5.23

Published

OpenCode plugin for Shakespeare AI provider with NIP-98 auth, NIP-46 remote signing, Shakespeare Deploy, and Nostr Git

Readme

@shakespeare.diy/opencode-plugin

OpenCode plugin for Shakespeare AI provider with NIP-46 remote signing and Nostr development tools.

Features

  • Shakespeare AI Provider: Use Claude and other models via Shakespeare AI with NIP-98 authentication
  • NIP-46 Remote Signing: Authenticate via QR code scan - your private key never leaves your signer app
  • Shakespeare Deploy: Deploy static sites to shakespeare.wtf
  • Nostr Git (ngit): Publish repositories to decentralized git hosting using NIP-34
  • mkstack Integration: Initialize new Nostr projects using the mkstack framework
  • Shakespeare Agent: Specialized AI agent for building Nostr applications

Installation

Option A: Global Installation (Recommended)

Install once and use in all projects:

mkdir -p ~/.config/opencode
cat > ~/.config/opencode/opencode.json << 'EOF'
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@shakespeare.diy/opencode-plugin"]
}
EOF

Then restart OpenCode - it will auto-install the plugin.

Option B: Per-Project Installation

Add to your project's opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@shakespeare.diy/opencode-plugin"]
}

The plugin will automatically configure the Shakespeare AI provider and models on first run.

(Optional) Install the Shakespeare agent

The Shakespeare agent provides natural language commands for Nostr development:

mkdir -p ~/.config/opencode/agent
cp node_modules/@shakespeare.diy/opencode-plugin/agent/shakespeare.md ~/.config/opencode/agent/

(Optional) Add the Nostr MCP server

For enhanced Nostr functionality:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@shakespeare.diy/opencode-plugin"],
  "mcp": {
    "nostr": {
      "type": "local",
      "command": ["npx", "-y", "@nostrbook/mcp@latest"]
    }
  }
}

Authentication

Shakespeare AI uses NIP-46 remote signing for authentication. This means:

  • Your private key (nsec) never leaves your signer app
  • You authenticate by scanning a QR code
  • Authentication persists across sessions

Connect to Shakespeare AI

  1. Start OpenCode in your project
  2. Run shakespeare_connect - a QR code will be displayed
  3. Scan the QR code with your signer app (Amber or Primal)
  4. Approve the connection in your signer app
  5. Run shakespeare_complete to finish the connection
> shakespeare_connect

[QR Code displayed]

Scan with Amber (Android) or Primal (iOS/Android)

> shakespeare_complete

Connected successfully!
User pubkey: npub1...

Check connection status

> shakespeare_status

Connected: Yes
Public Key: npub1...
Relays: wss://relay.nsec.app

Select Shakespeare AI model

After connecting, select a Shakespeare model via /models or /connect:

  1. Press /connect and search for "Shakespeare"
  2. Select "Nostr (NIP-46)" authentication
  3. Choose a model (e.g., claude-sonnet-4.5)

Or set it in your opencode.json:

{
  "plugin": ["@shakespeare.diy/opencode-plugin"],
  "model": "shakespeare/claude-sonnet-4.5"
}

Available Models

The plugin automatically fetches available models from Shakespeare AI. Current models include:

  • claude-sonnet-4.5 - Fast, capable model for most tasks
  • claude-opus-4.5 - Most capable model for complex tasks

Available Tools

| Tool | Description | |------|-------------| | shakespeare_connect | Display QR code to initiate NIP-46 connection | | shakespeare_complete | Complete the connection after scanning QR code | | shakespeare_status | Check authentication status | | shakespeare_disconnect | Disconnect and clear credentials | | shakespeare_sign_event | Sign a Nostr event using remote signer | | shakespeare_get_pubkey | Get connected user's public key | | shakespeare_init | Initialize a new mkstack project | | shakespeare_deploy | Deploy dist/ to shakespeare.wtf | | shakespeare_ngit | Publish repository to Nostr Git (NIP-34) |

Usage Examples

Using Shakespeare AI for coding

Once connected, Shakespeare AI works like any other provider:

> Help me build a REST API endpoint

[Claude responds via Shakespeare AI with NIP-98 authentication]

Deploy a site

> shakespeare_deploy

Building site from dist/...
Deploying to shakespeare.wtf...

Your site is live at: https://yourapp.shakespeare.wtf

Publish to Nostr Git

> shakespeare_ngit

Publishing repository to Nostr Git...

Published!
Repository: my-project
Clone with: git clone nostr://npub1.../my-project

Initialize a new project

> shakespeare_init my-nostr-app

Cloning mkstack template...
Installing dependencies...

Project created at ./my-nostr-app

Configuration

Default Relays

The plugin uses this relay for NIP-46 communication:

  • wss://relay.nsec.app

Specify custom relays when connecting:

> shakespeare_connect with relays wss://my-relay.com,wss://other-relay.com

Authentication Storage

Credentials are stored in ~/.config/shakespeare/auth.json:

  • Client keypair (for relay communication only)
  • Bunker public key
  • User public key
  • Connected relays

Your private key is never stored - it remains in your signer app.

Supported Signer Apps

Troubleshooting

"Not connected to Nostr" error

Run shakespeare_connect followed by shakespeare_complete to establish a connection.

Models not appearing

The plugin auto-configures on first run. If models don't appear:

  1. Restart OpenCode
  2. Check that opencode.json has the provider.shakespeare section
  3. Run /connect and select Shakespeare AI

Connection not persisting

Check that ~/.config/shakespeare/auth.json exists after connecting. If it's being deleted, there may be a permission issue with the config directory.

QR code not scanning

  • Ensure your signer app supports NIP-46 (nostrconnect://)
  • Try different relays if the default ones are unreachable
  • Check that your phone and computer are on the same network (not required, but helps)

Development

# Clone the repo
git clone https://gitlab.com/soapbox-pub/shakespeare-opencode-plugin
cd shakespeare-opencode-plugin

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

License

MIT