Files
wehub-resource-sync e30e75b5d4
Code Quality / Oxlint + Oxfmt (push) Waiting to run
Code Quality / Template Sync (push) Waiting to run
Code Quality / Build Changed Packages (push) Waiting to run
Code Quality / Test Changed Packages (push) Waiting to run
Deploy Expo Example / Deploy Production (push) Waiting to run
Deploy Ink Example / Deploy Production (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.12) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Waiting to run
Deploy Shadcn Registry / Deploy Production (push) Waiting to run
Template Metrics / LOC + Bundle Size (push) Waiting to run
Changesets / Create Version PR (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:40:13 +08:00
..

@assistant-ui/agent-launcher

Spawn the Claude Code CLI with a chosen plugin directory, skill, and prompt.

Used internally by the assistant-ui CLI's agent command. Call it directly when wiring up your own integration that bundles Claude Code plugins or skills.

Installation

npm install @assistant-ui/agent-launcher

The claude CLI must be available on PATH. If it is missing, launch prints an install hint and exits with code 1.

Usage

import { launch } from "@assistant-ui/agent-launcher";

launch({
  pluginDir: "/absolute/path/to/plugins", // forwarded as --plugin-dir
  skillName: "assistant-ui",              // optional; sends /<skill> <prompt>
  prompt: "Add a thread component to this project.",
  dry: false,                              // print command without spawning
});

The child process inherits stdio, so output streams directly to the parent terminal. launch exits the parent with the child's status code on non-zero exit.