
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@intenttext/core
Advanced tools
Parser, HTML renderer, and document generation engine for IntentText (.it) — a structured interchange format for AI agents and humans.
npm install @intenttext/core
import { parseIntentText, renderHTML } from "@intenttext/core";
const doc = parseIntentText(`
title: Sprint Planning — Week 12
summary: Tasks and decisions for the week.
section: Action Items
task: Write migration script | owner: Sarah | due: Wednesday
task: Update CI pipeline | owner: Dev Team | due: Friday
done: Security audit complete
section: Notes
note: Next demo on Friday 3pm.
info: New staging environment is live.
`);
console.log(doc.version); // "1.4"
console.log(doc.blocks.length); // 8
const html = renderHTML(doc); // Styled HTML output
Pure TypeScript — no native or WASM dependency. Runs unchanged in Node and the browser. (The earlier Rust/WASM engine was removed in v4; the TS parser is the single canonical implementation. See SPEC.md.)
import { parseIntentText } from "@intenttext/core";
const doc = parseIntentText(source);
// Returns: IntentDocument { version, metadata, blocks, diagnostics }
import { renderHTML, renderPrint } from "@intenttext/core";
// Inline HTML fragment (for embedding in a page)
const html = renderHTML(doc);
// Full print-optimized HTML document with embedded CSS
// Reads font: and page: blocks for dynamic typography and layout
const printHtml = renderPrint(doc);
Resolve {{variable}} placeholders in a parsed document using a JSON data object.
import { mergeData, parseAndMerge } from "@intenttext/core";
const data = {
company: { name: "Acme Corp" },
invoice_number: "INV-2026-001",
total: "17,325 QAR",
};
// Merge after parsing
const merged = mergeData(doc, data);
// Parse + merge in one step
const result = parseAndMerge(templateString, data);
{{company.name}} → data.company.name{{items.0.description}} → data.items[0].description{{date}}, {{year}} resolved automatically{{page}}, {{pages}} become CSS page counters in renderPrintparseAndMerge(src, data, { missing: "blank" }) renders an
unresolved {{field}} empty — use for finished documents so an invoice never
prints a literal {{customer.phone}} (default "keep" aids template authoring)For real PDF bytes on a server (email attachments, archiving, batch runs) use the
opt-in companion @intenttext/pdf —
issuePDF(template, data, { signer }) runs merge → seal (tamper-evident SHA-256) →
PDF in one call. Core itself stays zero-dependency.
import { queryBlocks } from "@intenttext/core";
const result = queryBlocks(doc, "type:task owner:Ahmed sort:due:asc limit:5");
console.log(result.blocks); // Filtered & sorted blocks
.it documents are tamper-evident. sealDocument records a signer and freezes the
content with a SHA-256 hash; verifyDocument recomputes it and reports integrity.
import { sealDocument, verifyDocument } from "@intenttext/core";
const sealed = sealDocument(source, { signer: "Sarah Chen", role: "Legal" });
const result = verifyDocument(sealed.source);
console.log(result.intact); // true — false if a single character changed
The hashing rules are open and documented in SPEC.md, so anyone with the library can verify independently.
import { convertMarkdownToIntentText } from "@intenttext/core";
const itSource = convertMarkdownToIntentText(markdownString);
title: My Document
section: Chapter One
sub: Details
note: A standalone fact.
task: Do something | owner: Ahmed | due: Friday
done: Already finished | time: Monday
quote: Be concise. | by: Strunk
info: Informational callout.
---
agent: deploy-agent | model: claude-sonnet-4
step: Run tests | tool: ci.test | timeout: 300000
decision: Pass? | if: tests == "pass" | then: step-2 | else: step-3
gate: Approve deploy | approver: ops-lead | timeout: 24h
handoff: Transfer | from: deploy-agent | to: monitor-agent
emit: Complete | phase: deploy | level: success
font: | family: Palatino Linotype | size: 12pt | leading: 1.8
page: | size: A5 | margins: 25mm | footer: Page {{page}} of {{pages}}
title: *Chapter One*
dedication: To the builders who write before they code.
byline: Ahmed Al-Rashid | role: Author
epigraph: The tools we build shape the thoughts we can think. | source: Kenneth Iverson
toc: | depth: 2 | title: Contents
section: Introduction
caption: Figure 1 — The parsing pipeline
footnote: 1 | See chapter 3 for details.
break:
| Style | Syntax |
|---|---|
| Bold | *text* |
| Italic | _text_ |
| Strikethrough | ~text~ |
| Code | `code` |
| Highlight | ^text^ |
| Inline note | [[text]] |
| Footnote ref | {1} |
| Styled span | [text]{ color: #c00; weight: bold } — style part of a line |
renderHTML(doc, { theme: "corporate" }) (8 built-in document classes)style: rules (v4.3) — house styling per block type, declared once:
style: section | color: #0a7 | weight: 600
(targets: title, summary, section, sub, text, quote, callout/info, table,
table-header, metric, contact, divider; same constrained style keys — never
arbitrary CSS, content stays queryable)text: hi | color: red,
[word]{ size: 1.2em } (most-specific wins)node cli.js document.it # Parse to JSON
node cli.js document.it --html # Render HTML
node cli.js template.it --data data.json --html # Merge + render
node cli.js template.it --data data.json --print # Print-optimized HTML
node cli.js template.it --data data.json --pdf out.pdf # PDF via Puppeteer
869 tests covering parser, renderer, query engine, converters, agentic blocks, document generation, trust/seal, and round-trip serialization.
pnpm test
MIT
FAQs
IntentText Parser, HTML Renderer, and Converters
We found that @intenttext/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.