| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .. | ||
| media | ||
| snippets | ||
| src | ||
| tests | ||
| .gitignore | ||
| .vscodeignore | ||
| build.cjs | ||
| CHANGELOG.md | ||
| language-configuration.json | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Gram - Recipe Language
Part of the Gram monorepo · Documentation · Playground
Editor support for the Gram recipe DSL in VS Code and Open VSX editors (VSCodium, Cursor, Windsurf, Positron). Bundles @gram-lang/language-server with real-time diagnostics, autocomplete, canonical formatting, and side-by-side Live Preview and Run Sheet views. Nothing else to install.
Features
- Live Preview (
Gram: Live Preview): side-by-side rendered recipe with ingredients, calculated quantities, baker's percentages, and nutrition (Gram: Macrosjumps to the table). Scale and stock controls at the top let you change portions, scale factor, a target ingredient weight, the baker's reference, or already-made@useimports for the current sitting without editing the file. - Run Sheet (
Gram: Run Sheet): day-by-day kitchen plan showing each visit to the kitchen, what to take out, and background rests. Set a Served at time (usingtimezoneandavailabilityfrom.gram/config.yaml) or use When to serve? to find serving times that fit your schedule. - Views and inspectors (
Gram: Show View...): open any view (recipe, run sheet) or technical inspector (composed AST, compiled JSON as text or an interactive tree). Open panels follow the active.grameditor, update live, and keep their last valid rendering under a banner while the recipe has errors. - Diagnostics and refactoring: real-time syntax and semantic checks (missing references, unused declarations, circular
@useimports), symbol rename (F2across references, percentages, and unit ratios), go to definition, find references, document outline, and folding. - Autocomplete and hover: suggestions for ingredients from your local YAML database, units, cookware, intermediate references, and
@usepaths; hover info for nutrition, scaled quantities, duration breakdowns, and unit ratios. - Formatting, quick fixes and hints: canonical formatting (
Format Document/Format on Savevia@gram-lang/format), quick fixes, volume-to-mass conversions, total-time inlay hints, and CodeLens actions. - Offline and deterministic: the bundled language server runs locally with no network calls and no AI.
Run sheet and serving times
Autocomplete, hover and diagnostics
Installation
- VS Code: install Gram - Recipe Language from the Extensions view (
Ctrl+Shift+X/Cmd+Shift+X) or the VS Code Marketplace. - VSCodium, Cursor, Windsurf, Positron: install from Open VSX.
Settings
The gram.* settings control what the preview and run sheet display, using the same values and defaults as the CLI and the Playground:
- Display and scheduling:
gram.miseEnPlace,gram.rests,gram.comments,gram.stepQuantities,gram.nutritionBasis,gram.bakersMathOnly,gram.timeFormat. - Analysis and database:
gram.ingredientDatabase.path,gram.bakersMath,gram.massStandardization,gram.yieldCalculation,gram.nutritionEstimation.
Changes apply immediately to every open recipe. Project-level timezone, availability, and database settings are read from .gram/config.yaml. See the VS Code extension documentation for full details.
Building from source
- Clone the Gram monorepo and move to the repository root.
- Install dependencies and build all packages with Bun:
bun install bun run build - Package the extension with
vsce(npm install -g @vscode/vsceif needed):cd packages/vscode-extension vsce package - In VS Code, open the Extensions view (
Ctrl+Shift+X/Cmd+Shift+X), click...at the top right, select Install from VSIX..., and pick the generated.vsixfile.
Issues and license
Bug reports and feature requests are tracked on Forgejo.
Licensed under the GPL-3.0 license.


