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

vibe-executor

v1.0.1

Published

Node.js bindings for vibe-kanban executors

Readme

Vibe Kanban Executors - Node.js Native Extension

This package provides Node.js bindings for the Vibe Kanban executors, allowing you to run AI coding agents (Claude Code, Amp, Gemini, etc.) directly from Node.js applications.

The Rust core logic is reused from the main vibe-kanban repository (crates/executors), and this package only adds a thin N-API layer on top.

Installation

Install from npm:

npm install vibe-executor
# or
pnpm add vibe-executor

For local development in this repo:

cd crates/executors
npm install

Building

To build the native extension in this repo:

cd crates/executors
npm run build

or with pnpm:

cd crates/executors
pnpm install
pnpm run build

This will compile the Rust code (vibe-executor-napi crate), link it against the shared executors crate from ref/vibe-kanban-main, and generate:

  • the platform-specific .node binary
  • the index.js loader
  • the TypeScript declarations index.d.ts

Runtime API

The N-API surface is intentionally small:

  • JsExecutor.fromConfig(configJson: string): JsExecutor
    • Creates a new executor instance from a JSON configuration string.
  • JsExecutor.spawn(cwd: string, prompt: string, env?: Record<string, string>): Promise<JsChild>
    • Spawns the underlying coding agent process.
  • JsChild.streamOutput(callback: (data: string) => void): void
    • Registers a callback to receive stdout data (newline-delimited JSON).
  • JsChild.wait(): Promise<number>
    • Waits for the process to exit and returns the exit code.
  • JsChild.kill(): Promise<void>
    • Sends a kill signal to the process.

The JSON lines you receive from streamOutput are the same structured events used inside Vibe Kanban (system events, stream events, tool calls, final result, etc.).

Configuration format

fromConfig expects a JSON string describing which executor to use and how it should behave. The structure matches the Rust CodingAgent / BaseCodingAgent types from the main repo.

At the top level, the object is keyed by executor name:

  • CLAUDE_CODE
  • AMP
  • GEMINI
  • (and others available in the Rust BaseCodingAgent enum)

Each key maps to an object with executor-specific options.

Claude Code example

const config = JSON.stringify({
  CLAUDE_CODE: {
    dangerously_skip_permissions: true,
    plan: false,
    approvals: false,
    model: "claude-sonnet-4-5-20250929"
  }
});

Amp example

const config = JSON.stringify({
  AMP: {
    dangerously_allow_all: true
  }
});

Gemini example

const config = JSON.stringify({
  GEMINI: {
    model: "gemini-2.0-flash",
    yolo: true
  }
});

You can also override the base command, parameters, and environment via the shared cmd field (mapped to CmdOverrides in Rust):

const config = JSON.stringify({
  CLAUDE_CODE: {
    dangerously_skip_permissions: true,
    cmd: {
      base_command_override: "npx -y @anthropic-ai/claude-code@latest",
      additional_params: ["--verbose"],
      env: {
        CLAUDE_API_KEY: process.env.CLAUDE_API_KEY || ""
      }
    }
  }
});

Basic usage (ESM)

Single executor (Claude Code)

import vibeExecutor from "vibe-executor";

const { JsExecutor } = vibeExecutor;

async function main() {
  const config = JSON.stringify({
    CLAUDE_CODE: {
      dangerously_skip_permissions: true
    }
  });

  const executor = JsExecutor.fromConfig(config);

  const child = await executor.spawn(
    process.cwd(),
    "Please say hello",
    {}
  );

  child.streamOutput((line) => {
    process.stdout.write(`[Out]: ${line}`);
  });

  const exitCode = await child.wait();
  console.log(`\nExecutor finished with code: ${exitCode}`);
}

main().catch((err) => {
  console.error("Executor error:", err);
  process.exitCode = 1;
});

Executor-specific examples

There are several ready-to-run examples under examples/:

  • examples/simple_usage.js – minimal CLAUDE_CODE example.
  • examples/claude_code_plan.js – Claude Code with planning mode.
  • examples/amp_basic.js – Amp executor with streaming logs.
  • examples/gemini_basic.js – Gemini executor using the ACP harness.

You can run them from this directory:

node examples/simple_usage.js
node examples/claude_code_plan.js
node examples/amp_basic.js
node examples/gemini_basic.js

Make sure the corresponding CLI tools and API keys (Claude, Amp, Gemini) are installed and configured in your environment, as required by each executor.

Apple Silicon Mac (M1/M2/M3)

If you are developing or running this on an Apple Silicon Mac, you should ensure you are targeting aarch64-apple-darwin.

  1. Install the Rust target:

    rustup target add aarch64-apple-darwin
  2. Verify your Node.js architecture:

    node -p "process.arch"
    # Should output 'arm64'

    If it outputs x64, you are running under Rosetta. Prefer a native arm64 Node.js to match the Rust target.

  3. Build for the explicit target if needed:

    npm run build -- --target aarch64-apple-darwin

Development

  • npm run build:debug – Build in debug mode (faster compilation).
  • npm test – Run the simple example script (examples/simple_usage.js).

License and attribution

This npm package (vibe-executor) and its Node.js bindings are provided under the Apache License, Version 2.0. See the LICENSE file at the repository root for the full text.

The underlying executors implementation is reused from the Vibe Kanban project:

  • Vibe Kanban – https://github.com/BloopAI/vibe-kanban

Those components are licensed under the Apache License, Version 2.0. Additional attribution details are included in the NOTICE file at the repository root.