fml-sdk
v0.1.2
Published
Freeform Markup Language (FML) SDK for structured AI prompting using XML-style tags and variables.
Maintainers
Readme
FML: Freeform Markup Language v0.1
Overview
Freeform Markup Language (FML) is a lightweight, expressive markup language designed to write prompts for large language models (LLMs) using structured XML-style tags and Mustache-style variables. It’s designed for developers who want readable, reusable, and modular prompts without the chaos of raw strings.
Features
- 🧩 Mustache-style variable interpolation:
{{ name }} - 🔁
<include>tag for nesting other.fmlfiles - 🧪 Simple, testable, and transformable prompt formats
📦 Installation
npm install fml-sdkSyntax
Tags
FML uses angle-bracketed XML-style tags:
| Tag | Purpose |
| ---------------------- | -------------------------- |
| <include src="..."/> | Imports other .fml files |
<system>
You are a helpful assistant.
</system>
<user>
Hello, what can you do?
</user>
<assistant>
I can help with a variety of tasks including answering questions and writing code.
</assistant>Variables
Use {{ variable_name }} syntax for dynamic substitution:
Tell me a story about {{ animal }} who learns to {{ skill }}.File Composition
Modularize prompts using <include>:
<include src="common/system-prompt.fml" />
Hello there!Example
import { parseFML } from 'fml-sdk';
const message = await parseFML('onboarding-prompt.fml', {
name: 'David'
});File Format
- Extension:
.fml - UTF-8 encoding
Built with AI and ❤️ by David Pichsenmeister to make prompting a bit more human.
