gracile-cli 0.1.0

Command-line interface for the Gracile templating engine
gracile-cli-0.1.0 is not a library.

gracile-cli

gracile-cli

Command-line interface for the Gracile templating engine. Render templates directly from the terminal with a JSON or TOML data file — no code required.

Installation

cargo install gracile-cli

Usage

# Render a template with data from a JSON file
gracile render template.html --data data.json

# Render with inline JSON data
gracile render template.html --data '{"name": "World"}'

# Write output to a file
gracile render template.html --data data.json --output out.html

# Enable strict mode (undefined variables are errors)
gracile render template.html --data data.json --strict

Example

# template.html
Hello, {name}!

{#if items}
  {#each items as item}
    - {item}
  {/each}
{:else}
  Nothing here.
{/if}
{ "name": "World", "items": ["one", "two", "three"] }
gracile render template.html --data data.json