rehype

A unified-based HTML processor with a large plugin ecosystem

Library
npm
v13.0.2
2,261 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 →
76 /100 Good
Architecture 80
Code Quality 78
Innovation 70
Learning Curve 75

rehype is a unified processor preconfigured with rehype-parse and rehype-stringify, giving you a ready-to-use pipeline for parsing HTML into a HAST syntax tree, running plugins to transform it, and serializing it back to HTML. It is a shortcut for unified().use(rehypeParse).use(rehypeStringify), part of the broader unifiedjs collective alongside remark (Markdown) and retext (prose).

As a monorepo, it also houses rehype-parse, rehype-stringify, and rehype-cli, and anchors a large third-party plugin ecosystem used for HTML linting, sanitization, minification, and static-site content transformation.

What You Get

  • A preconfigured unified processor combining rehype-parse and rehype-stringify
  • A HAST (HTML AST) syntax tree representation for programmatic HTML manipulation
  • Compatibility with the large ecosystem of rehype plugins (sanitize, minify, highlight, etc.)
  • TypeScript types for the processor and its syntax tree
  • A companion rehype-cli package for command-line HTML linting/formatting
  • Interop with remark (Markdown) via remark-rehype for Markdown-to-HTML pipelines

Common Use Cases

  • Transforming HTML content in static site generators (adding IDs to headings, autolinking, etc.)
  • Sanitizing untrusted HTML before rendering it in a web app
  • Linting and auto-formatting HTML files from the command line via rehype-cli
  • Building a Markdown-to-HTML pipeline together with remark and remark-rehype
  • Extracting or rewriting structured data from HTML documents programmatically

Under The Hood

Architecture - The root packages/rehype/index.js composes three sibling packages in the same monorepo: rehype-parse (HTML string to HAST tree), the unified engine (which runs registered plugins over the tree), and rehype-stringify (HAST tree back to an HTML string); rehype-cli sits alongside as a separate consumer of the same processor for command-line use, and the whole ecosystem interops with remark/retext via shared unist-family syntax trees.

Tech Stack - Pure ESM JavaScript ("type": "module") with hand-written .d.ts type declarations, managed as an npm/yarn workspaces monorepo (packages/rehype-parse, packages/rehype-stringify, packages/rehype, packages/rehype-cli), using c8 for coverage, remark-preset-wooorm for internal doc linting, and type-coverage to enforce TypeScript type completeness across the packages.

Code Quality - The monorepo has an extensive test/ directory with parse-error fixtures and syntax-tree assertions via hast-util-assert, plus CI workflows under .github/workflows; the actual rehype package itself is intentionally tiny (a ~10-line index.js), so most complexity and testing responsibility lives in the rehype-parse/rehype-stringify/unified dependencies it composes.

API Design - The processor exposes exactly the unified API (.use(), .process(), .processSync(), .parse(), .stringify()), so anyone familiar with unified/remark can use rehype immediately with zero new concepts to learn; the README explicitly steers users toward using unified directly when they don’t need both parse and stringify, favoring composability over a bespoke convenience API.

Used by 22 apps in this directory

Python
64%
Other

Keep

Automation · Devops · Monitoring

12,433

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
88
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 1 weeks ago
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,433

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
88
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 1 weeks ago
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 1 weeks 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 1 weeks 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 1 weeks 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 1 weeks ago
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,674

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
80
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,674

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
80
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
TypeScript
98%
Other

Orama

Developer Tools · Search

10,584

A complete, embeddable search engine and RAG pipeline running in browsers, servers, and edge networks with full-text, vector, and hybrid search in under 2KB.

View details
64
Repo Health
83
Technical
64
Dependency
Built with
TypeScript 98%
Updated 1 weeks 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