unified

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

Library
npm
v11.0.5
5,036 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
48 /100 Fair
Development Activity 8
Maintenance 32
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
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 5 days ago
TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
Python
55%
Other

authentik

Authentication · Security

25,758

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
Python 55%
TypeScript 36%
Updated 4 days ago
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,924

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 100%
Updated 1 weeks ago
Go
49%
MIT

Bytebase

Devops

14,512

An open-source database CI/CD and DevSecOps platform — schema migration review, GitOps-driven changes, data masking, and access control across MySQL, PostgreSQL, Oracle, Snowflake, MongoDB, and more.

View details
92
Repo Health
73
Technical
68
Dependency
Built with
Go 49%
TypeScript 42%
Updated 4 days ago
TypeScript
99%
Other

byterover-cli

AI Agents · AI Code Assistants · AI Memory

4,966

A portable memory layer for AI coding agents — curate structured project knowledge into a version-controlled context tree that syncs across tools, machines, and teammates.

View details
50
Repo Health
83
Technical
70
Dependency
Built with
TypeScript 99%
Updated 3 months ago
TypeScript
99%
AGPL 3.0

Cherry Studio

AI Assistants

52,202

All-in-one AI desktop client with 300+ assistants and multi-model support

View details
89
Repo Health
84
Technical
70
Dependency
Built with
TypeScript 99%
Updated 4 days ago
TypeScript
46%
Apache 2.0

claude-mem

AI Agents · AI Development · AI Memory

94,808

Give your AI coding agents persistent memory — claude-mem captures everything that happens during sessions, compresses it with AI, and surfaces the right context in every future session automatically.

View details
86
Repo Health
82
Technical
77
Dependency
Built with
TypeScript 46%
JavaScript 40%
Python 12%
Updated 5 days ago
TypeScript
98%
Apache 2.0

Cline

AI Code Assistants

69,455

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 98%
Updated 4 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