-
v.0.10.0-alpha Pre-release
released this
2026-06-14 15:06:01 +02:00 | 1680 commits to main since this releaseRelease Notes - v0.10.0
Building a Solid Foundation: Bun, Zod, and Safety First
This release focuses on reinforcing the core architecture before expanding the feature set any further. If
v0.9.0was about cleaning up the codebase,v0.10.0is about making sure the system is robust, strictly typed, and safe from runtime crashes.Going All-In on Bun
I have fully committed to the Bun ecosystem. The entire project has been migrated to a full Bun workspace environment (using
workspace:*dependencies). To ensure the compiler output remains absolutely predictable as we evolve, I've also introduced Bun snapshot testing. We'll now know immediately if a future code change inadvertently alters the output structure.Say Hello to Zod
I've added Zod to the stack to strictly validate data at runtime. Previously, if you fed the system some questionable or malformed data, it might crash spectacularly deep down the compilation pipeline. Now, Zod acts as a strict bouncer at the door: it catches invalid data early, ensures strict AST typing, and prevents silent failures.
Expanding the
@gramEcosystemThe architectural split I started in the previous release continues. Keeping the core lean is the goal, so I've created two new packages:
@gram/i18n: Unit translations and normalizations used to be awkwardly duplicated between the compiler and the analyzer. They now live in their own centralized internationalization package.@gram/renderer: HTML and Markdown generation have been extracted into this new dedicated package. The core compiler shouldn't be the one worrying about DOM elements and formatting tags.
What's New & what's Fixed
Mathematics & Fractions
- Aggregation Bug Fixed: There was a pesky bug where composite child ingredients using fractions (e.g.,
@zest{1/2}) were aggressively aggregating to a flat0in the final shopping list. A new unifiedgetNumericQtyutility now safely extracts numeric values across the entire codebase to prevent this. - Smart Fractions Formatting: Decimal values strictly below 1 (e.g.,
0.5,0.25) will now format cleanly as standard fractions (1/2,1/4) in the shopping list. Meanwhile, values1and above will keep their standard decimal formatting (like1.5 kg).
Under the Hood Improvements
- AST Refactoring: The Abstract Syntax Tree (AST) processing has been significantly refactored. Recipe elements are now identified via standardized constants across the system to prevent typos and improve maintainability.
- Consistent Warnings: The warning system has been entirely standardized to provide reliable and helpful error messages across all tools.
- Cleaner Build Pipeline: Improved parser stability and stripped out some complex, legacy build workarounds that were previously required for web environments.
Downloads
-
Source code (ZIP)
3 downloads
-
Source code (TAR.GZ)
4 downloads
-
v.0.9.0-alpha Pre-release
released this
2026-06-07 19:16:56 +02:00 | 1702 commits to main since this releaseRelease Notes - v0.9.0-alpha
Cleaning up the Kitchen: Scopes & Architecture
This release focuses heavily on restructuring the project to make it sustainable, modular, and ready for long-term development.
Wait... Where did v0.8.0 go?
If you were looking for the
v0.8.0release notes, don't blink—you didn't miss them! In the process of setting up Changesets to automate my workflow, the tool looked at the sheer volume of updates, structural revamps, and package migrations, and essentially said: "This is too big for a single step, we are skipping straight to v0.9.0." Consider it a kitchen accident where the dough rose twice as fast as expected. Let's call it a feature, not a bug!Moving to Scoped Packages
All packages have now been migrated under a unified npm scope:
@gram/. Whether you are using the parser, the compiler, or the playground, everything is now cleanly organized under@gram/parser,@gram/compiler, etc.A Major Architectural Split: Introducing
@gram/analyzerIn the previous release, I reclassified features like mass unification, yield management, and nutritional information calculation as experimental. Taking this a step further, I realized that bundling this complex analytical logic directly inside the core compiler was a mistake.
To keep the compiler fast and lean, I have extracted all analyzer logic into its own dedicated package:
@gram/analyzer.🚨 Breaking Change: The core compiler no longer ships with a built-in ingredients database. If you rely on nutritional estimation, mass normalization, or yield management, you will now need to explicitly provide your own ingredients data to the new analyzer package.
What's New
Refining the Syntax & "Mise en Place"
- Removing Ingredient States: I have decided to remove the ingredient states syntax (
@ingredient:state{}). While the original intent was to help organize a richer ingredients database, real-world usage proved it was far too confusing and verbose to write. - Cleaner Section Summaries: Pure flow instructions—like mentioning an ingredient just to say "remove from heat" or "re-insert"—without quantities (
@&ingredient{}) are now excluded from section-level ingredient summaries. This keeps your section-level mise en place lists perfectly clean while preserving separate measured portions. - Semantic Temperatures: The GRAM syntax now natively accepts semantic temperatures. You can now write intuitive instructions like
Cook on !{low heat}without being forced to specify exact Celsius or Fahrenheit degrees. - French Culinary Units: Unit resolution has been improved to seamlessly handle French kitchen aliases (e.g., translating
tsptocàc).
Under the Hood Improvements
- Mass Calculation Fixes: Fixed multiple edge-case bugs with mass calculations. Following up on the previous release, explicitly empty ingredient masses now safely count as exactly
0to avoid breaking total weight equations. - Streamlined Maintenance: I have completely stripped out
/distfolders from the main repository tracking and migrated the entire project's versioning workflow to Changesets. This will make tracking modifications, maintaining a clean root changelog, and shipping predictable updates significantly easier going forward.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
- Removing Ingredient States: I have decided to remove the ingredient states syntax (
-
v.0.7.0-alpha Pre-release
released this
2026-05-11 02:10:36 +02:00 | 1716 commits to main since this releaseRelease Notes - v0.7.0-alpha
A Quick Note on Transparency
First, up until now, I have often used 'we' when talking about Gram, making it sound like there's a whole kitchen brigade behind the project. In reality, I'm the only chef in this particular kitchen. Going forward, I’ll be using 'I' to better reflect the solo nature of this endeavor.
Secondly, in the last release, I promised a blog post detailing my long-term vision for Gram. I have to admit that I haven't found the time to write it properly. However, this delay has been a blessing in disguise. Over the last three months, taking a step back allowed me to reassess certain features and future directions. I also took the time to migrate around 200 of my personal recipes into the
.gramformat. This real-world stress test highlighted a few blind spots and necessary tweaks to the syntax.The vision post will happen eventually, but right now, my priority is focusing on the code.
What's New
Reclassifying Database-Related Features
Over the last two releases, I introduced systems for mass unification, yield management, and nutritional information calculation, all powered by the creation of an underlying ingredient database.
After some reflection, I realized that while this feature is highly promising, it requires more time and refinement before it becomes truly robust and relevant. Because of this, I have decided to separate these systems behind feature flags.
These features are now officially classified as Experimental. They are disabled by default, but can easily be toggled on via
CompilerOptionsin the API or through the new "Experimental Features" menu in the Playground.Enhancements & Fixes
- Negligible Mass Support: Ingredients declared with explicitly empty braces (e.g.,
@salt{}) are now assigned a mass of 0g. This allows the Total Mass calculation of a recipe to complete successfully without requiring exact weights for things like arbitrary seasonings or dusting flour. - Native Unit Localization (i18n): Unit translation has been centralized in a new
i18n.tsfile. This includes added support for standard French culinary abbreviations. - Nutrition Coverage Safety: The nutrition panel in the Playground will now automatically hide if any ingredient in the recipe is missing macro data or has an undetermined mass. This prevents the display of misleading or partial nutritional calculations.
- Documentation Update: The official documentation has been updated to reflect recent syntax changes and newly added features.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
- Negligible Mass Support: Ingredients declared with explicitly empty braces (e.g.,
-
v.0.6.0-alpha Pre-release
released this
2026-01-18 15:05:46 +01:00 | 1721 commits to main since this releaseRelease Notes - v0.6.0
What's New
Database Overhaul
The ingredient database has been migrated to a robust YAML-based structure sorted by category (data/*.yaml). About 900 ingredients were added.
- Manual integration of verified data sources directly from ANSES CIQUAL (France) and USDA FoodData Central (USA), supplemented by AI for missing density, yield and tags only.
- Multilingual support (English/French for now) for ingredient lookup.
- Support for user-defined ingredients via
data/user-defined.yaml.
The database is not exhaustive; it's a long-term project. We aim to gradually expand it to include more international ingredients, as well as most of the classic ingredients used in recipes. Any help in completing it is welcome.
Ingredient State Support
Introduced syntax
@ingredient:state{qty}to support calculating nutrition for raw/default vs cooked/dried/etc. ingredients (e.g.,@tomato:canned{100g}).- Includes validation warnings if the requested state is unknown or missing data.
Compiler Improvements
- Validation: New warnings system for "Missing Ingredient" (not in DB) and "Missing Macros" (in DB but incomplete).
- Partial Data Handling: The Nutrition Panel in the Playground is now hidden if data is incomplete, ensuring users are not misled by partial sums.
- Playground UX
- Replaced the syntax highlighter with a more robust solution (
code-input) for better performance and editing experience. - Improved visual presentation of compiler warnings.
- Replaced the syntax highlighter with a more robust solution (
Enhancements & Fixes
- Logic:
- Fixed mass calculations for intermediate preparations declared in sections.
- Refactored shopping list aggregation for composite ingredients to be more accurate.
- Documentation:
- Comprehensive updates to documentation reflecting the new database structure, mass unification logic, and advanced features.
- Fixed version numbering to sync with releases
What's next
We are nearing a first functional release, and no major syntax or structural logic changes are planned for the immediate future. My focus is now shifting toward the compiler to ensure as many edge cases and bugs as possible are fixed before the next release.
Another key priority is the ingredient database; it will take some time to complete.
I am currently preparing a post to better outline the future vision for gram, which will hopefully be available soon.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
-
v.0.5.0-alpha Pre-release
released this
2026-01-06 23:33:11 +01:00 | 1751 commits to main since this releaseIt compiles!
With the syntax becoming stable, the focus is shifting towards the Compiler.
The goal: instead of just parsing text, use the data to provide concrete help to the user. This update introduces logic to analyze ingredients and steps, enabling features like nutritional estimation, automatic mass conversions, and smart timings.Welcome to Codeberg! 🇪🇺
First and foremost, GRAM has moved to Codeberg.
This migration aligns with the values of open-source, ethical hosting, and community-driven development that drive this project. Born in France, Gram naturally supports Codeberg as a European platform dedicated to keeping software open and independent. We believe it is the perfect home for this project.
Release highlights
Mass Unification
To help with calculations, the system now tries to convert ingredient quantities into grams (hence this project's name 😅)
- Converts volumes (
cups,ml...) togramsusing average densities. - Distinguishes between Net Mass (what you eat) and Purchasing Mass (what you buy), accounting for waste (e.g., banana peels, egg shells — because we assume you don't eat those).
- You can specify custom densities in the recipe Frontmatter if the defaults are not accurate enough.
- New ingredients database: A basic internal database (Proof of Concept, generated by LLM for testing purposes) is used to help with these calculations. Note that data accuracy is not guaranteed yet.
Nutritional Calculation
The compiler can now estimate the nutritional value of a recipe (uses the new ingredients database).
- Estimates Calories, Protein, Carbs, Sugar, Fat, Fiber, and Salt.
- Define
portions: 4in your metadata to get per-serving metrics.
Time Estimation
The Playground now calculates and displays three distinct time metrics:
- Active Time: The actual work time (stirring, chopping, trying not to burn anything).
- Total Time: From start to finish, accounting for parallel background tasks.
- Prep Time (Est.): An automated estimation of the "Mise en place" based on the number of ingredients and their preparations.
There's more
Playground
- The preview mode has been updated with new icons and a cleaner design.
- New panel now shows the nutritional breakdown with an "Estimate" confidence badge (when available)
- New control to show/hide the calculated masses alongside the original text quantities.
Documentation Overhaul
The documentation has been completely restructured to make it easier to navigate:
- Separated into Syntax, Compiler Features, and Technical internal docs.
- Added diagrams to explain specific logic (like mass conversion).
- Updated with recent syntax and features additions.
Fixes
- Comments and notes in playground (Markdown and preview) are now visually distinct and no longer mess up the step numbering sequence.
- Fixed an issue where calculating percentages inside an alternative group (
@A{}|@B{10% @A}) would fail. - The parser is now more robust and correctly handles the "Torture Test" without breaking a sweat.
- Improved detection of ingredient modifiers and inline preparation notes.
See you in the next release ! 🤙
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
- Converts volumes (
-
v.0.4.0-alpha Pre-release
released this
2026-01-04 19:14:32 +01:00 | 1796 commits to main since this releaseAsynchronous tasks
What's New
Asynchronous Tasks Support
You can now mark timers as asynchronous (background tasks) using the
&modifier (e.g.,~{1h}&).- Compiler: Calculates precise
totalTimevsactiveTimemetrics. - Playground: Visualize async tasks with specific styling (dashed borders, ⏳ icon) in both Markdown and Preview modes.
Synchronous timers represent active work that blocks the cook, while asynchronous timers (&) designate background tasks occurring in parallel. This distinction allows the compiler to accurately calculate real effort versus total duration and enables the generation of realistic Gantt charts.
Playground Improvements
- New AST View: Added a raw AST view mode to inspect the parser output.
- UI: Improved view selection with a new dropdown menu.
Bug Fixes
- Fixed an issue where multiple composite ingredients would not aggregate correctly in the shopping list.
Documentation
- Added "Tips" across the documentation to better explain the philosophy behind timers, cookware, and relative quantities.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
3 downloads
- Compiler: Calculates precise
-
released this
2026-01-03 14:27:52 +01:00 | 1805 commits to main since this releaseMinor updates
- Docs: Updated
README.mdfiles with correct Playground URLs following the workspace migration. - Examples: Refined recipe examples to better showcase GRAM features.
Bug fix
- Fixed composite ingredient aggregation. Sub-ingredient quantities are now correctly summed across multiple sections, ensuring accurate parent ingredient totals in the shopping list.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
6 downloads
- Docs: Updated
-
v.0.3.0-alpha Pre-release
released this
2026-01-02 20:53:57 +01:00 | 1810 commits to main since this releaseArchitecture Refactor
The project has been restructured to improve scalability, maintainability, and developer experience.
Key Changes
Major Restructuring
- The project structure has been completely reorganized. All code modules are now located in a centralized
packages/directory.packages/parser: Core parsing logic (formerlygram-parser).packages/compiler: Compiler and graph logic (formerlygram-compiler).packages/playground: The web-based IDE.packages/vscode-extension: Visual Studio Code language support.
- Workspace Management: The root
package.jsonnow acts as a workspace manager, allowing installation of all dependencies with a singlenpm installcommand. - Centralized Config: Introduced a shared
tsconfig.base.jsonto ensure consistent TypeScript configuration across all packages.
Separation of Parser & Compiler
- Decoupled Architecture: The Compiler logic has been extracted from the Parser.
- Parser (
packages/parser): Strictly responsible for grammar definition (OhmJS) and generating the raw AST. - Compiler (
packages/compiler): Responsible for semantic analysis, graph generation, and transforming the AST into usable artifacts (Shopping Lists, Instructions...).
- Parser (
This separation allows tools (like linters or syntax highlighters) to use the lightweight parser without pulling in the heavy compiler logic.
Developer Experience
- Global Scripts: Added unified commands at the project root for easier workflow:
npm run build: Builds the core (parser & compiler).npm run dev: Launches the Playground instantly.
- Clean Output: Build scripts now feature friendly emojis and concise logging 🏗️ ✅.
- Examples Library: Created a dedicated
examples/folder at the project root.- These examples are automatically synced with the Playground during build.
- The Playground now dynamically lists these examples in its dropdown menu.
Fixes & Polish
- Separated Parser and Compiler logic into distinct, clean packages with proper dependencies.
- Updated
README.mdandCONTRIBUTING.mdto reflect the new architecture.
Changes Breakdown
- Moved
gram-parser→packages/parser - Moved
gram-compiler→packages/compiler - Moved
playground→packages/playground - Moved
gram-vscode-extension→packages/vscode-extension - Added
tsconfig.base.json - Refactored root
package.jsonscripts.
How to test this release
- Clone the repo (or pull changes).
- Run
npm installat the root. - Run
npm run build. - Run
npm run dev. - Open
http://localhost:3000and try the playground.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
- The project structure has been completely reorganized. All code modules are now located in a centralized
-
v0.2.0-alpha Pre-release
released this
2025-12-30 18:47:46 +01:00 | 1825 commits to main since this releaseTypeScript Migration for gram-parser
This refactor migrates the entire gram-parser codebase from JavaScript to TypeScript to enhance project robustness and maintainability.
Key Changes:
- TypeScript: Converted all source files to TypeScript (
src/*.ts). - Strict Typing: Comprehensive interface definitions for the AST and internal compiler structures.
- Build: Added a compilation step (
npm run build) that generates JavaScript code and declaration files (.d.ts) in thedist/directory.
No changes were made to the
.gramgrammar itself.Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
4 downloads
- TypeScript: Converted all source files to TypeScript (
-
GRAM Alpha - Initial Release Pre-release
released this
2025-12-28 21:28:39 +01:00 | 1838 commits to main since this release🎉 Gram Alpha - Initial Release
GRAM (General Recipe Abstract Markup) is a strictly typed, data-first recipe markup language designed for developers.
This initial Alpha release introduces the language specification, the reference parser, and the essential tools to begin treating recipes as code.
Key Features
The GRAM Language
GRAM captures the logic of cooking, not just the text:
- Data vs. Narrative Separation: Clear distinction between ingredients, cookware, and instructions.
- Advanced Quantity Management:
- Mise en place: Automatic generation of aggregated Shopping Lists vs. step-by-step Section Lists.
- Relative Quantities: Native support for percentages (e.g., Baker's Math).
- References & Composites: Reuse prepared ingredients and smart aggregation (e.g., "Lemon Zest" + "Lemon Juice" = "1 Lemon" in the shopping list).
The Ecosystem
This release includes the core project components:
gram-parser: The reference parser (built on OhmJS) converting.gramfiles into a strict AST and rich JSON structure.- Playground: A simple web-based IDE to write, visualize, and debug your recipes in real-time (includes JSON view, AST Tree, and Markdown Render).
- VSCode Extension: Syntax highlighting support for
.gramfiles.
Installation & Usage
Quick Start
Clone the repo and run the playground locally:
git clone https://github.com/abiwab/gram.git cd gram-language/playground npm install npx serveUsing the Parser
const { parse } = require('gram-parser'); const result = parse(myRecipeString);Documentation
Comprehensive technical documentation is available in the
docs/folder, including:License
This project is distributed under the GPL-3.0 license.
Note
: This is an Alpha version. The syntax and internal logic are subject to change. Feedback and contributions are highly welcome!
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
3 downloads