Other tools just dump raw files into a prompt. This wastes 80% of your AI tokens on static Tailwind classes and boilerplate. urai-ecma is an AST compiler built in Rust that cleans your code before Claude or GPT-4o sees it: • Prunes heavy Tailwind CSS while keeping dynamic styles • Keeps React hooks and props while removing loop clutter • Auto-maps Next.js and NestJS API routes • Cuts prompt tokens by 80% to slash API costs and improve AI reasoning.
Hey everyone! Maker of urai-ecma here. Really excited to launch this today, and I wanted to share the story behind it.
What inspired me: A while back, I was building an agentic AI Chrome extension using local Ollama models. When I fed my codebase into the model, the context blew up to 209,757 tokens. The model took forever to respond, choked on memory, and hallucinated because it got lost in the middle of all that text.
The name URAI (உரை) comes from an ancient Tamil literary tradition where scholars wrote commentaries to distill vast, complex epics into clear structural meaning. Modern Next.js and React codebases are like modern epics. An LLM doesn't need 50,000 lines of raw syntax—it just needs a clean, structural commentary.
The problem I wanted to solve: When I analyzed those 209k tokens, I realized over 50% were just static Tailwind CSS strings, and another 20% were repetitive boilerplate loops. Only about 10% was actual architectural logic (props, hooks, state, and API routes). Existing tools just dump raw text into a file, which wastes money and degrades AI reasoning.
How the approach evolved: 1. I started with simple regex scripts to strip classes, but regex is brittle and broke dynamic styling like clsx, cn(), and conditional ternaries. 2. I realized code must be parsed as an Abstract Syntax Tree (AST). I rewrote the engine in Rust using SWC so it safely strips static styling while preserving all dynamic logic. 3. To handle large enterprise monorepos, I added Rayon multi-threading to process files in parallel across all CPU cores. 4. Finally, I added Next.js/NestJS route table discovery, React component blueprints, and local Ollama summarization backed by Foyer disk caching (Zstd) so repeated runs finish in milliseconds.
The result: On that exact same 209,757-token project, urai-ecma compressed the prompt down to 36,153 tokens—an 83% reduction. The model gave instant, precise answers without hallucinating.
You can try it out via npm or cargo: npm install -g urai-ecma (or: cargo install urai-ecma)
Run "urai-ecma" on your Next.js or React project, and paste your token savings report in the replies below! I'll be here all day to answer questions, fix edge cases, and hear your ideas.
Hey everyone! Maker of urai-ecma here. Really excited to launch this today, and I wanted to share the story behind it.
What inspired me:
A while back, I was building an agentic AI Chrome extension using local Ollama models. When I fed my codebase into the model, the context blew up to 209,757 tokens. The model took forever to respond, choked on memory, and hallucinated because it got lost in the middle of all that text.
The name URAI (உரை) comes from an ancient Tamil literary tradition where scholars wrote commentaries to distill vast, complex epics into clear structural meaning. Modern Next.js and React codebases are like modern epics. An LLM doesn't need 50,000 lines of raw syntax—it just needs a clean, structural commentary.
The problem I wanted to solve:
When I analyzed those 209k tokens, I realized over 50% were just static Tailwind CSS strings, and another 20% were repetitive boilerplate loops. Only about 10% was actual architectural logic (props, hooks, state, and API routes). Existing tools just dump raw text into a file, which wastes money and degrades AI reasoning.
How the approach evolved:
1. I started with simple regex scripts to strip classes, but regex is brittle and broke dynamic styling like clsx, cn(), and conditional ternaries.
2. I realized code must be parsed as an Abstract Syntax Tree (AST). I rewrote the engine in Rust using SWC so it safely strips static styling while preserving all dynamic logic.
3. To handle large enterprise monorepos, I added Rayon multi-threading to process files in parallel across all CPU cores.
4. Finally, I added Next.js/NestJS route table discovery, React component blueprints, and local Ollama summarization backed by Foyer disk caching (Zstd) so repeated runs finish in milliseconds.
The result:
On that exact same 209,757-token project, urai-ecma compressed the prompt down to 36,153 tokens—an 83% reduction. The model gave instant, precise answers without hallucinating.
You can try it out via npm or cargo:
npm install -g urai-ecma
(or: cargo install urai-ecma)
Run "urai-ecma" on your Next.js or React project, and paste your token savings report in the replies below! I'll be here all day to answer questions, fix edge cases, and hear your ideas.