{"id":37229429,"url":"https://github.com/rawtoast/zenko","last_synced_at":"2026-02-20T17:01:14.580Z","repository":{"id":318724638,"uuid":"1038324789","full_name":"RawToast/zenko","owner":"RawToast","description":"Bun-first TypeScript generator for OpenAPI schemas using Zod for type-safe helper functions ","archived":false,"fork":false,"pushed_at":"2026-02-18T07:44:53.000Z","size":606,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-18T12:40:07.196Z","etag":null,"topics":["bun","client-generator","openapi","typescript","zod"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/zenko","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/RawToast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-08-15T01:55:43.000Z","updated_at":"2026-02-18T07:25:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"eddd03eb-1806-4924-a54b-794f497280d0","html_url":"https://github.com/RawToast/zenko","commit_stats":null,"previous_names":["rawtoast/zenko"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/RawToast/zenko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawToast%2Fzenko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawToast%2Fzenko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawToast%2Fzenko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawToast%2Fzenko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RawToast","download_url":"https://codeload.github.com/RawToast/zenko/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawToast%2Fzenko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29658167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"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","client-generator","openapi","typescript","zod"],"created_at":"2026-01-15T03:32:43.147Z","updated_at":"2026-02-20T17:01:14.459Z","avatar_url":"https://github.com/RawToast.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zenko\n\n[![CI](https://github.com/RawToast/zenko/actions/workflows/ci.yml/badge.svg)](https://github.com/RawToast/zenko/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/RawToast/zenko/graph/badge.svg?token=8EP854JIBD)](https://codecov.io/gh/RawToast/zenko)\n\nBun-first TypeScript generator for OpenAPI specifications that creates **Zod schemas**, **type-safe path functions**, and **operation objects**.\n\nUnlike most OpenAPI generators, Zenko does not create a client. Instead you are free to use your own fetch/undici wrapper or library of choice.\n\n## Quick Start\n\n```bash\n# One-time usage (no installation required)\nbunx zenko input.yaml output.ts\n```\n\n```bash\n# Or install globally\nbun install -g zenko\nzenko input.yaml output.ts\n```\n\n```bash\n# Or as a script in your package.json\nbun add -d zenko\n\n# Then in your package.json, note the `-b` flag to run the command with Bun and not Node.\n\"scripts\": {\n  \"generate\": \"bun -b zenko --config resources/zenko.config.json\"\n}\n```\n\n## Features\n\n- 🔧 **Zod Schema Generation** - Runtime-validated schemas from OpenAPI\n- 🛣️ **Type-safe Path Functions** - Build API paths with proper TypeScript types\n- 📋 **Operation Objects** - Path functions, request validation, and response types\n- 🧰 **Operation Type Helpers** - Reusable type definitions for building generic clients\n- 🔄 **Dependency Resolution** - Automatic topological sorting eliminates \"used before declaration\" errors\n- 🔓 **Open Enums** - Accept unknown enum values gracefully with configurable prefixes\n- ⚡ **CLI \u0026 Programmatic API** - Use via command line or import as a library\n\n## Basic Usage\n\n### Command Line\n\n```bash\n# Generate from OpenAPI spec\nzenko petstore.yaml api-types.ts\n\n# Enable strict validation\nzenko api.yaml types.ts --strict-dates --strict-numeric\n\n# Use config file for multiple specs\nzenko --config zenko.config.json\n```\n\n### Config File\n\n```json\n{\n  \"$schema\": \"https://raw.githubusercontent.com/RawToast/zenko/refs/heads/master/packages/zenko/zenko-config.schema.json\",\n  \"schemas\": [\n    {\n      \"input\": \"api.yaml\",\n      \"output\": \"api.gen.ts\"\n    }\n  ]\n}\n```\n\n### Using Generated Code\n\n```typescript\nimport { paths, authenticateUser } from \"./api.gen\"\n\n// Type-safe path building\nconst path = paths.getUserById({ userId: \"123\" })\n// → \"/users/123\"\n\n// Request validation with Zod\nconst validation = authenticateUser.request(requestData)\nif (validation.success) {\n  const response = await fetch(baseUrl + authenticateUser.path(), {\n    method: \"POST\",\n    body: JSON.stringify(validation.data),\n  })\n}\n```\n\n## Documentation\n\n- **[Full Documentation](packages/zenko/README.md)** - Complete API reference, configuration options, and advanced usage\n- **[Installation](packages/zenko/README.md#installation)** - Installation and setup guide\n- **[Config File](packages/zenko/README.md#config-file)** - Configuration options and examples\n- **[Open Enums](packages/zenko/README.md#open-enums)** - Handle unknown enum values gracefully\n- **[Generated Output](packages/zenko/README.md#generated-output)** - Understanding the generated code\n- **[Building a Generic Client](packages/zenko/README.md#building-a-generic-client)** - Creating reusable HTTP clients\n- **[Examples](packages/examples/README.md)** - Example clients using fetch, undici, and ts-effect\n\n## Requirements\n\n- Bun 1.2.22 or higher\n\nAn npm package may be available in the future if there is demand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawtoast%2Fzenko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawtoast%2Fzenko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawtoast%2Fzenko/lists"}