UNPKG

meld

Version:

Meld: A template language for LLM prompts

102 lines (96 loc) 4.22 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Meld Directives - meld</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Tektur:wght@800&family=Cousine:wght@400;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="/css/style.css"> <script src="/js/theme.js" defer></script> <script src="/js/terminal.js" defer></script> </head> <body> <header> <div class="container"> <a href="/" class="logo">meld</a> <nav> <ul> <li><a href="/" aria-current=&quot;page&quot;>Home</a></li> <li><a href="/docs/introduction/" >Docs</a></li> <li><a href="https://github.com/meldorg/meld">GitHub</a></li> </ul> </nav> </div> </header> <main> <div class="container"> <div class="docs-layout"> <aside class="docs-sidebar"> <nav> <h3>Documentation</h3> <ul class="nav-list"> <li><a href="/docs/introduction/" >Introduction</a></li> <li><a href="/docs/cli-usage/" >CLI Usage</a></li> <li><a href="/docs/sdk-usage/" >SDK Usage</a></li> <li><a href="/docs/variables/" >Variables</a></li> <li><a href="/docs/error-handling/" >Error Handling</a></li> <li><a href="/docs/grammar-reference/" >Grammar Reference</a></li> </ul> <h3>Directives</h3> <ul class="nav-list"> <li><a href="/docs/directives/" aria-current=&quot;page&quot;>Overview</a></li> <li><a href="/docs/directives/data/" >@data</a></li> <li><a href="/docs/directives/define/" >@define</a></li> <li><a href="/docs/directives/embed/" >@embed</a></li> <li><a href="/docs/directives/import/" >@import</a></li> <li><a href="/docs/directives/path/" >@path</a></li> <li><a href="/docs/directives/run/" >@run</a></li> <li><a href="/docs/directives/text/" >@text</a></li> </ul> </nav> </aside> <div class="docs-content"> <h1 id="meld-directives" tabindex="-1">Meld Directives</h1> <p>Directives are the core building blocks of Meld. They always start with an <code>@</code> symbol and must appear at the beginning of a line (no indentation). Each directive has a specific purpose and syntax.</p> <h2 id="available-directives" tabindex="-1">Available Directives</h2> <ul> <li><a href="./text.md">@text</a> - Define text variables</li> <li><a href="./data.md">@data</a> - Define structured data variables</li> <li><a href="./path.md">@path</a> - Define filesystem path variables</li> <li><a href="./embed.md">@embed</a> - Include content from other files</li> <li><a href="./run.md">@run</a> - Execute shell commands and include output</li> <li><a href="./import.md">@import</a> - Import variables and commands from other Meld files</li> <li><a href="./define.md">@define</a> - Create reusable commands</li> </ul> <h2 id="directive-placement-rules" tabindex="-1">Directive Placement Rules</h2> <ul> <li>Directives must appear at the start of a line (no indentation)</li> <li><code>@import</code> directives should generally appear at the top of the file</li> <li>Other directives can appear anywhere in the file</li> <li>Directives inside code fences (<code> </code>) are treated as plain text</li> </ul> <h2 id="common-syntax-elements" tabindex="-1">Common Syntax Elements</h2> <p>Most directives follow this general pattern:</p> <pre><code>@directive [required] optional </code></pre> <p>Where:</p> <ul> <li><code>@directive</code> is the directive name</li> <li><code>[required]</code> is required content in brackets</li> <li><code>optional</code> is additional optional content</li> </ul> <h2 id="next-steps" tabindex="-1">Next Steps</h2> <p>For detailed information on each directive, follow the links above or explore the individual documentation files.</p> </div> </div> </div> </main> <footer> <div class="container"> <p>&copy; 2025 meld - <a href="https://github.com/meldorg/meld">GitHub</a></p> </div> </footer> </body> </html>