{"id":35059283,"url":"https://github.com/s4wave/ocpipe","last_synced_at":"2026-02-19T06:13:04.014Z","repository":{"id":330671444,"uuid":"1123538548","full_name":"s4wave/ocpipe","owner":"s4wave","description":"structured prompts ft. Zod","archived":false,"fork":false,"pushed_at":"2026-02-17T01:44:53.000Z","size":232,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-17T07:51:37.813Z","etag":null,"topics":["bun","claude-code","opencode","typescript","zod"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s4wave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-27T04:51:21.000Z","updated_at":"2026-02-17T01:44:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"12a2662a-30cc-43d4-9883-db9cd0a31eb5","html_url":"https://github.com/s4wave/ocpipe","commit_stats":null,"previous_names":["s4wave/ocpipe","s4wave/dsts"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/s4wave/ocpipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4wave%2Focpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4wave%2Focpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4wave%2Focpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4wave%2Focpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s4wave","download_url":"https://codeload.github.com/s4wave/ocpipe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4wave%2Focpipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","claude-code","opencode","typescript","zod"],"created_at":"2025-12-27T10:11:51.843Z","updated_at":"2026-02-19T06:13:03.985Z","avatar_url":"https://github.com/s4wave.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cstrong\u003eocpipe\u003c/strong\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eBuild LLM pipelines with \u003ca href=\"https://github.com/sst/opencode\"\u003eOpenCode\u003c/a\u003e, \u003ca href=\"https://github.com/anthropics/claude-code\"\u003eClaude Code\u003c/a\u003e, and \u003ca href=\"https://zod.dev\"\u003eZod\u003c/a\u003e.\u003c/p\u003e\n\u003cp align=\"center\"\u003eInspired by \u003ca href=\"https://github.com/stanfordnlp/dspy\"\u003eDSPy\u003c/a\u003e.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/ocpipe\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/ocpipe?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/s4wave/ocpipe/actions\"\u003e\u003cimg alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/s4wave/ocpipe/tests.yml?style=flat-square\u0026branch=master\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n- **Type-safe** Define inputs and outputs with Zod schemas\n- **Modular** Compose modules into complex pipelines\n- **Checkpoints** Resume from any step\n- **Multi-backend** Choose between OpenCode (75+ providers) or Claude Code SDK\n- **Auto-correction** Fixes schema mismatches automatically\n\n### Quick Start\n\n```bash\nbun add ocpipe\n```\n\n```typescript\nimport { signature, field, module, Pipeline, createBaseState } from 'ocpipe'\n\nconst Greet = signature({\n  doc: 'Generate a friendly greeting for the given name.',\n  inputs: { name: field.string('The name of the person to greet') },\n  outputs: { greeting: field.string('A friendly greeting message') },\n})\n\nconst pipeline = new Pipeline(\n  {\n    name: 'hello-world',\n    defaultModel: { providerID: 'opencode', modelID: 'minimax-m2.1-free' },\n    defaultAgent: 'default',\n  },\n  createBaseState,\n)\n\nconst result = await pipeline.run(module(Greet), { name: 'World' })\nconsole.log(result.data.greeting)\n\n// Extract types from signatures\nimport { InferInputs, InferOutputs } from 'ocpipe'\ntype GreetIn = InferInputs\u003ctypeof Greet\u003e // { name: string }\ntype GreetOut = InferOutputs\u003ctypeof Greet\u003e // { greeting: string }\n```\n\n### Backends\n\nocpipe supports two backends for running LLM agents:\n\n**OpenCode** (default) - Requires `opencode` CLI in your PATH. Supports 75+ providers.\n\n```typescript\nconst pipeline = new Pipeline(\n  {\n    name: 'my-pipeline',\n    defaultModel: {\n      providerID: 'anthropic',\n      modelID: 'claude-sonnet-4-20250514',\n    },\n    defaultAgent: 'default',\n  },\n  createBaseState,\n)\n```\n\n**Claude Code** - Uses `@anthropic-ai/claude-agent-sdk`. Install as a peer dependency.\n\n```typescript\n// modelID: 'opus', 'sonnet', or 'haiku'\ndefaultModel: { backend: 'claude-code', modelID: 'sonnet' },\n// permissionMode: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan'\nclaudeCode: { permissionMode: 'acceptEdits' },\n```\n\n### Requirements\n\n**For OpenCode backend:** Currently requires [this OpenCode fork](https://github.com/paralin/opencode). Once the following PRs are merged, the official release will work:\n\n- [#5426](https://github.com/anomalyco/opencode/pull/5426) - Adds session export command\n- [#5339](https://github.com/anomalyco/opencode/pull/5339) - Adds `--tools` flag to limit available tools (optional)\n\n**For Claude Code backend:** Install the SDK as a peer dependency:\n\n```bash\nbun add @anthropic-ai/claude-agent-sdk\n```\n\n### Documentation\n\n- [Getting Started](./GETTING_STARTED.md) - Tutorial with examples\n- [Design](./DESIGN.md) - Architecture and concepts\n- [Contributing](./CONTRIBUTING.md) - Development setup\n\n\u003c!-- This code has been tested on animals. They didn't understand it either. --\u003e\n\n---\n\n[Discord](https://discord.gg/opencode) · [OpenCode](https://github.com/sst/opencode)\n\n\u003csub\u003eAn [Aperture Robotics](https://github.com/aperturerobotics) project.\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4wave%2Focpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs4wave%2Focpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4wave%2Focpipe/lists"}