capable-kit
v0.1.0-alpha.10
Published
Readme
Capable
Capable is a TypeScript framework for defining a capability once and exposing it through the surfaces your application needs: typed calls, HTTP, CLI, MCP, AI tools, and more.
Schemas may come from any library that implements both Standard Schema and Standard JSON Schema. This example uses Zod as a provider:
pnpm add capable-kit zodimport { capability, defineApp } from "capable-kit";
import { z } from "zod";
const greet = capability({
id: "greet",
input: z.object({ name: z.string() }),
handler: ({ input }) => ({ message: `Hello, ${input.name}` }),
});
export default defineApp({
name: "Greeting",
capabilities: { greet },
});TypeScript infers the handler's output type. An output schema is optional and
adds runtime output validation plus a portable schema for OpenAPI and tool
surfaces.
Capable is early alpha software. APIs may change without compatibility layers.
The package provides the cap CLI command. capable remains an alias:
cap devDeploy
Capable detects supported build environments such as Vercel and emits their native deployment output:
vercelTo create Vercel's Build Output API locally instead:
cap build --preset vercel
vercel deploy --prebuiltFor a deployment protected by Vercel Authentication, link the local project. Capable reuses the Vercel CLI login to resolve that project's Protection Bypass for Automation:
vercel link
cap cli --app https://your-app.vercel.app helloAn explicit environment variable remains available for CI or unlinked projects:
export VERCEL_AUTOMATION_BYPASS_SECRET="..."
cap cli --app https://your-app.vercel.app helloDocumentation
Documentation matching the installed version ships at:
node_modules/capable-kit/docs/Coding agents should start with
node_modules/capable-kit/docs/README.md, then read the relevant guide before
writing Capable code. The package also includes its original TypeScript source
under src/ when a guide does not cover a lower-level API detail.
Changes and upgrades
Read CHANGELOG.md for versioned features, fixes, and breaking changes. When upgrading, use the target version’s changelog and apply all entries after your installed version through your target version, oldest first.
Package contents
The published package includes compiled ESM in dist/, declaration files, the
original TypeScript authoring source in src/, and the complete documentation
in docs/. User-facing guides are under docs/site/; framework design notes
and invariants are under docs/internal/.
