42 KiB
@gram-lang/cli
1.4.1
Patch Changes
e68828e: CLI / Cook: The countdown of a timer ingram cooknow lasts as long as the recipe says:~{1h}used to count down 1 minute and~{30 s}30 minutes, because every timer was read as minutes whatever its unit.7fbd5c6: Renderer & CLI: Totals where you buy or read an overview (shopping list, recipe/section weight, nutrition base,gram shop) convert metric amounts from 1000 g/ml up tokgorl(3.9 kginstead of3900 g), while steps, section ingredients, the run sheet, andgram cookkeep grams for weighing (API helpers:toLargerMetricUnit,isMetricMassUnitin@gram-lang/i18n).2327de6: Renderer & CLI: Numbers follow the recipe's language (lang/ projectlanguage, with decimal commas in French and no thousands separators ingram shop/gram scale), and spoons, cups, and imperial measures display as fractions (1 3/4 cup) across views and CLI commands while keeping machine attributes unchanged (API helpers:formatNumber,localizeDecimals,toKitchenFractionin@gram-lang/i18n).- Updated dependencies [
2327de6] - Updated dependencies [
7de7b3f] - Updated dependencies [
7fbd5c6] - Updated dependencies [
2327de6] - Updated dependencies [
7fbd5c6] - Updated dependencies [
d946b46] - Updated dependencies [
4608f96] - Updated dependencies [
efbb381]- @gram-lang/renderer@1.4.1
- @gram-lang/i18n@1.4.1
- @gram-lang/analyzer@1.4.1
- @gram-lang/parser@1.4.1
- @gram-lang/kitchen@1.4.1
- @gram-lang/modules@1.4.1
- @gram-lang/format@1.4.1
- @gram-lang/scheduler@1.4.1
1.4.0
Minor Changes
-
CLI / Plan: A new
gram plan <recipe>command plans a recipe: the days of work, the visits to the kitchen, what to take out and which steps of each section to read:--serve "2026-10-11 13:00"plans it backward from the time it is served; without it, the plan is told in days before the service (D-2, D-1, day D) and ends with the earliest time it could be ready if you start now--tz Europe/Parissets the time zone and--availablesays when you can cook (08:00-22:00for every day,fri=18:00-22:00for a day of the week,2026-10-09=nonefor a date). By default they come from the newtimezoneandavailabilitysettings of.gram/config.yaml(gram config set availability 08:00-22:00), and only then from this machine- A wait written as a range (
~_{8-16h}) is made longer or shorter to keep your own work out of the hours you are not available, and the plan says which one and why; what cannot be fixed is listed at the top --find 2026-10-12/2026-10-15lists the serving times that work between two moments, at your meal times (--meal-times 12:30,20:00, or the newmealTimessetting), best first, and why each of the others does not--format text|md|html|jsonpicks the output, and--ics plan.icsalso writes a calendar file with an event and an alarm for every visit to the kitchen--mise-en-place,--rests,--scaleand--stockwork as they do ingram view
-
CLI / Run sheet:
gram exportandgram printcan now write the run sheet instead of the recipe:--view run-sheet(the recipe remains the default) supports--serve,--tzand--available; without--serve, the plan is told in days before the service (D-2,D-1,Day D)gram exportwrites<recipe>.run-sheet.md(or.html,.txt) next to the recipe unless--outputis given, andgram printputs one day per page- Each view offers only the formats it has: asking the recipe for
--format textsays which formats it offers instead of writing something else
-
CLI / View & Export:
gram view,gram exportandgram printaccept a new--mise-en-place <per-section|upfront|per-day>option, to see the recipe with the mise en place planned right before each section (the default), all at the start, or at the start of each working day:- A new
--rests <shortest|balanced|longest>option does the same for a wait written as a range (~_{12-24h}): the shortest by default, the middle or the longest, in the total time as in the length shown on the step itself gram cookaccepts both options too, for the total time it shows and the length of the timer of such a wait
- A new
-
Analyzer / Diff:
gram diffnow compares the total and idle times of the default schedule, with the mise en place right before each section, so the times it reports match whatgram viewshows by default; the active time is the schedule's too, so changing the range of a cooking time (~{20-25min}, planned on its longest figure) shows in the comparison, and the preparation time is compared as before -
CLI / Settings: Every setting of a recipe now has a flag named after it, on every command where it changes something, with the same values and default as in the editor and the playground:
--step-quantities show|hideand--nutrition-basisare the new names of--no-step-qtyand--nutrition, which still work- What the analyzer computes can now be turned off on
gram view,gram print,gram export,gram cook,gram build,gram watchandgram shop:--no-mass-standardization,--no-yield-calculation,--no-nutrition-estimationand--no-bakers-math; everything stays on by default - An unknown value stops the command and lists the values it accepts, under the name you typed
-
Comments: You can now choose whether the comments of a recipe (
// like this) are shown or left out, in every view:- The renderer takes a new
comments: "show" | "hide"option (default"show") that the recipe views, the print and the run sheet follow; hiding leaves no empty notes section behind gram export,gram printandgram planaccept--comments <show|hide>, and the editor has a newgram.commentssetting for the preview and the run sheet; the playground gets a Display section with a switch- In the run sheet, a note alone on a line sits under its step in small muted text, and one at the end of a line stays in the sentence, between parentheses
- The renderer takes a new
-
Renderer / Nutrition: The nutrition of the HTML recipe is now a compact table, like a European food label, and easy to reach from the top of the recipe:
- One column per basis, side by side (per 100 g, then per portion), with the energy as the first row in kJ and kcal and the whole recipe underneath; no more switching between bases
- A
%RIcolumn gives each nutrient's share of the reference intake of an average adult (8,400 kJ / 2,000 kcal), per portion - The hero bar shows the energy (
493 kcal per portion, or per 100 g when the recipe declares no portions); clicking it jumps to the table - Sodium is now shown as salt, in grams (sodium × 2.5), and calories as energy, in every view and every language
- With the
nutritionBasissetting set to one basis, the table and the hero bar show that basis alone - The Markdown and plain text recipes show the same table by default, instead of the values per portion only
Deprecated
- Renderer: the
interactiveNutritionoption no longer has any effect, since every basis is shown at once, and is removed in 2.0.0. Remove it from your calls
-
Renderer / Text: The recipe can now be written as plain text, for a terminal or a plain file:
- A box with the title, the servings and the times, then the shopping list, the cookware, each section with its numbered steps, the notes and the nutrition, in the reader's language and following the same settings as the other formats
gram export --format textwrites it next to the recipe (brioche.txt), and the playground offers it as a format of the recipe; for developers,toText()and thetextformat of the recipe view- The Markdown, HTML and print versions of the recipe now speak the reader's language too: "Instructions", "Ingredients", "or", "optional" and the other words that were always in English follow the language setting (the English output is unchanged)
-
CLI / View:
gram viewnow shows the recipe the way every other view of Gram does:- The headings, the labels and the nutrition follow the language of your project, instead of always being English
- The steps repeat the quantity next to each ingredient (
flour (200 g)), comments are shown as notes (--comments hideleaves them out), and a wait written as a range (8-16 h) is shown as written - The colors follow your terminal: plain text when the output goes to a file or another command,
NO_COLORrespected,FORCE_COLOR=1to keep them ingram view | less -R
Patch Changes
- CLI / Stock:
gram view,gram cook,gram check,gram scale,gram exportandgram printnow warn on stderr when a--stockentry matches none of the recipe's@use, asgram buildandgram shopalready did, instead of ignoring it silently — most often a relative path typed from another directory, since it is resolved from the current directory - CLI: Every command now stops on an unexpected error the same way: a one-line message instead of a stack trace, which
--verbosestill shows. - Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- @gram-lang/renderer@1.4.0
- @gram-lang/scheduler@1.4.0
- @gram-lang/kitchen@1.4.0
- @gram-lang/analyzer@1.4.0
- @gram-lang/i18n@1.4.0
- @gram-lang/modules@1.4.0
- @gram-lang/format@1.4.0
- @gram-lang/parser@1.4.0
1.3.0
Minor Changes
-
e0d0e9a: CLI / Requirements: The CLI now requires Node.js 22 or later (Bun keeps working as before).Breaking
- CLI: Node.js 20 reached end of life in April 2026 and is no longer supported: upgrade to Node.js 22+ before updating the CLI
Patch Changes
-
4c9652c: CLI / View: Fixed several display issues ingram viewand cook mode:- Timers now show their real unit (
~{1h}is shown as~1h,~{20s}as~20s) instead of always "min". - Recipe durations are rounded and readable (
1h 5m,25m 5s) instead of raw decimals like1h4.5. - The resting time now appears in the recipe header.
- Common fractions such as
1/4 tspstay fractions in the shopping list instead of becoming0.3.
- Timers now show their real unit (
-
48c856d: Analyzer: Fixed ingredients being ignored for density conversion and nutrition when their entry iningredients.yamlisn't spelled exactly like the recipe name, such as "Huile d'olive" stored underhuile-dolive:- Volumes like
@Huile d'olive{10ml}are now converted to grams and no longer trigger "ingredient missing nutrition data" gram db lintnow reports ingredients whose names or aliases would be confused with each other
- Volumes like
-
Updated dependencies [
4c9652c] -
Updated dependencies [
a5891a9] -
Updated dependencies [
48c856d] -
Updated dependencies [
95698cc] -
Updated dependencies [
fac320b]- @gram-lang/renderer@1.3.0
- @gram-lang/modules@1.3.0
- @gram-lang/analyzer@1.3.0
- @gram-lang/parser@1.3.0
- @gram-lang/kitchen@1.3.0
- @gram-lang/i18n@1.3.0
- @gram-lang/format@1.3.0
1.2.1
Patch Changes
- Updated dependencies [
532ea55] - Updated dependencies [
728e2ba] - Updated dependencies [
c8c4d49]- @gram-lang/renderer@1.2.1
- @gram-lang/i18n@1.2.1
- @gram-lang/analyzer@1.2.1
- @gram-lang/kitchen@1.2.1
- @gram-lang/modules@1.2.1
- @gram-lang/parser@1.2.1
- @gram-lang/format@1.2.1
1.2.0
Minor Changes
2bab3cd: Parser & Kitchen: Introduced modular recipes and multi-file imports via the@usedirective:- Import external base recipes directly into a recipe using
@use "./bases/shortcrust-pastry.gram" as &shortcrust. - Imported steps seamlessly interleave into the global ALAP scheduling timeline, preserving resting times and dependencies.
- Automatically scales imported base quantities when referenced with specific yields (e.g.
&shortcrust{250g}halves a 500 g base recipe). - Supports destructured multi-yield imports (e.g.
@use "./bases/tart-elements.gram" as { &crust, &frangipane }) scaling each component independently. - Supports multi-word bindings using bracket notation (e.g.
@use "..." as &pastry dough{}). - Resolves project-root paths (
@/bases/...) and custom path aliases defined underpaths:in.gram/config.yaml. - Added
--stockCLI flag to treat pre-made base imports as stock items (zero timeline overhead, single shopping list line, retaining full nutritional totals). - Supports retro-planning timeline offsets directly on
@useimport lines (e.g.@use "./bases/levain-starter.gram" as &starter ~{-2d}). - Spliced sections in HTML, Markdown, and print outputs display origin badges crediting their source module.
gram diffandgram watchnow track import additions, removals, rebinding, rescaling, and dependency file changes.- Language Server and VS Code extension support live dependency composition, Go to Definition into base files, path auto-completion, and quick-fix diagnostics for missing exports.
- Exported
createMemoryHostfrom@gram-lang/modulesfor browser and in-memory module graph resolution. - Corrected whole-recipe mass and nutrition totals to accurately include spliced intermediate (
-> &) masses. - Normalized rescaled ingredient quantities to one decimal place for display consistency across all outputs.
- Import external base recipes directly into a recipe using
2561210: CLI: Added automatic update checking and a newgram upgradecommand:- gram now checks npm in the background and prints a short "update available" notice after a command finishes (skipped in CI and non-interactive runs).
- Added
gram upgradeto check for and install the latest version on demand — it always performs a fresh check and asks for confirmation before running the install. - Added an
updateCheck: falsesetting inconfig.yaml(or theGRAM_NO_UPDATE_CHECKenvironment variable for a single run) to opt out of the passive notice.
c31a583: Parser & Kitchen: Composite ingredients written with a short, generic child name (like@juice<@lemon) are now protected against a silent ingredient-database mix-up:- The compiler now warns when the same short composite name (e.g. "juice") is drawn from two different parents within one recipe (lemon in one step, orange in another) — until now this went unnoticed and the two usages silently shared one entry in the ingredient database.
gram db syncreports the same conflict across your whole recipe collection, so two unrelated recipes that happen to use the same generic composite name don't overwrite each other's nutrition and density data.- The AI recipe importer (
gram import) now writes composite ingredients with their full name (e.g. "lemon juice") instead of a short generic one, so newly imported recipes don't create this conflict in the first place.
Patch Changes
- Updated dependencies [
9331a4b] - Updated dependencies [
c31a583] - Updated dependencies [
f617b4c] - Updated dependencies [
2bab3cd] - Updated dependencies [
8a4056b] - Updated dependencies [
aaf8cee]- @gram-lang/kitchen@1.2.0
- @gram-lang/modules@1.2.0
- @gram-lang/i18n@1.2.0
- @gram-lang/parser@1.2.0
- @gram-lang/renderer@1.2.0
- @gram-lang/analyzer@1.2.0
- @gram-lang/format@1.2.0
1.1.0
Minor Changes
4765cb4: CLI / Import: Support importing recipes directly from YouTube videos and Shorts viagram import:- Uses Gemini multimodal video understanding to analyze cooking videos and generate structured
.gramrecipes. - Automatically populates
title:,author:(channel name), andsource:metadata from YouTube. - Automatically normalizes YouTube Shorts URLs to standard video formats.
- Added
--max-duration(default 20 minutes) to prevent accidental token overconsumption on long videos. - Displays upfront video duration and estimated token cost when
YOUTUBE_API_KEYis configured.
- Uses Gemini multimodal video understanding to analyze cooking videos and generate structured
b66b785: CLI / AI: Explicit AI model and provider selection for all AI commands (gram import,gram db lint,gram db enrich):- Added
--model,--provider, and--pick-modelCLI flags to inspect or override the active model per run without altering persistent config. - The CLI now displays the active AI provider, model, and configuration source before execution.
- Isolated provider API keys so credentials configured for a specific provider are never leaked or reused when switching providers.
- Fixed
gram importhanging in non-interactive environments when--outputwas used without--yes.
- Added
1881ed0: CLI / Database: Added physical coherence and sanity checks acrossgram db validateandgram db enrich:gram db validatechecks calorie consistency against Atwater estimates (4 kcal/g protein/carbs, 9 kcal/g fat, 7 kcal/g alcohol).gram db validatechecks sub-macro coherence (sugars exceeding total carbs, fat sub-types exceeding total fat).gram db validateenforces category-based density sanity ranges and unit weight bounds.gram db enrichconstrains AI estimates within physical limits and prompts self-verification of Atwater consistency.gram db enrichpasses known ingredient categories to the AI to reduce guesswork.
1581ff9: CLI / Database:gram db enrichnow walks you through an interactive review before writing AI estimates toingredients.yaml:- Preview, accept, edit, or skip AI-proposed density, unit weight, and nutrition values per ingredient.
- Unedited AI values are tagged with
# [LLM]iningredients.yamlto track provenance. - Added
--report(-r) to preview needed database enrichments without writing changes, matchinggram db lint --report(replaces--dry-run/-n). - Added
--yes(-y) to accept all estimates automatically for non-interactive scripting. - Automatically falls back to accepting values with a warning when executed in non-interactive (non-TTY) environments.
d47ee12: CLI / Import: Added integrity guardrails and diagnostic reporting togram import:- Validates compiled AST tokens against AI output to detect lost ingredients or truncated steps, aborting instead of writing corrupted files (overridable with
--force). - Reports uncorrected AI generation errors with actionable diagnostics.
- Identifies imported ingredients missing quantities and lists their line numbers for easy manual completion.
- Reports unknown database ingredients and unweighed units when an ingredient database is present.
- Prevented hallucinated placeholder metadata in
author:andsource:fields. - Redirected progress indicators to
stderrso stdout redirection (gram import ... > recipe.gram) produces clean recipe files.
- Validates compiled AST tokens against AI output to detect lost ingredients or truncated steps, aborting instead of writing corrupted files (overridable with
fbb7511: Nutrition & Rendering: Support flexible nutrition serving bases (per portion and per 100 g) alongside whole-recipe totals:- Declaring
portions:in recipe frontmatter now calculates per-portion nutrition and keeps values constant when scaling recipes. - Added a standardized
per-100gnutrition basis calculated from raw assembled recipe mass. - Added the
--nutrition <auto|total|per-portion|per-100g>option togram view,gram export, andgram print. - Added nutrition basis toggles in the web playground and VS Code live preview.
- Localized all nutrient names and table headers across supported languages (French and English).
- Declaring
Patch Changes
b3a509a: Parser & Kitchen: Fixed an issue where multi-word composite ingredients marked with&(e.g.@juice{1}<@&unwaxed lemon{}) were duplicated in the shopping list instead of being combined into a single purchase item.fbb7511: Analyzer & Language Server: Improved nutrient calculation completeness and editor hover precision:- Saturated, monounsaturated, polyunsaturated fats, and alcohol are now included in recipe nutrition totals instead of being omitted.
gram db enrichcan now propose monounsaturated and polyunsaturated fat values during ingredient enrichment.- Fixed the editor hover tooltip incorrectly displaying sodium in grams instead of milligrams.
- Updated dependencies [
b3a509a] - Updated dependencies [
fbb7511] - Updated dependencies [
fbb7511] - Updated dependencies [
fbb7511]- @gram-lang/parser@1.1.0
- @gram-lang/kitchen@1.1.0
- @gram-lang/analyzer@1.1.0
- @gram-lang/renderer@1.1.0
- @gram-lang/i18n@1.1.0
- @gram-lang/format@1.1.0
1.0.1
Patch Changes
46a32fc: Fixed the--helpdescription ofgram checkto clarify that it also checks database completeness by default, unless--skip-dbis used.e03abd7: Reduced the AI provider costs of runninggram import:- Prompt caching is now enabled, so retries reuse the cached prompt instead of paying full price.
- The command now sends a minimized recipe payload instead of the full raw webpage data.
- The self-correction loop no longer spends retries on informational warnings (like missing database ingredients).
- Formatting is now handled locally instead of spending an AI call to fix it.
e03abd7: Improved the quality and correctness of recipes generated bygram import:- Fixed an issue where English words would leak into non-English recipes.
- Fixed grammatical errors (dropped articles) around ingredient and cookware references in non-English output.
- Descriptive adjectives (like "boneless skinless") are now correctly extracted as preparation steps instead of creating unwieldy ingredient names.
- Corrected the generated syntax for multi-word cookware references.
- Fixed an issue where the target language was sometimes incorrectly inferred.
- Improved decoding of accented characters and punctuation from the source recipe.
e03abd7: Improved the CLI guidance printed after runninggram import:- It now correctly points to
gram db syncas the recommended next step. - It accurately reports any remaining compiler warnings (e.g., missing ingredients) instead of silently discarding them.
- It now correctly points to
7d61f97: Fixedgram initto ensure the interactive AI provider setup accurately offers the currently recommended models (e.g., llama4).- @gram-lang/analyzer@1.0.1
- @gram-lang/kitchen@1.0.1
- @gram-lang/parser@1.0.1
- @gram-lang/i18n@1.0.1
- @gram-lang/renderer@1.0.1
- @gram-lang/format@1.0.1
1.0.0
Major Changes
-
Gram v1.0.0 Official Launch! 🎉
This milestone release marks the official 1.0.0 launch of Gram:
- Brand-New Website & Documentation: Rebuilt using Astro and Starlight with refined guides and an integrated blog.
- Refreshed Visual Identity: Brand-new logo.
- Infrastructure & Stability: Monorepo stability, test coverage, and migration to self-hosted Forgejo (
git.gram-lang.org) mirrored to GitHub and Codeberg.
1.0.0-beta.5
Minor Changes
-
b1aa8db: Thelanguage:setting in.gram/config.yamlnow also affects unit conversion and the shopping list's category order (e.g. a database with French category names like "Légumes" now sorts correctly whenlanguage: "fr"is set) — previously it only affected AI-generated content. -
96bfbee:gram formatand the editor's "format on save" now share the exact same formatting rules, so a recipe formatted by one always looks identical when opened in the other.This adds a few new automatic cleanups to both: normalizing spacing around composite ingredients (
@a{} < @b{}→@a{}<@b{}), tidying up intermediate-result declarations (->&name {}→->&name{}), making sure section headers have exactly one space after the#s, and converting tabs to spaces.
Patch Changes
1ade4e1: Fixed a bug where the wrong API key could be sent to the wrong AI provider. If you had, say,GEMINI_API_KEYset in your environment but configuredprovider: openaiin.gram/config.yaml, your Gemini key could be sent to OpenAI instead. Each provider now only ever uses its own key.72ef907: Warnings about invalid ingredient database entries now go to stderr instead of stdout, so commands likegram build recipe.gram | jqno longer break when the database has a bad entry.2bdd3d7:gram shopnow groups the shopping list by the same category names used everywhere else in the project (e.g. "Seafood" instead of "Fish", "Vegetables" instead of "Produce") instead of its own inconsistent list.19f7fe3: Fixedgram formatrewriting values inside the recipe's frontmatter (the---metadata block at the top of a.gramfile). For example, an email address likeJean@Example.cominauthor:used to get incorrectly lowercased toJean@example.com. Frontmatter is no longer touched by formatting rules meant for the recipe body. File writes are also now atomic and lock-protected, matching the rest of the CLI.293d43e:gram import <url>now refuses to fetch addresses that aren't publicly routable (localhost, private networks, link-local/cloud metadata addresses), including on redirects — closing a way for a malicious or compromised page to make the CLI fetch internal network resources. API keys stored viagram init/gram config setare now actually picked up when running the CLI under Node (previously only worked when run via Bun).gram db enrichnow clearly reports when nothing was written to disk instead of claiming success; AI-suggested ingredient values that are physically implausible (like an ingredient density far outside any real food) are now rejected instead of being written to your ingredient database.- Updated dependencies [
cf39429] - Updated dependencies [
b1aa8db] - Updated dependencies [
3afd970] - Updated dependencies [
8f7e887] - Updated dependencies [
5194ba4] - Updated dependencies [
1d86e74] - Updated dependencies [
7b246ae] - Updated dependencies [
f147b25] - Updated dependencies [
9553678] - Updated dependencies [
99aa179] - Updated dependencies [
68a2a45] - Updated dependencies [
7c83cf8] - Updated dependencies [
dcaadd7] - Updated dependencies [
0c2e818] - Updated dependencies [
943e9f8] - Updated dependencies [
24a108c] - Updated dependencies [
970c32b] - Updated dependencies [
23e4286] - Updated dependencies [
901e90e] - Updated dependencies [
19a9f19] - Updated dependencies [
73fde5e] - Updated dependencies [
3fae598] - Updated dependencies [
064ba9f] - Updated dependencies [
b1aa8db] - Updated dependencies [
a55dca8] - Updated dependencies [
79d835c] - Updated dependencies [
d61d786] - Updated dependencies [
2ed4707] - Updated dependencies [
938afcd]- @gram-lang/format@1.0.0-beta.5
- @gram-lang/analyzer@1.0.0-beta.5
- @gram-lang/renderer@1.0.0-beta.5
- @gram-lang/parser@1.0.0-beta.5
- @gram-lang/i18n@1.0.0-beta.5
- @gram-lang/kitchen@1.0.0-beta.5
1.0.0-beta.4
Minor Changes
301ad01: Exported therunPipelinefunction alongside its associated types from@gram-lang/clito facilitate library and programmatic usage of the core compiler orchestration.fc47a86: Renamed thecookTimemetric toidleTimeacross the ecosystem to better reflect hands-off wait time. Additionally, passive timers sharing the same name are now automatically sequenced one after another on the same background track.
Patch Changes
e659677: Fixed bare ingredient names incorrectly absorbing trailing punctuation (like periods). Also fixed multi-word unbraced names breaking alternative group parsing. (An orphan|in step text is now correctly flagged as a parse error).67b6fe4: Updated the AI generation prompt to accurately reflect the latest language syntax, strict retro-planning rules, and active/passive timer terminology.b546f96: Fixed shopping list ingredient names defaulting to the database's canonical wording when the recipe used a valid alias. The lists now correctly preserve the recipe's original wording or translated alias, ensuring consistent language throughout.c1c9b53: Fixed section and mise-en-place ingredient lists displaying raw database slug IDs (e.g.,oeufs) instead of their correct, localized display names (e.g.,œufs).- Updated dependencies [
06039f2] - Updated dependencies [
7487b09] - Updated dependencies [
383c825] - Updated dependencies [
0bee2b2] - Updated dependencies [
e659677] - Updated dependencies [
aa0c082] - Updated dependencies [
cb6b794] - Updated dependencies [
fc47a86] - Updated dependencies [
b546f96] - Updated dependencies [
68365c4] - Updated dependencies [
c1c9b53] - Updated dependencies [
68365c4] - Updated dependencies [
55430e4]- @gram-lang/kitchen@1.0.0-beta.4
- @gram-lang/renderer@1.0.0-beta.4
- @gram-lang/analyzer@1.0.0-beta.4
- @gram-lang/parser@1.0.0-beta.4
- @gram-lang/i18n@1.0.0-beta.4
1.0.0-beta.3
Patch Changes
0438aba:gram checknow resolves syntax error line numbers from the parser's structuredGramParseError.offsetinstead of regexing "line N" out of ohm's prose message — line numbers are now always correct, not just when they happened to match that pattern.- Updated deployment configuration to automate npmjs packages publication
- Updated dependencies
- @gram-lang/analyzer@1.0.0-beta.3
- @gram-lang/i18n@1.0.0-beta.3
- @gram-lang/kitchen@1.0.0-beta.3
- @gram-lang/parser@1.0.0-beta.3
- @gram-lang/renderer@1.0.0-beta.3
1.0.0-beta.2
Major Changes
-
6e09879: fix!:gram checkonly fails on structural errors by default (use--strictfor the old behavior), fix LSP completion race, and add ingredients.yaml live reloadBreaking:
gram checknow only fails on structural issues (like undefined references) and uses a sharedwarningSeveritymap. Nutritional gaps and incomplete annotations are reported as warnings instead of failing the build. Use--strictfor the old all-warnings-fail behavior.GramConfigErrorexit code changed from 2 to 1 (user error, not internal crash).
Fixed:
- Language Server: Fixed a race condition where completions immediately after
@or&could return nothing. - Language Server: Diagnostics now correctly use the shared
warningSeveritymap. - Language Server:
ingredients.yamlis now actively watched via LSP. External edits instantly refresh diagnostics without restarting the editor.
Minor Changes
-
815ce8c: fix!: load valid ingredients even when the database has a bad entry, and fix five correctness bugsBreaking:
validateIngredientDatabaseno longer throws an error on a single malformed entry. It now validates entry-by-entry, returning both valid data and rejected keys. This preventsgram checkorgram cookfrom hard-failing due to one unrelated bad line.physical.yieldmust now be> 0(previously>= 0) to prevent producingInfinitymass downstream.
Fixed:
- Added a guard in
applyYieldagainst non-positive yield factors. - Shopping list aggregation: The
optionalmodifier is now treated as an intersection rather than a union. diffRecipes: Temperature ranges that change bounds but keep the same average are now correctly detected in the diff. Fixed an issue where identical section titles would drop timer/temperature tokens.calculateMassMetrics: Excludesoptionalingredients fromtotalMassto match nutritional calculations.calculateNutrition: Missing nutrient data now propagates asundefinedrather than an indistinguishable0.
-
5217ab8: ExportfetchRecipeandvalidateGramfrom the recipe-import service, enabling direct testing and reuse of the import validation pipeline. -
6eab9b3: feat!: replace the°temperature sigil with^, the~&passive timer marker with~_, and add mixed/Unicode fraction supportBreaking syntax changes:
- The Temperature sigil is now
^(e.g.^{180C}).°is no longer a block-opening character, but remains valid inside unit spellings (°C). - The Timer passive marker is now
~_(e.g.~_{45min}) instead of~&. - Temperature units now accept bare
C/Fin addition to°C/°F.
New syntax:
- Added support for mixed-number fractions (
1 1/2) and Unicode vulgar fraction glyphs (½).
- The Temperature sigil is now
-
a46c24f: Upgraded all monorepo dependencies to their latest versions and implemented a TypeScript 7 dual setup for faster typechecking while preserving compilation toolchain compatibility. Fixed type errors arising from Node 26 and VS Code LSP v10 updates.
Patch Changes
dad09ac: Added a global--verbose/--debugflag (works with any subcommand) that prints the full stack trace alongside the usual terse error message — useful when filing a bug report or diagnosing an unexpected failure.d202df0: Fixed a regression introduced alongside the new--verboseflag wheregram -vstopped printing the version and showed the help text instead (-vis citty's own--versionshorthand — it's no longer swallowed as part of the verbose flag). Also fixedgram import's fetch timeout message not showing up when the timeout fires while reading a slow response body instead of during the initial connection.92a0b47:.envis now written with0600permissions instead of the OS default, so API keys are no longer group/world-readable on shared machines..gram/config.yamlis now validated at load time (invalid fields fail with a clear error instead of crashing deep in the pipeline).gram importnow times out after 15s, caps response bodies at 10MB, and asks for confirmation before writing AI-converted content from an untrusted external source to disk (skippable with--yes).129736f: Performance improvements for CLI tools:gram formatnow processes files concurrently, significantly speeding up execution on large recipe collections.gram db syncnow uses a length-based pre-check for fuzzy matching to speed up similarity comparisons against large databases.
d837da3: Fixed a bug inapplyScale()where scaled quantities were incorrectly squared instead of multiplied for inline step ingredients, resulting in incorrect values (e.g., displaying800ginstead of400gwhen using--scale 2). The aggregated shopping list was unaffected.- Updated dependencies [
815ce8c] - Updated dependencies [
0aec389] - Updated dependencies [
e192fe2] - Updated dependencies [
404198a] - Updated dependencies [
8fca04c] - Updated dependencies [
d837da3] - Updated dependencies [
f5f1efe] - Updated dependencies [
8dc9c60] - Updated dependencies [
6eab9b3] - Updated dependencies [
e55940f] - Updated dependencies [
a46c24f] - Updated dependencies [
0ccfc99]- @gram-lang/analyzer@1.0.0-beta.2
- @gram-lang/kitchen@1.0.0-beta.2
- @gram-lang/renderer@1.0.0-beta.2
- @gram-lang/parser@1.0.0-beta.2
- @gram-lang/i18n@1.0.0-beta.2
1.0.0-beta.1
Minor Changes
-
a244341: Major overhaul of the documentation and playground infrastructure:- Documentation Rewrite & i18n: The documentation has been completely rewritten, thoroughly verified, and is now fully translated into French (in addition to the English version).
- Advanced Vue 3 Playground: The legacy playground has been removed and rebuilt from the ground up using Vue 3. This new version is directly integrated into the documentation and introduces powerful new features, including recipe scaling and baker's math.
-
a1e6fe9: refactor: renameisAsynctoisPassiveto align with domain terminologyTo better align the codebase with the actual domain model of a kitchen, the "asynchronous" timer concept has been completely renamed to "passive". This introduces the following breaking changes for tool builders:
- AST: The
TimerASTnode propertyisAsync: booleanis nowisPassive: boolean. - CSS: The
.timer.asyncclass generated by the renderer has been renamed to.timer.passive. - Kitchen Metrics: All internal variables and comments referring to
asyncbackground tasks have been updated topassive.
- AST: The
-
2476140: Added a centralizedScaleEnginein@gram-lang/kitchento make recipe scaling (--scale) and Baker's Percentage math safer and more consistent everywhere.- @gram-lang/kitchen: New
resolveScaleFactor()/applyScale()API validates a--scaletarget before computing a factor — rejecting fixed (@=) ingredients, relative quantities, ingredients only used inside a sub-recipe, ingredients inside an alternative-ingredient group, and ingredients split across incompatible units, with a clear error instead of a silently wrong number. A sub-recipe's own total (e.g. "2 lemons") is itself a valid scale target. Scaling is now a pure operation (never mutates the original recipe), and the compiled recipe now carries an explicitscaleFactorfield. Covered by a new unit test suite. - @gram-lang/analyzer: Fixed the
@*Baker's-reference auto-detection (it silently never matched before), and it now refuses to use a relative-quantity ingredient as the 100% base instead of computing bogus percentages. The enriched JSON AST now natively includes abakersPercentagefield for all ingredients if a reference ingredient is declared or passed via thebakersReferenceoption.convertUnit()now accepts an optional density (g/mL) to bridge mass ↔ volume conversions; newresolveIngredientDensity()andparseDensityOverrides()helpers resolve that density from a recipe'sdensities:frontmatter. Also includes a critical null-safety fix when parsing recipes containing standalone comments. - @gram-lang/renderer: Natively supports formatting Baker's Percentages provided by the analyzer (for HTML and Markdown exports, and the Playground), removing its legacy calculation logic. Fixed
gram print --bakers-math-onlyhaving no effect. - @gram-lang/cli: The CLI now cleanly acts as a presentation layer for Baker's Math, reading percentages directly from the AST. Added
--bakers-math,--bakers-reference, and--bakers-math-onlyflags to theview,printandexportcommands.--scale id=valuenow supports same-family unit conversion and cross-family conversion when a density is available; suggests the closest matching ingredient name on a typo; no longer shows corrupted comparison rows for an ingredient split across multiple units ingram scale.
- @gram-lang/kitchen: New
Patch Changes
-
8921d9d: Fixed several correctness bugs found during a documentation audit, and added alias-aware cross-unit shopping list aggregation.- @gram-lang/analyzer:
unit_weight-based conversions (e.g.@avocado{1}) were being double-divided byyield— the whole-unit weight is now correctly treated as Gross Mass, with Net Mass derived forward (Gross × yield), while explicit mass/volume entries keep deriving Gross backward (Net ÷ yield) as before. Optional ingredients (?) are no longer counted in nutrition totals. NewresolveCanonicalId()resolves an ingredient name/alias to its database key, and a newaggregateShoppingList()step re-groups the shopping list by canonical id — merging aliased ingredients (e.g.beurre/butter) and cross-unit quantities (e.g.100g+1 cup) into a single gram total whenever every entry resolves to a mass, falling back to separate entries flaggedmultiUnit: truewhen a density is missing. - @gram-lang/renderer: The HTML shopping list now clusters consecutive
multiUnit-flagged entries for the same ingredient under one heading with a "⚠️ Mixed units" badge, instead of listing them as unrelated lines. - @gram-lang/cli:
shopper's alias resolution now reuses@gram-lang/analyzer'sresolveCanonicalId()instead of a separate, duplicated alias map.
- @gram-lang/analyzer:
-
Updated dependencies [
a244341] -
Updated dependencies [
1eafa64] -
Updated dependencies [
a1e6fe9] -
Updated dependencies [
8921d9d] -
Updated dependencies [
fbe648e] -
Updated dependencies [
02d63ff] -
Updated dependencies [
6013e64] -
Updated dependencies [
e6cf842] -
Updated dependencies [
2476140] -
Updated dependencies [
3f7bc5d] -
Updated dependencies [
979f32b]- @gram-lang/analyzer@1.0.0-beta.1
- @gram-lang/renderer@1.0.0-beta.1
- @gram-lang/kitchen@1.0.0-beta.1
- @gram-lang/parser@1.0.0-beta.1
- @gram-lang/i18n@1.0.0-beta.1
1.0.0-beta.0
Major Changes
-
2dcd766: Introduction of the official GRAM CLI (@gram-lang/cli), a comprehensive command-line tool to manage, compile, and interact with your recipes.Project & Recipe Management:
- Project Setup:
gram initsafely scaffolds a.gramenvironment, including interactive AI provider setup (Google, OpenAI, Anthropic, Ollama) and secret management. - Automated Import:
gram importscrapes recipes from any URL and uses AI to flawlessly translate and convert them into native.gramsyntax. - Validation & Compilation:
gram checkinstantly validates syntax and database integrity.gram buildcompiles recipes to robust JSON with full physical and nutritional enrichment. - Smart Scaling & Diff:
gram scaledynamically resizes recipes (e.g.,--scale flour=300g) with a visual before/after comparison.gram diffprovides a semantic "git diff" for cooking, tracking changes in quantities, timings, and steps. - Export & Print:
gram printgenerates a beautifully typeset A4 HTML recipe card.gram exportconverts recipes to clean Markdown or static HTML. - Auto-formatting & Watcher:
gram formatautomatically enforces.gramlanguage styling standards.gram watchprovides real-time validation upon saving.
Interactive Cooking & Daily Use:
- Terminal Cooking Assistant (
gram cook): A step-by-step interactive TUI (Terminal User Interface) that guides you through the recipe, featuring a dynamic ingredient checklist and live background timers. - Smart Shopping List (
gram shop): Aggregates ingredients across multiple recipes, automatically converting volumes to masses and sorting them by supermarket aisle. - Recipe Search (
gram suggest): An alias-aware search engine to find recipes based on your available ingredients (e.g.,--with "butter, eggs" --without "milk"). - Rich Terminal Preview (
gram view): Renders recipes directly in the terminal with color coding, active timers, and nutritional tables.
AI-Powered Database Management (
gram db):- Smart Database Sync & Enrichment:
gram db syncautomatically tracks new ingredients across your project.gram db enrichuses AI to automatically fill in missing densities, unit weights, categories, and nutrition facts. - Semantic Linting & Conflict Resolution:
gram db lintuses AI to detect plural mistakes and semantic duplicates (e.g.,scallionvsgreen onion).gram db mergehandles conflicts when integrating external community databases.
- Project Setup:
Patch Changes
- Updated dependencies [
6e95e35] - Updated dependencies [
79105ce] - Updated dependencies [
babbb20] - Updated dependencies [
b2a235c] - Updated dependencies [
babbb20] - Updated dependencies [
caf1630] - Updated dependencies [
babbb20] - Updated dependencies [
2dcd766]- @gram-lang/analyzer@1.0.0-beta.0
- @gram-lang/kitchen@1.0.0-beta.0
- @gram-lang/renderer@1.0.0-beta.0
- @gram-lang/parser@1.0.0-beta.0
- @gram-lang/i18n@1.0.0-beta.0