Soubi

Commands

Define user-invoked workflows that compile to each harness's native command surface.

A command is a user-invoked prompt or workflow. Soubi maps it to the target's native slash command, prompt file, workflow, or closest documented fallback.

Define a command

Add a TypeScript or JavaScript module under commands/:

commands/commit.ts
import { defineCommand } from "soubi";

export default defineCommand({
  description: "Draft a Conventional Commit for the staged diff.",
  argumentHint: "[--amend]",
  allowedTools: ["Bash", "Read"],
  instructions:
    "Inspect `git diff --cached` and draft a concise commit message.",
});

The filename supplies the command name. commands/commit.ts becomes commit.

Command modules may use .ts, .tsx, .mts, .js, or .mjs. Markdown command files are not scanned.

Command fields

FieldPurpose
nameOverride the filename-derived name
descriptionExplain when the command should be used
argumentHintShow the expected user arguments
allowedToolsRequest a command-specific tool allowlist
instructionsInline text or a file() reference
frontmatterAdditional native metadata
assetsFiles packaged beside compatible command formats
onUnsupportedOverride the fallback policy
harnessPer-target native options

Add a target-specific option

Use harness for a native setting that has no portable equivalent:

commands/commit.ts
export default defineCommand({
  description: "Draft a Conventional Commit.",
  instructions: "Inspect the staged diff and draft the message.",
  harness: {
    claude: { model: "haiku" },
  },
});

The portable definition stays shared; only the named adapter receives the override.

Inspect command translations

Command surfaces differ substantially across harnesses. Check Compatibility for the broad matrix and the target's Adapter page for its emitted path.

On this page