unified

Parse, inspect, transform, and serialize content through syntax-tree plugins.

Library
npm
v11.0.5
5,043 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
58 /100 Fair
Development Activity 44
Maintenance 36
Community 52
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
88 /100 Excellent
Architecture 90
Code Quality 92
Innovation 88
Learning Curve 60

unified is the core interface for processing content as structured data using abstract syntax trees. It ties together a parser, a chain of plugin transformers, and a compiler into a single processor, so you can turn text into a tree, manipulate that tree with reusable plugins, and serialize it back out.

As the foundation of the remark (markdown), rehype (HTML), and retext (natural language) ecosystems, unified powers tools like MDX, Gatsby, Docusaurus, and Prettier, and is used in over a million projects on GitHub. You pick and choose plugins to build custom content pipelines without needing to understand the underlying tree formats.

What You Get

  • A single unified() processor factory that chains parse, transform, and stringify phases
  • A .use() plugin API for composing reusable transformers and presets
  • Both async (process) and sync (processSync) processing, plus lower-level parse, run, and stringify steps
  • Integration with the remark, rehype, and retext ecosystems and 500+ plugins
  • First-class TypeScript types for parsers, compilers, plugins, and processors

Common Use Cases

  • Building markdown-to-HTML pipelines with remark and rehype plugins
  • Linting and transforming prose or documentation as part of a build
  • Bridging between content formats (markdown, HTML, natural language) in one workflow

Under The Hood

Architecture — unified’s runtime lives in a single lib/index.js that defines a CallableInstance-based unified function (see lib/callable-instance.js), where each processor is both callable and an object carrying parse, run, stringify, process, and use. Calling a processor clones its frozen configuration into a fresh descendant, so ancestors are never mutated; freeze() seals a processor before export. The three phases — parse (text → tree via a Parser), run (tree → tree via a trough pipeline of Transformers), and stringify (tree → output via a Compiler) — are orchestrated through the trough library, which sequences sync and async transformers and threads a vfile for data, metadata, and messages.

Tech Stack — Pure ESM JavaScript (Node 16+), typed entirely through JSDoc with a hand-written index.d.ts. Runtime dependencies are minimal and focused: trough (middleware pipeline), vfile (virtual file format), bail, extend, is-plain-obj, devlop (dev-only assertions), and @types/unist. Build and quality tooling includes TypeScript project references, tsd for type tests, c8 for 100% coverage enforcement, xo/prettier for linting, and type-coverage pinned at 100%.

Code Quality — Exceptionally rigorous: the test suite under test/ covers every phase and edge case across core.js, freeze.js, parse.js, process.js, run.js, stringify.js, use.js, and more, and CI enforces 100% code coverage and 100% type coverage. Error handling is explicit through bail and vfile messages, naming is consistent, and the public surface is fully documented with inline JSDoc that doubles as the TypeScript API.

API Design — The API is deliberately tiny and highly ergonomic: unified().use(plugin, options).process(file) reads almost like prose, and the same processor exposes lower-level parse/run/stringify for advanced control. Plugins are just functions returning an optional transformer, making the extension model trivial to learn. The extensive readme, worked examples, and precise TypeScript types keep boilerplate near zero, though understanding syntax trees and the plugin lifecycle presents a moderate conceptual learning curve.

Used by 44 apps in this directory

TypeScript
96%
MIT

likec4

Developer Tools · Devops

5,954

Define your software architecture as code and get always up-to-date, interactive C4 diagrams generated automatically from a DSL.

View details
89
Repo Health
83
Technical
78
Dependency
Built with
TypeScript 96%
Updated 6 days ago
TypeScript
98%
Other

LobeHub

AI Assistants · Automation · Productivity

83,455

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
44%
Other

Magic

AI Agents · Automation · Low Code Platforms

5,055

Magic is an enterprise-grade open-source AI agent platform combining a generalist AI agent, workflow engine, IM, and collaborative office system for running an AI-powered digital workforce.

View details
68
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 44%
PHP 32%
Updated 2 months ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

29,041

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
90
Repo Health
73
Technical
65
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
87%
MIT

medusa

Ecommerce

36,897

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
94
Repo Health
87
Technical
63
Dependency
Built with
TypeScript 87%
JavaScript 12%
Updated 1 weeks ago
TypeScript
53%
MIT

MentraOS

AI Development · Developer Tools

2,391

The open source operating system and SDK that lets developers build one app and run it across smart glasses from Even Realities, Vuzix, Mentra Live, and more.

View details
92
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 53%
Java 16%
Updated 6 days ago
TypeScript
65%
Other

NocoDB

Databases · Low Code Platforms · No Code Platforms

65,340

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
91
Repo Health
77
Technical
63
Dependency
Built with
TypeScript 65%
Vue 30%
Updated 6 days ago
TypeScript
96%
Apache 2.0

OneUptime

Monitoring

7,751

The complete open-source observability platform that replaces PagerDuty, Datadog, Sentry, and StatusPage with a single self-hostable system.

View details
91
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 96%
Updated 6 days ago
Python
64%
Other

Onyx

AI Agents · AI Assistants · Knowledge Management

32,935

Self-hostable AI platform with agentic RAG, 50+ connectors, deep research, code execution, and support for every major LLM provider.

View details
92
Repo Health
83
Technical
68
Dependency
Built with
Python 64%
TypeScript 26%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers