๐Ÿฆž NyxCode
โ˜ฐ
v0.31.5 370 tests โœ“ MIT AI-Native

One file.

Full-stack app.

82% fewer tokens.

NyxCode is a token-efficient language designed for AI. Database, auth, API, and frontend โ€” all in a single .nyx file.

bash

# Install globally

$ npm i -g @fabudde/nyxcode

$ nyx build app.nyx

โ†’ Full-stack app generated ๐Ÿฆž

โญ Star on GitHub ๐Ÿ“ฆ npm Docs โ†’
Side-by-side

Same app. Fewer tokens.

A full-stack blog with auth, database, and CRUD. Measured with cl100k_base tokenizer.

NyxCode ยท app.nyx 169 tokens
table posts { title text required, body text, created auto }
security { login email password, token jwt, protect /api/posts write }
theme { colors { primary: #667eea } }

page / {
  h1 "My Blog"
  form /api/posts auth {
    input title, input body
    submit "Post", success -> reload
  }
  data posts = get /api/posts
  each posts -> div {
    h3 .title, p .body
  }
}
Next.js ยท 8 files 964 tokens
// prisma/schema.prisma
model Post {
  id      Int      @id @default(autoincrement())
  title   String
  body    String
  author  User     @relation(...)
}

// app/api/posts/route.ts
import { prisma } from "@/lib/db";
import { getServerSession } from "next-auth";

export async function POST(req: Request) {
  const session = await getServerSession();
  if (!session) return NextResponse.json(
    { error: "Unauthorized" }, { status: 401 });
  const body = await req.json();
  return NextResponse.json(
    await prisma.post.create({ data: body }));
}

// + auth/[...nextauth].ts (180 tokens)
// + app/page.tsx (220 tokens)
// + components/PostForm.tsx (140 tokens)
// + middleware.ts, tailwind.config.ts, ...
// ... 800+ more tokens across 8 files

82%

fewer tokens vs Next.js

25%

fewer tokens vs Tailwind

1

file, zero config

What's inside

Everything you need. Nothing you don't.

Full-stack primitives, designed for a world where most code is written by AI.

โšก

Full-stack in 1 file

Tables, auth, API routes, and UI in a single .nyx file. Compiles to Express + SQLite + static HTML.

๐ŸŽจ

Design tokens

Themes with colors, spacing, radius, shadows, fonts. Dot-notation refs. 7 built-in presets.

๐Ÿค–

AI-native

82% fewer tokens than Next.js. Shorthand properties everywhere. Built for Claude, GPT, and Gemini.

๐Ÿ”

Zero-JS burger nav

One attribute โ†’ responsive mobile nav. Pure HTML5 details/summary. No runtime, no JavaScript.

๐ŸŽญ

Figma import

Import Tokens Studio or W3C DTCG JSON directly. Colors, spacing, shadows โ€” validated and security-audited.

๐Ÿงฑ

Components & presets

Define once, use everywhere. Parameterized components with defaults. Style presets = reusable CSS classes.

๐Ÿ”’

Security built-in

JWT auth, bcrypt, rate limiting, SQL injection guards, TOCTOU-safe file loading. Audited 9.5/10 by Tyto ๐Ÿฆ‰.

๐Ÿ“

Multi-file modules

use "./file.nyx" imports for bigger projects. nyx flatten collapses back to one file.

๐Ÿš€

Zero config

No webpack, no Vite, no Babel. Compile with nyx build. Dev server with hot reload built in.

Live example

A full-stack blog. 16 lines.

Database. Auth. JWT. 10 CRUD endpoints. Login, register, and a post feed. Really.

blog.nyx 169 tokens
table posts { title text required, body text, created auto }
security { table users, login email password, token jwt, protect /api/posts write }
theme { colors { primary: #667eea, bg: #0a0a12, card: #1a1a2e } }
preset card { bg card, r 12px, p 2rem }

page / {
  section style={ mw 800px, mx auto, p 2rem } {
    h1 "My Blog"
    form /api/posts auth { input title, submit "Post", success -> reload }
    data posts = get /api/posts auth
    each posts -> div preset=card { h3 .title, p .body }
  }
}
page /register {
  form /api/auth/register {
    input email, input password, submit "Register", success -> redirect /
  }
}
โœ“ 10 CRUD endpoints โœ“ JWT auth โœ“ SQLite schema โœ“ Bcrypt hashing โœ“ Multi-page routing

v0.31.5

Current release

370

Tests passing

9.5/10

Security score

0

Runtime deps

Ready?

Ship a full-stack app today.

Install in one command. Deploy in one file. No framework bingo.

$ npm i -g @fabudde/nyxcode

$ nyx build app.nyx

โญ Star on GitHub Docs โ†’