gram/packages/cli
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-05 23:28:13 +02:00
..
src feat(cli): show when each step happens in view, export and print, and the sheet after the recipe 2026-10-04 17:52:10 +02:00
tests fix(i18n): call passive timers waits instead of rests 2026-10-05 23:28:13 +02:00
CHANGELOG.md chore(release): v1.3.0 2026-09-29 19:09:55 +02:00
package.json feat(cli): add gram plan, the --rests option and a calendar export 2026-10-04 12:46:26 +02:00
README.md chore: preparing for v1 release 2026-08-06 10:40:53 +02:00
tsconfig.json feat: add gram cook interactive TUI with timers, navigation and ink rendering 2026-06-27 18:07:03 +02:00
tsup.config.ts feat(cli): expose runPipeline as a public library export and fix docs that promised it 2026-07-17 16:24:11 +02:00

@gram-lang/cli

npm version License: GPL v3

Part of the Gram monorepo.

The official command-line tool for the Gram recipe language. Validate, compile, scale, diff, and manage your ingredient database directly from your terminal.


📚 General Documentation

For full syntax specifications, command reference, and best practices, please refer to the Gram Documentation.


🛠️ Installation

npm install -g @gram-lang/cli
# or
bun add -g @gram-lang/cli

This installs the gram executable globally.


⚡ Usage

# Initialize a new Gram project in the current directory
gram init

# Validate a recipe file
gram check my-recipe.gram

# Format a recipe file to canonical style
gram format my-recipe.gram

# Compile a recipe to JSON
gram build my-recipe.gram --output dist/

# Scale a recipe (e.g. double the quantities)
gram scale my-recipe.gram --scale 2

# Compare two versions of a recipe
gram diff v1.gram v2.gram

Run gram --help for the full list of commands.


🏗️ Structure

  • src/index.ts: CLI entry point, registers all subcommands.
  • src/commands/: One file per subcommand (init, check, format, build, scale, diff, import, db, ...).
  • src/core/: Shared building blocks (config loading, ingredient database, pipeline orchestration).
  • src/services/: Business logic backing the commands (formatting, scaling, importing, syncing).
  • src/ui/: Terminal rendering (tables, diffs, interactive views).
  • src/prompts/: AI system prompts used by the suggest command.

📄 License

This project is licensed under the GPL-3.0 License.