Introduction

The AI-native programming language for the web.

NyxCode compiles to HTML, CSS, and JavaScript. It was designed for one purpose: let AI generate websites with maximum efficiency.

Every syntax decision optimizes for token count. Every feature exists because websites need it.

Why NyxCode?

AI code-generation platforms burn tokens outputting React boilerplate. NyxCode cuts that by 60-70%. Same website. Fraction of the cost.

page / { h1 "Hello World" p "Built with NyxCode." link "Learn more" href="/docs" }

Five lines. Compiles to a complete HTML page with DOCTYPE, charset, viewport meta, and clean markup.

Features

โšก

Reactive State

state, computed, effect โ€” signal-based reactivity without a virtual DOM.

๐Ÿงฉ

Components

Props, scoped styles, slots. Define once, compose everywhere.

๐ŸŽจ

3-Tier Styling

Inline, style blocks (hover/focus/before/after/@mobile), or raw CSS.

๐Ÿ”€

SPA Routing

Multiple pages, one file. Client-side navigation, zero config.

๐Ÿ”’

Security

No eval(). State allowlist. Auto HTML escaping.

๐Ÿ“ฆ

Zero Dependencies

npm install, one command build. Nothing else needed.

Benchmarks

Real benchmark โ€” full landing page with hero, features, counter, footer:

NYXCODE

132

lines ยท 3.8 KB

HTML + CSS + JS

368

lines ยท 11.4 KB

64% fewer lines. 67% fewer bytes. Identical output.

Installation โ†’