Skip to content

Quickstart

  • Bun >=1.3.0 for source development or typed project authoring.
  • Git.
  • At least one configured backend CLI when running live flows: Claude, Codex, OpenCode, or Pi.
Terminal window
npm i @twelvehart/orcats
npm i -D typescript
bunx -p @twelvehart/orcats orcats --version

typescript enables editor feedback and the CLI typecheck preflight. Bun >=1.3.0 must be on PATH because the npm CLI shim runs with Bun.

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?.();
}
});
Terminal window
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.