Analysis updated 2026-07-04 · repo last pushed 2026-06-27
Build a code refactoring tool that modifies a tree and prints clean TypeScript output.
Create a code editor feature that reorganizes or simplifies a user's JavaScript automatically.
Develop a custom compiler that transforms and emits readable code with sourcemaps for debugging.
Define custom language rules to generate code from a structured format for niche or experimental languages.
| sveltejs/esrap | tj/co-parallel | sophomoresty/bpc-fetch | |
|---|---|---|---|
| Stars | 136 | 109 | 104 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2026-06-27 | 2016-12-27 | — |
| Maintenance | Active | Dormant | — |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires understanding AST structures and defining or using existing language rules to generate output.
esrap is a tool that turns code structure back into readable code. Most tools parse code from text into a structured format (an Abstract Syntax Tree, or AST), but esrap does the opposite: it takes that structured tree and prints it out as actual code you can read and run. It also generates sourcemaps, which means if you ever need to debug the output, your tools can trace it back to the original source. At a high level, you hand esrap a JavaScript object that represents your code's logic, things like function calls, variables, and expressions, along with a set of rules for the language you are targeting. The tool then walks through that structure, piece by piece, and writes out the corresponding text. If your input structure includes location data from the original file, esrap automatically creates a sourcemap so tools like browsers and editors can connect the generated output back to where it came from. Anyone building developer tools, like code editors, compilers, or automated code refactoring apps, would find this useful. For example, if you build a tool that reorganizes or simplifies a user's JavaScript, you would parse their original code into a tree, modify that tree programmatically, and then use esrap to print the updated tree back into clean, readable TypeScript. It ships with built-in support for TypeScript and TSX, but you can also define your own custom languages and rules for printing any kind of structure you want. What stands out about the project is its minimalist philosophy. The README directly addresses why you might choose this over Prettier (a very popular code formatter): "Because it's ginormous." esrap is designed to be a lightweight, focused alternative for generating code from a structure you already have, rather than a heavy tool that parses and formats everything from scratch.
esrap takes a structured code tree (AST) and prints it back out as readable, runnable code with sourcemaps. It's a lightweight alternative to heavy formatters for generating code from structures you already have.
Mainly JavaScript. The stack also includes JavaScript, TypeScript, TSX.
Active — commit in last 30 days (last push 2026-06-27).
No license information was provided in the explanation, so default copyright restrictions may apply.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.