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

@xw-ai/xwclaw

v0.1.6

Published

xwClaw native OpenClaw plugin scaffold

Readme

xwclaw

xwclaw is an OpenClaw plugin that bridges OpenClaw and the Python-side business service.

Install

openclaw plugins install @xw-ai/xwclaw@latest

For local development, you can also load the plugin from a local path.

What It Does

The plugin is responsible for:

  • reading local plugin config
  • forwarding legacy debug chat requests to Python
  • calling the Python bind API
  • dispatching inbound business messages into OpenClaw
  • forwarding OpenClaw callback results back to Python

Business orchestration still stays on the Python side.

Config

The plugin reads config from local config.json.

  • baseUrl: Python service base URL
  • token: plugin 调用 Python 接口时使用的令牌;绑定成功后会自动写入本地配置
  • instanceId: internal OpenClaw node instance id
  • pluginLobsterCallbackPath: callback route exposed by the plugin on the OpenClaw side
  • pythonLobsterCallbackPath: callback route on the Python side
  • timeout: HTTP timeout in milliseconds
  • headers: extra request headers

If internalBaseUrl, externalBaseUrl, and routeMode are configured, the plugin picks the effective baseUrl according to the routing mode.

Config Priority

Current priority is:

  1. environment variables
  2. pluginConfig injected by OpenClaw
  3. local config.json

Supported environment variables include:

  • XW_CLAW_BASE_URL
  • XW_CLAW_ACCESS_TOKEN
  • XW_CLAW_INSTANCE_ID
  • XW_CLAW_INTERNAL_BASE_URL
  • XW_CLAW_EXTERNAL_BASE_URL
  • XW_CLAW_ROUTE_MODE

CLI Usage

Recommended setup flow:

openclaw xwclaw --base-url http://127.0.0.1:8080 --token <binding-token>
openclaw xwclaw show

You can also keep using the explicit bind command:

openclaw xwclaw bind --token <binding-token>

The root command supports direct config write too:

openclaw xwclaw --base-url http://127.0.0.1:8080
openclaw xwclaw --token demo-token
openclaw xwclaw --base-url http://127.0.0.1:8080 --token demo-token

Compatibility flags are also supported:

openclaw xwclaw config --base-url http://127.0.0.1:8080 --token demo-token
openclaw xwclaw --baseUrl http://127.0.0.1:8080 --accessToken demo-token

instanceId is treated as an internal field and is not exposed as a customer-facing CLI option.

Chat Command Compatibility

For development compatibility, the plugin still keeps chat-side commands:

  • /xwclaw <message>: call the legacy Python debug chat API
  • /xwclawconfig <baseUrl> <token> [instanceId]: write local dev config
  • /xwclawbind <token>: call the bind API

For terminal-based setup, prefer openclaw xwclaw ....

Message Flow

  1. PC calls Python /api/xw-claw/sendMsg
  2. Python calls OpenClaw xwclaw.chat
  3. xwclaw dispatches the message into the OpenClaw session flow
  4. The result is forwarded back to Python through POST {baseUrl}{pythonLobsterCallbackPath}
  5. Python continues business handling based on taskId

Example Config

{
  "baseUrl": "http://127.0.0.1:8080",
  "token": "demo-token",
  "pluginLobsterCallbackPath": "/plugins/xwclaw/callback/lobster-message",
  "pythonLobsterCallbackPath": "/api/xw-claw/callback/lobster-message",
  "instanceId": "openclaw-local-001",
  "timeout": 10000,
  "headers": {
    "x-openclaw-source": "local-debug"
  }
}

HTTP Endpoints

Legacy debug chat endpoint:

POST {baseUrl}/api/chat

Bind endpoint:

POST {baseUrl}/api/openclaw/plugin/bind

Callback endpoint forwarded to Python:

POST {baseUrl}{pythonLobsterCallbackPath}

Example Legacy Chat Payload

{
  "taskId": "task-id",
  "requestId": "request-id",
  "message": "hello",
  "sessionId": "session-id",
  "userId": "user-id",
  "instanceId": "openclaw-instance-id",
  "accessToken": "access-token",
  "metadata": {}
}

Example Callback Payload

{
  "taskId": "task-id",
  "lobsterAccount": "test0001",
  "reply": "processed result",
  "messageContent": "processed result"
}