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

carapace-plugin-sdk

v1.0.3

Published

🦞🐚 SDK for building OpenClaw plugins β€” types, helpers, CLI generation

Downloads

668

Readme

🦞🐚 carapace-plugin-sdk

CI npm

SDK for building OpenClaw plugins.

Define your tools and config. The SDK generates a fully typed OpenClaw plugin, a standalone CLI, and a plugin manifest β€” automatically.

Install

npm install carapace-plugin-sdk

Quick start

New plugin? Use carapace-plugin-template β€” it scaffolds the full project structure, CI, and tests in one click.

Here's what you write in src/plugin.ts:

import { definePlugin } from "carapace-plugin-sdk";
import { Type } from "@sinclair/typebox";

// The export must be named `createEntry` β€” the SDK's build tools look for it by name.
export const createEntry = definePlugin({
  id: "my-plugin",
  name: "My Plugin",
  description: "Does something useful.",

  configSchema: Type.Object({
    apiKey: Type.Optional(Type.String({ description: "API key for the service." })),
  }),

  tools: (tool) => [
    tool({
      name: "do_thing",
      description: "Does the thing.",
      parameters: Type.Object({
        input: Type.String({ description: "Input value." }),
      }),
      execute: async ({ input }, config) => {
        // input: string βœ“   config.apiKey: string | undefined βœ“
        return { result: input, usingKey: !!config.apiKey };
      },
    }),
  ],
});

Run npm run build and you get:

| Generated file | What it is | |----------------|-----------| | dist/adapter.js | OpenClaw plugin adapter | | dist/bin/my-plugin.js | Standalone CLI β€” each tool is a subcommand | | openclaw.plugin.json | Plugin manifest read by OpenClaw at install time |

Nothing else to write. No registration boilerplate, no result wrapping, no manifest to maintain.

What the SDK handles for you

| You write | SDK handles | |-----------|-------------| | execute() returning a plain object | Wrapping in the OpenClaw result format | | configSchema TypeBox schema | JSON Schema for the manifest + OpenClaw settings UI (defaults to an empty object schema if omitted) | | Tool names | contracts.tools list in the manifest β€” auto-discovered even for raw register() plugins | | src/plugin.ts | dist/adapter.js, dist/bin/*.js, openclaw.plugin.json |

Build setup

Add to package.json:

{
  "bin": { "my-plugin": "./dist/bin/my-plugin.js" },
  "scripts": {
    "build": "tsup && carapace-generate-cli --entry ./dist/plugin.js --out ./dist/bin"
  }
}

The SDK ships shared configs so your project files stay minimal:

tsconfig.json β€” one line:

{ "extends": "carapace-plugin-sdk/tsconfig.base.json" }

tsup.config.ts β€” three lines:

import { defineConfig } from "tsup";
import { definePluginConfig } from "carapace-plugin-sdk/tsup";

export default defineConfig(definePluginConfig());

vitest.config.ts β€” not needed. Vitest finds tests/**/*.test.ts without configuration.

CLI β€” for free

Every plugin is automatically a standalone CLI. After npm run build:

my-plugin --help
my-plugin do-thing "hello"
my-plugin do-thing "hello" --json
MY_PLUGIN_API_KEY=sk-... my-plugin do-thing "hello"

Config fields map to environment variables: <PLUGIN_ID_SCREAMING_SNAKE>_<FIELD_SCREAMING_SNAKE>

Reusable CI/CD workflows

Call the shared GitHub Actions workflows from your plugin repo β€” no workflow logic to copy:

# .github/workflows/ci.yml
jobs:
  ci:
    uses: JeffSteinbok/carapace-plugin-sdk/.github/workflows/plugin-ci.yml@main
# .github/workflows/release.yml
on:
  workflow_dispatch:
    inputs:
      version-bump:
        type: choice
        options: [patch, minor, major]
      prerelease:
        type: choice
        options: ['', alpha, beta, rc]
jobs:
  release:
    uses: JeffSteinbok/carapace-plugin-sdk/.github/workflows/plugin-release.yml@main
    with:
      version-bump: ${{ inputs.version-bump }}
      prerelease: ${{ inputs.prerelease }}
    secrets:
      npm-token: ${{ secrets.NPM_TOKEN }}

Examples

Internals

See ARCHITECTURE.md for how the SDK works under the hood β€” the type machinery behind definePlugin, how carapace-generate-cli generates artifacts, the CLI runtime, and the adapter pattern.

License

MIT