Quickstart
Requirements
Section titled “Requirements”- Bun
>=1.3.0for source development or typed project authoring. - Git.
- At least one configured backend CLI when running live flows: Claude, Codex, OpenCode, or Pi.
Install Orcats
Section titled “Install Orcats”npm i @twelvehart/orcatsnpm i -D typescriptbunx -p @twelvehart/orcats orcats --versiontypescript enables editor feedback and the CLI typecheck preflight. Bun >=1.3.0 must be on PATH because the npm CLI shim runs with Bun.
Write hello.ts
Section titled “Write hello.ts”import { flow, llm, selectBackend } from "@twelvehart/orcats";
await flow()(async () => { const selected = selectBackend({ default: "claude" }); try { const conversation = llm().autonomous(selected.backend, { prompt: "Say hello from an autonomous Orca flow." });
const outcome = await conversation.awaitResult(); if (outcome.type !== "success") { throw new Error(`Backend failed with outcome: ${outcome.type}`); }
console.log(outcome.result.output); } finally { await selected.shutdown?.(); }});Run the flow
Section titled “Run the flow”bunx -p @twelvehart/orcats orcats --backend claude hello.ts--backend sets ORCA_BACKEND. A flow that calls selectBackend() honors it. A flow that calls claude(), codex(), opencode(), or pi() directly pins that backend.