{"id":46627267,"url":"https://github.com/offscale/cdd-ts","last_synced_at":"2026-06-09T02:03:38.286Z","repository":{"id":319958494,"uuid":"1079561738","full_name":"offscale/cdd-ts","owner":"offscale","description":"OpenAPI ↔ TypeScript","archived":false,"fork":false,"pushed_at":"2026-06-07T06:54:24.000Z","size":3985,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-07T08:19:02.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/offscale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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-10-20T02:55:34.000Z","updated_at":"2026-06-07T06:54:18.000Z","dependencies_parsed_at":"2025-10-21T06:36:08.840Z","dependency_job_id":null,"html_url":"https://github.com/offscale/cdd-ts","commit_stats":null,"previous_names":["offscale/cdd-web-ng","offscale/cdd-ts"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/offscale/cdd-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offscale%2Fcdd-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offscale%2Fcdd-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offscale%2Fcdd-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offscale%2Fcdd-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offscale","download_url":"https://codeload.github.com/offscale/cdd-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offscale%2Fcdd-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34088014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-03-07T23:00:26.509Z","updated_at":"2026-06-09T02:03:38.281Z","avatar_url":"https://github.com/offscale.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# cdd-ts\n\n[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![interactive WASM web demo](https://img.shields.io/badge/interactive-WASM_web_demo-blue.svg)](https://offscale.io/wasm_web_demo)\n[![CI](https://github.com/offscale/cdd-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/offscale/cdd-ts/actions)\n\u003c!-- TEST_COVERAGE_START --\u003e\n![TEST_COVERAGE](https://img.shields.io/badge/Test%20Coverage-100%25-brightgreen)\n\u003c!-- TEST_COVERAGE_END --\u003e\n\u003c!-- DOC_COVERAGE_START --\u003e\n![DOC_COVERAGE](https://img.shields.io/badge/Doc%20Coverage-100%25-brightgreen)\n\u003c!-- DOC_COVERAGE_END --\u003e\n\n---\n\nOpenAPI ↔ TypeScript. This is one compiler in a suite, supporting clients and frontends (Angular; React; Vue; vanilla JS; Node.js; Fetch; Axios); backends (Express and TypeORM), all focussed on the same task: Compiler Driven Development (CDD).\n\nEach compiler is written in its target language, is whitespace and comment sensitive, and has both an SDK and CLI.\n\nThe core philosophy of Compiler Driven Development (CDD) is synchronization without compromise. Where traditional generators silo your API boundaries into read-only files, this compiler natively merges changes into your codebase via a robust, [whitespace and comment aware] Abstract Syntax Tree (AST) driven parser \u0026 emitter. It bridges the gap between design and implementation, allowing you to seamlessly generate SDKs from a spec or extract a spec from existing code. By keeping your APIs, SDKs, and tests in continuous, automated alignment, it drastically improves both delivery speed and software reliability.\n\nThe CLI—at a minimum—has:\n\n- `cdd-ts --help`\n- `cdd-ts --version`\n- `cdd-ts from_openapi to_sdk_cli --mcp -i spec.json`\n- `cdd-ts from_openapi to_sdk -i spec.json`\n- `cdd-ts from_openapi to_server -i spec.json`\n- `cdd-ts to_openapi -f path/to/code`\n- `cdd-ts to_docs_json --no-imports --no-wrapping -i spec.json`\n- `cdd-ts serve_json_rpc --port 8080 --listen 0.0.0.0`\n- `cdd-ts mcp`\n\n## SDK Example\n\n```ts\nimport { generateFromConfig } from 'cdd-ts/index';\n\nasync function generate() {\n    const config = {\n        input: './openapi.yaml',\n        output: './src/api',\n        options: {\n            framework: 'fetch',\n            implementation: 'fetch',\n        },\n    };\n    await generateFromConfig(config);\n}\ngenerate();\n```\n\n## Installation\n\n```bash\nnpm install\n```\n\n## Development\n\nYou can use standard tooling commands or the included cross-platform Makefiles to fetch dependencies, build, and test:\n\n```bash\nnpm install\nnpm run build\nnpm test\n# or\nmake deps\nmake build\nmake test\n# or on Windows\n.\\make.bat deps\n.\\make.bat build\n.\\make.bat test\n```\n\nSee [PUBLISH.md](PUBLISH.md) for packaging and releasing.\n\n## Features\n\nThe `cdd-ts` compiler leverages a unified architecture to support various facets of API and code lifecycle management. For a deep dive into the compiler's design, see [ARCHITECTURE.md](ARCHITECTURE.md).\n\n- **Compilation**:\n    - **OpenAPI → `TypeScript`**: Generate idiomatic native models, network routes, client SDKs, and boilerplate directly from OpenAPI (`.json` / `.yaml`) specifications.\n    - **`TypeScript` → OpenAPI**: Statically parse existing `TypeScript` source code and emit compliant OpenAPI specifications.\n- **AST-Driven \u0026 Safe**: Employs static analysis instead of unsafe dynamic execution or reflection, allowing it to safely parse and emit code even for incomplete or un-compilable project states.\n- **Seamless Sync**: Keep your docs, tests, database, clients, and routing in perfect harmony. Update your code, and generate the docs; or update the docs, and generate the code.\n- **Model Context Protocol (MCP)**: Native integration exposes CLI capabilities seamlessly as AI agent tools via MCP over stdio.\n\n**Uncommon Features:**\n\n`cdd-ts` supports extensive auto-generation features beyond the standard suite:\n\n- **Auto-Admin UI:** Generates fully functional, component-based administration dashboards (Angular or Vanilla Web Components) mapped directly from the OpenAPI schema using the `--admin` flag.\n\n---\n\n## CLI Options\n\n```\nOptions:\n  -V, --version             output the version number\n  -h, --help                display help for command\n\nCommands:\n  from_openapi              Generate code from OpenAPI\n  to_openapi [options]      Generate an OpenAPI specification from TypeScript\n  to_docs_json [options]    Generate JSON containing how to call operations in\n                            the target language\n  serve_json_rpc [options]  Expose CLI interface as JSON-RPC server\n  mcp                       Start Model Context Protocol (MCP) server over stdio\n  help [command]            display help for command\n```\n\n### `from_openapi`\n\n```sh\n$ dist/cli.js from_openapi --help\nUsage: cdd-ts from_openapi [options] [command]\n\nGenerate code from OpenAPI\n\nOptions:\n  -h, --help            display help for command\n\nCommands:\n  to_sdk_cli [options]  Generate Client SDK CLI from an OpenAPI specification\n  to_sdk [options]      Generate Client SDK from an OpenAPI specification\n  to_server [options]   Generate Server from an OpenAPI specification\n  help [command]        display help for command\n```\n\n### `to_openapi`\n\n```sh\n$ dist/cli.js to_openapi --help\nUsage: cdd-ts to_openapi [options]\n\n\nOptions:\n  -i, --input \u003cpath\u003e   Path to a snapshot file or a generated output directory\n                       (env: CDD_INPUT)\n  -o, --output \u003cpath\u003e  Output file (env: CDD_OUTPUT)\n  --format \u003cformat\u003e    Output format for the OpenAPI spec (choices: \"json\",\n                       \"yaml\", default: \"yaml\", env: CDD_FORMAT)\n  -h, --help           display help for command\n```\n\n### `to_docs_json`\n\n```sh\n$ dist/cli.js to_docs_json --help\nUsage: cdd-ts to_docs_json [options]\n\nGenerate JSON containing how to call operations in the target language\n\nOptions:\n  -i, --input \u003cpath\u003e   Path or URL to the OpenAPI spec (env: CDD_INPUT)\n  -o, --output \u003cpath\u003e  Path to write the JSON to (env: CDD_OUTPUT)\n  --no-imports         Do not include import statements in the generated code\n                       (env: CDD_NO_IMPORTS)\n  --no-wrapping        Do not wrap the generated code in a function or block\n                       (env: CDD_NO_WRAPPING)\n  -h, --help           display help for command\n```\n\n---\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffscale%2Fcdd-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffscale%2Fcdd-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffscale%2Fcdd-ts/lists"}