{"id":29090364,"url":"https://github.com/lacocoroco/ymlts","last_synced_at":"2026-04-13T21:32:36.027Z","repository":{"id":42079535,"uuid":"474351683","full_name":"LaCocoRoco/ymlts","owner":"LaCocoRoco","description":"YAML to Typescript Generator","archived":false,"fork":false,"pushed_at":"2022-06-07T06:03:45.000Z","size":729,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T04:47:27.734Z","etag":null,"topics":["generator","typescript","yaml"],"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/LaCocoRoco.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}},"created_at":"2022-03-26T13:11:41.000Z","updated_at":"2023-04-10T21:23:47.000Z","dependencies_parsed_at":"2022-08-12T04:20:25.585Z","dependency_job_id":null,"html_url":"https://github.com/LaCocoRoco/ymlts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LaCocoRoco/ymlts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaCocoRoco%2Fymlts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaCocoRoco%2Fymlts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaCocoRoco%2Fymlts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaCocoRoco%2Fymlts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaCocoRoco","download_url":"https://codeload.github.com/LaCocoRoco/ymlts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaCocoRoco%2Fymlts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951610,"owners_count":23687974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["generator","typescript","yaml"],"created_at":"2025-06-28T05:01:52.647Z","updated_at":"2025-10-07T12:35:43.392Z","avatar_url":"https://github.com/LaCocoRoco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAML to Typescript Generator\n\u003ca href=\"https://www.npmjs.com/package/ymlts\"\u003e\n  \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/ymlts?style=for-the-badge\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/LaCocoRoco/ymlts/blob/master/LICENSE\"\u003e\n  \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/lacocoroco/ymlts.svg?style=for-the-badge\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/LaCocoRoco/ymlts\"\u003e\n  \u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/lacocoroco/ymlts?style=for-the-badge\"\u003e\n\u003c/a\u003e\n\nCommand Line Interface to generate Typescript from YAML File.\nCombines and simplifies [quicktype](https://github.com/quicktype/quicktype) and [js-yaml](https://github.com/nodeca/js-yaml) package.\n\n# General\nTyping file extension for source and target files are optional.\n\n# Install \u0026 Usage Local \n```\nInstall:  npm i -D ymlts\n\nUsage  :  npx ymlts source [target] [flags]\n```\n\n# Install \u0026 Usage Global\n```\nInstall:  npm i -g ymlts\n\nUsage  :  ymlts source [target] [flags]\n```\n\n# Help \n```\n  usage : ymlts source [target] [flags]\n\n  source: source file or folder to .yaml or .yml\n  target: target file or folder to .d.ts or .ts file\n  flags : -t  generate .ts instead of .d.ts\n          -o  make all properties optional\n          -m  merge all files into one\n          -s  silent mode\n          -h  show help message\n```\n\n# CLI - Example File\n```\n  Example Environment\n  cwd:    /source\n  files:  /file.yaml\n```\n```\n  usage:  ymlts file\n\n  source: /source/file.yaml\n  target: /source/file.d.ts\n```\n```\n  usage:  ymlts /usr/file -t\n\n  source: /usr/file.yaml\n  target: /usr/file.ts\n```\n```\n  usage:  ymlts file target\n\n  source: /source/file.yaml\n  target: /source/target.d.ts\n```\n```\n  usage:  ymlts resource/file /usr/target\n\n  source: /source/resource/file.yaml\n  target: /usr/target.d.ts\n```\n\n# CLI - Example Folder\n```\n  Example Environment\n  cwd:    /source\n  files:  /file.yaml\n          /subfolder/file.yaml\n```\n```\n  usage:  ymlts source\n\n  source: /source/file.yaml\n          /source/subfolder/file.yaml         \n  target: /source/file.d.ts\n          /source/subfolder/file.d.ts\n```\n```\n  usage:  ymlts /usr\n\n  source: /usr/file.yaml\n          /usr/subfolder/file.yaml         \n  target: /usr/file.d.ts\n          /usr/subfolder/file.d.ts\n```\n```\n  usage:  ymlts source target -t\n\n  source: /source/file.yaml\n          /source/subfolder/file.yaml         \n  target: /target/file.ts\n          /target/subfolder/file.ts\n```\n```\n  usage:  ymlts source target/file -m\n\n  source: /source/file.yaml\n          /source/subfolder/file.yaml         \n  target: /target/file.d.ts\n```\n# Example - Input \u0026 Output\n```yaml\n// source.yaml\n\ndescription:\n  title: Average Temperature\n  units: Degrees Fahrenheit\ndata:\n  temp:\n    value: 50.00\n    anomaly: 1.00\n```\n```typescript\n// target.ts\n\nexport interface Target {\n    description: Description;\n    data:        Data;\n}\n\nexport interface Data {\n    temp: Temp;\n}\n\nexport interface Temp {\n    value:   number;\n    anomaly: number;\n}\n\nexport interface Description {\n    title:      string;\n    units:      string;\n}\n\n```\n```typescript\n// target.d.ts\n\ninterface Target {\n    description: Description;\n    data:        Data;\n}\n\ninterface Data {\n    temp: Temp;\n}\n\ninterface Temp {\n    value:   number;\n    anomaly: number;\n}\n\ninterface Description {\n    title:      string;\n    units:      string;\n}\n```\n\n# Issues\nQuicktype merges matching types.\n```yaml\n// source.yaml\n\ndescription:\n  title: Description Title\n  name: Descritpion Name\nbook:\n  title: Book Title\n  name: Book Name\n```\n```typescript\n// target.d.ts\n\ninterface Source {\n    description: Book;\n    book:        Book;\n}\n\ninterface Book {\n    title: string;\n    name:  string;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacocoroco%2Fymlts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flacocoroco%2Fymlts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacocoroco%2Fymlts/lists"}