nlang • Executable Extensions

Executable Extensions

Your file extensions are the build pipeline. .html.md → LLM → index.html

Markdown prompts → generated artifacts
JS/TS executors in Node.js
Composable dependency-driven builds
How it works

Build logic encoded directly in filenames

nlang turns chained extensions into execution rules, so generation feels native to the filesystem instead of hidden in custom scripts.

1

Name it

The final extension selects the executor. A file like index.html.md means “produce HTML by executing Markdown.”

index.html.md → executor: .md
2

Write it

Markdown becomes an LLM prompt, while JavaScript or TypeScript runs in Node.js with full access to fetch, transform, and generate files.

.md → LLM   •   .js/.ts → Node
3

Build it

Run a single command and nlang resolves dependencies, executes sources in order, and writes clean build output into dist/.

nlang build → dist/index.html
Extension matrix

Source file → executor → output

Each chained extension communicates both the target artifact and the runtime that should generate it.

Source File Executor Output
index.html.md Markdown → LLM index.html
blog.json.ts TypeScript → Node.js blog.json
sitemap.xml.js JavaScript → Node.js sitemap.xml
feed.xml.md Markdown → LLM feed.xml
users/[slug].html.ts TypeScript → Node.js users/[slug].html
report.csv.js JavaScript → Node.js report.csv
landing.html.md Markdown → LLM landing.html
api/openapi.json.ts TypeScript → Node.js api/openapi.json
Features

A file-native generation system

nlang combines prompt-driven generation, executable transforms, dependency orchestration, and scheduled automation in one minimal model.

🤖

LLM-Powered

Markdown files become prompts sent to any OpenAI-compatible API, letting content, templates, docs, and pages compile from natural language instructions.

JS/TS Executor

Use full Node.js for data fetching, transforms, generation, API calls, filesystem work, or any custom logic too precise for a prompt.

🔗

Dependency Graph

@{path} references resolve in order, so files build their dependencies first and generated outputs can safely compose other artifacts.

📁

Variables

[name] in paths plus a JSON array enables templated multi-output builds for slugs, locales, categories, product pages, and more.

Cron Schedules

Add trigger frontmatter and nlang can generate GitHub Action schedules automatically for periodic rebuilds and refreshed content.

💾

Smart Caching

Content-hash plus TTL caching skips unchanged files, reduces repeated LLM calls, and keeps builds fast and cost-aware.

Quick start

Go from source file to generated site in 4 steps

A minimal setup for creating your first executable extension pipeline.

1. Install nlang copy hint
Terminal
npm install -g
# install globally
npm install -g nlang-cli
2. Initialize a project copy hint
Terminal
create config scaffold
# inside your project folder
nlang init
3. Create an executable source file copy hint
index.html.md
prompt → HTML
---
model: gpt-4o-mini
---

Create a clean landing page in semantic HTML for my product.
4. Build to dist/ copy hint
Terminal
generate output
# compile sources to outputs
nlang build

# result
dist/index.html
Code example

A realistic .html.md workflow

Prompt a page with frontmatter configuration, pull in design tokens as a dependency, and generate a concrete artifact.

landing/index.html.md
source file
---
model: gpt-4o-mini
temperature: 0.2
trigger: 0 8 * * 1
---

Create a polished, single-file marketing page for nlang.

Requirements:
- Output valid semantic HTML5 only
- Use the design system from @{design-tokens.json}
- Include a hero, feature grid, quick start, and footer
- Tone: technical, premium, minimal
- Keep copy concise and developer-focused

Use this product message:
"Executable Extensions: your file extensions are the build pipeline."
Conceptual build output
generated artifact
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>nlang — Executable Extensions</title>
</head>
<body>
  <main>
    <section>
      <h1>Executable Extensions</h1>
      <p>Your file extensions are the build pipeline.</p>
    </section>
  </main>
</body>
</html>

When nlang build runs, dependencies like @{design-tokens.json} are resolved first, then the prompt is executed, cached, and written to dist/landing/index.html.