{"id":37530515,"url":"https://github.com/tmlmt/cooklang-parser","last_synced_at":"2026-04-13T02:14:16.371Z","repository":{"id":311068953,"uuid":"1042329041","full_name":"tmlmt/cooklang-parser","owner":"tmlmt","description":"A typescript library to parse and manipulate cooklang recipes.","archived":false,"fork":false,"pushed_at":"2026-03-30T15:31:48.000Z","size":2797,"stargazers_count":10,"open_issues_count":12,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T17:34:39.168Z","etag":null,"topics":["cooklang","parser-library","recipe-api","typescript-library"],"latest_commit_sha":null,"homepage":"https://cooklang-parser.tmlmt.com","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/tmlmt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":null,"dco":null,"cla":null}},"created_at":"2025-08-21T20:58:00.000Z","updated_at":"2026-02-28T02:15:11.000Z","dependencies_parsed_at":"2025-08-22T00:29:25.129Z","dependency_job_id":"fdd26578-48bb-42df-828d-bd1613db7410","html_url":"https://github.com/tmlmt/cooklang-parser","commit_stats":null,"previous_names":["tmlmt/cooklang-parser"],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/tmlmt/cooklang-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmlmt%2Fcooklang-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmlmt%2Fcooklang-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmlmt%2Fcooklang-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmlmt%2Fcooklang-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmlmt","download_url":"https://codeload.github.com/tmlmt/cooklang-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmlmt%2Fcooklang-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":["cooklang","parser-library","recipe-api","typescript-library"],"created_at":"2026-01-16T08:31:43.640Z","updated_at":"2026-04-02T18:00:18.450Z","avatar_url":"https://github.com/tmlmt.png","language":"TypeScript","readme":"# Cooklang Parser\n\nA typescript library to parse and manipulate [cooklang](https://cooklang.org/) recipes.\n\n\u003cpicture\u003e\u003cimg src=\"https://badges.ws/maintenance/yes/2026\" /\u003e\u003c/picture\u003e\n\u003cpicture\u003e\u003cimg src=\"https://badges.ws/npm/dt/@tmlmt/cooklang-parser\" /\u003e\u003c/picture\u003e\n\u003cpicture\u003e\u003cimg src=\"https://badges.ws/npm/l/@tmlmt/cooklang-parser\" /\u003e\u003c/picture\u003e\n\u003cpicture\u003e\u003cimg src=\"https://badges.ws/github/release/tmlmt/cooklang-parser\" /\u003e\u003c/picture\u003e\n[\u003cimg src=\"https://badges.ws/badge/documentation-5672CD?icon=vitepress\" /\u003e](https://cooklang-parser.tmlmt.com)\n\n## Introduction\n\nThis library provides a set of tools to work with recipes written in the Cooklang format. It allows you to parse recipes, extract ingredients, cookware, and timers, scale recipes, and generate shopping lists.\n\n## Features\n\n- **Cooklang Compliant:** Fully compliant with the Cooklang specifications.\n- **Recipe Parsing:** Parse Cooklang recipes to extract metadata, ingredients, cookware, timers, and steps.\n  Several extensions on top of the original cooklang specifications\n  and [detailed in the docs](https://cooklang-parser.tmlmt.com/guide-extensions).\n- **Recipe Scaling:** Scale recipes by a given factor.\n- **Shopping Lists:** Generate shopping lists from one or more recipes.\n- **Category Configuration:** Categorize shopping list ingredients based on a custom category configuration.\n- **Typescript:** Written in Typescript, providing type safety for all the data structures.\n\n## Quick start\n\n- Install the package with your favorite package manager, e.g.:\n\n`npm install @tmlmt/cooklang-parser`\n\n- Use the `Recipe` class to parse a cooklang recipe:\n\n```typescript\nimport { Recipe } from \"@tmlmt/cooklang-parser\";\n\nconst recipeString = `\n---\ntitle: Pancakes\ntags: breakfast, easy\n---\nCrack the @eggs{3} into a bowl, and add @coarse salt{}.\n\nMelt the @butter{50%g} in a #pan on medium heat.\n\nCook for ~{15%minutes}.\n\nServe hot.\n`;\n\nconst recipe = new Recipe(recipeString);\n\nconsole.log(recipe.metadata.title); // \"Pancakes\"\nconsole.log(recipe.ingredients); // [{ name: \"eggs\", ...}, ...]\nconsole.log(recipe.cookware); // [{ name: \"pan\", ...}]\nconsole.log(recipe.timers); // [{ duration: 15, unit: \"minutes\", name: undefined}]\n```\n\n- Browse the [API Reference](https://cooklang-parser.tmlmt.com/api/classes/Recipe) to discover all functionalities\n\n## Future plans\n\nI plan to further develop features depending on the needs or bugs I will encounter in using this library in a practical application. The current backlog and status can be seen in the [Issues](https://github.com/tmlmt/cooklang-parser/issues) page.\n\n## Test coverage\n\nThis project includes a test setup aimed at eventually ensuring reliable parsing/scaling of as many recipe use cases as possible.\n\nYou can run the tests yourself by cloning the repository and running `pnpm test`. To see the coverage report, run `pnpm test:coverage`.\n\n## Contributing\n\nIf you find any issue with your own examples of recipes, feel free to open an Issue and if you want to help fix it, to submit a Pull Request (PR). Please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec when submitting PRs.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmlmt%2Fcooklang-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmlmt%2Fcooklang-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmlmt%2Fcooklang-parser/lists"}