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

@rpalegacy/opencode

v0.1.0

Published

OpenClaw provider for opencode — exposes Claude (claude-local) models via the OpenClaw proxy

Downloads

157

Readme

@rpalegacy/opencode

OpenClaw provider package for opencode.

Exposes Claude (claude-local) models — Claude Opus 4.6, Claude Sonnet 4.6, and Claude Haiku 4 — via the OpenClaw local proxy at localhost:3456.

Requirements

  • OpenClaw running with openclaw-claude-proxy active
  • OPENCLAW_API_KEY environment variable set (get it from your OpenClaw config)
  • Node.js >= 18

Setup

1. Install OpenClaw's Claude proxy

# Install the openclaw-claude-proxy if you haven't already
npm install -g openclaw-claude-proxy
openclaw-claude-proxy

The proxy runs at http://localhost:3456 and handles OAuth with your Claude Pro subscription.

2. Configure opencode

Add to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "openclaw": {
      "npm": "@rpalegacy/opencode",
      "env": ["OPENCLAW_API_KEY"]
    }
  }
}

Or use the /connect command in opencode's TUI and enter:

  • Provider ID: openclaw
  • Base URL: http://localhost:3456/v1
  • API Key: OPENCLAW_API_KEY (or set the env var directly)

3. Use it

# Set your API key
export OPENCLAW_API_KEY="sk-ant-..."

# Run opencode with the OpenClaw provider
opencode --provider openclaw --model claude-opus-4-6

# Or in opencode's TUI
/models   # then select a Claude model

Available Models

| Model | Context | Reasoning | Tool Call | Vision | Cost | |-------|---------|-----------|-----------|--------|------| | Claude Opus 4.6 | 200K | ✅ | ✅ | ✅ | Free* | | Claude Sonnet 4.6 | 200K | ✅ | ✅ | ✅ | Free* | | Claude Haiku 4 | 200K | ✅ | ✅ | ✅ | Free* |

*Free via your Claude Pro subscription through the local proxy.带宽

How it works

@rpalegacy/opencode wraps the @ai-sdk/openai-compatible provider and configures it to point at OpenClaw's local proxy (localhost:3456). The proxy handles:

  • OAuth authentication with your Claude Pro account
  • Model routing (claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4)
  • API compatibility (converts between OpenAI-compatible and Anthropic APIs)

Troubleshooting

"Model not found" errors

  • Make sure openclaw-claude-proxy is running
  • Verify http://localhost:3456 is accessible
  • Check that OPENCLAW_API_KEY is set correctly

Authentication errors

  • The proxy uses OAuth with your Claude Pro account
  • Make sure your Claude Pro subscription is active
  • Try restarting the proxy: pkill -f openclaw-claude-proxy && openclaw-claude-proxy

License

MIT