{"id":48754789,"url":"https://github.com/fabudde/nyxcode","last_synced_at":"2026-05-01T03:02:23.637Z","repository":{"id":350760301,"uuid":"1208153240","full_name":"fabudde/nyxcode","owner":"fabudde","description":"The AI-native programming language for the web. Designed for AI, optimized for tokens, built for humans.","archived":false,"fork":false,"pushed_at":"2026-04-23T20:35:46.000Z","size":96293,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T22:23:04.837Z","etag":null,"topics":["ai","ai-native","compiler","css-framework","developer-tools","dsl","frontend","nyx","open-source","programming-language","static-site-generator","template-engine","typescript","web-development","web-framework"],"latest_commit_sha":null,"homepage":"https://nyxcode.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabudde.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T22:23:14.000Z","updated_at":"2026-04-23T20:35:51.000Z","dependencies_parsed_at":"2026-04-18T14:01:53.480Z","dependency_job_id":null,"html_url":"https://github.com/fabudde/nyxcode","commit_stats":null,"previous_names":["fabudde/nyxcode"],"tags_count":124,"template":false,"template_full_name":null,"purl":"pkg:github/fabudde/nyxcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabudde%2Fnyxcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabudde%2Fnyxcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabudde%2Fnyxcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabudde%2Fnyxcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabudde","download_url":"https://codeload.github.com/fabudde/nyxcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabudde%2Fnyxcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32483406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-native","compiler","css-framework","developer-tools","dsl","frontend","nyx","open-source","programming-language","static-site-generator","template-engine","typescript","web-development","web-framework"],"created_at":"2026-04-13T00:55:15.662Z","updated_at":"2026-05-01T03:02:23.624Z","avatar_url":"https://github.com/fabudde.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦞 NyxCode\n\n**The AI-native programming language. One `.nyx` file = full-stack app.**\n\n[![npm](https://img.shields.io/npm/v/@fabudde/nyxcode)](https://www.npmjs.com/package/@fabudde/nyxcode)\n[![Tests](https://img.shields.io/badge/tests-616-brightgreen)](#)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n🌐 **[nyxcode.io](https://nyxcode.io)** · 🎨 **[demo.nyxcode.io](https://demo.nyxcode.io)** · 📊 **[NyxStatus.com](https://nyxstatus.com)** (378 lines of NyxCode)\n\n---\n\n## Why NyxCode?\n\nAI writes most code in 2026. But it still thinks in React, Vue, and raw HTML — languages designed for humans in the '90s. Every token costs money, time, and context window.\n\n**NyxCode: 3.5x fewer tokens than Next.js. 71% cheaper AI generation.**\n\n| | NyxCode | Next.js | Savings |\n|---|---------|---------|---------|\n| Lines | **378** | 1,069 | 65% fewer |\n| Files | **1** | 27 | 27x fewer |\n| Tokens | **~2,733** | ~9,476 | **3.5x fewer** |\n| AI cost | **~$0.20** | ~$0.71 | **71% cheaper** |\n\n*Real benchmark: [NyxStatus.com](https://nyxstatus.com) — identical full-stack SaaS, measured with cl100k_base.*\n\n## Quick Start\n\n```bash\nnpm i -g @fabudde/nyxcode\nnyx build app.nyx -o dist/        # Static site\nnyx build app.nyx                 # Full-stack (auto-detects tables/api)\nnyx dev app.nyx                   # Dev server + hot reload\nnyx add stripe                    # Add package + npm install\n```\n\n## Full-Stack in 16 Lines\n\n```nyx\ntable posts { title text required, body text, created auto }\nsecurity { table users, login email password, token jwt, protect /api/posts write }\ntheme { colors { primary #667eea, bg #0a0a12 } }\npreset card { bg card, r 12px, p 2rem }\n\npage / {\n  section style={ mw 800px, mx auto, p 2rem } {\n    h1 \"My Blog\"\n    form /api/posts auth { input title, submit \"Post\", success -\u003e reload }\n    data posts = get /api/posts auth\n    each posts -\u003e div preset=card { h3 .title, p .body }\n  }\n}\npage /register {\n  form /api/auth/register { input email, input password, submit \"Register\", success -\u003e redirect / }\n}\n```\n\nGenerates: `index.html`, `register/index.html`, AND `server.js` with 10 CRUD endpoints, JWT auth, and SQLite. Zero config.\n\n## React vs NyxCode\n\n**React — 20+ lines, 80+ tokens:**\n```jsx\nimport React, { useState, useEffect } from 'react';\nexport default function UserList() {\n  const [users, setUsers] = useState([]);\n  useEffect(() =\u003e {\n    fetch('/api/users').then(r =\u003e r.json()).then(setUsers);\n  }, []);\n  return (\n    \u003cdiv className=\"container\"\u003e\n      {users.map(u =\u003e (\n        \u003cdiv key={u.id} className=\"card\"\u003e\n          \u003ch3\u003e{u.name}\u003c/h3\u003e\u003cp\u003e{u.email}\u003c/p\u003e\n        \u003c/div\u003e\n      ))}\n    \u003c/div\u003e\n  );\n}\n```\n\n**NyxCode — 4 lines, 26 tokens:**\n```nyx\npage /users {\n  data users = get /api/users\n  each users -\u003e card { h3 .name, p .email }\n}\n```\n\nSame result. 76% fewer lines. 68% fewer tokens.\n\n---\n\n## v0.51 — Beautiful Defaults ✨\n\nEvery NyxCode page now ships with **professional defaults** — zero CSS required.\n\n🎨 **[See it live → demo.nyxcode.io](https://demo.nyxcode.io)**\n\n**What you get for free:**\n- **Typography** — `clamp()` fluid sizing, -0.025em letter-spacing on headings, 1.7 line-height on body text\n- **Buttons** — Rounded, hover states, active scale, disabled opacity\n- **Inputs/Select/Textarea** — Focus glow, placeholder styling, border transitions\n- **Select dropdowns** — Readable options on any background (light or dark)\n- **Links** — Smooth color transitions, underline-offset on hover\n- **Tables** — Collapsed borders, uppercase headers, consistent padding\n- **Code** — Monospace font stack, subtle background, padded pre blocks\n- **Details/Summary** — Styled accordion with border and open-state separator\n- **Lists** — Proper padding, disc/decimal markers\n- **Scroll** — Smooth scrolling\n- **Focus** — `:focus-visible` only (no ugly outlines on click)\n- **Selection** — Themed purple highlight\n- **Disabled** — 50% opacity + `pointer-events: none`\n\nAll defaults use `:where()` — zero specificity. Your styles always win.\n\n---\n\n## Features at a Glance\n\n### 🎨 Themes \u0026 Design Tokens\n```nyx\ntheme {\n  colors { primary #667eea, bg #0a0a12, surface #1a1a2e }\n  fonts { body Inter, source: google }\n  body { bg #0a0a12, c #f0eaff }\n  selection { bg rgba(155,142,196,0.3) }\n  defaults { a { c primary, td none } }\n}\npreset card { bg surface; r 12px; p 2rem }\n```\n\n### 📱 Responsive\n```nyx\ndiv grid=3@1 gap=2rem { ... }       # 3 cols → 1 col on mobile\nnav burger brand=\"MySite\" { ... }    # Accessible hamburger menu, zero JS\nstyle { @mobile { fs 0.9rem } }      # Built-in breakpoints\n```\n\n### 🧩 Components\n```nyx\ncomponent Card(title, desc, status=\"Active\") {\n  div preset=card {\n    h3 \"${title}\"\n    p \"${desc}\"\n    span \"${status}\"\n  }\n}\npage / { use Card(\"Hello\", \"World\") }\n```\n\n### ⚡ Client-Side Reactivity\n```nyx\npage / {\n  let count = 0\n  h1 \"Count: ${count}\"\n  button \"+\" @click { count += 1 }\n}\n```\n\n### 🔐 Auth \u0026 Security\n```nyx\nsecurity { table users, login email password, token jwt, protect /api/posts write }\npage /dashboard auth { ... }\na \"Login\" visible=guest\na \"Dashboard\" visible=auth\n```\n\n### 📊 Data Binding\n```nyx\ndata posts = get /api/posts auth {\n  loading -\u003e p \"Loading...\"\n  empty -\u003e p \"No posts yet\"\n  error -\u003e p \"Something went wrong\"\n}\neach posts -\u003e div { h3 .title, p .body }\n```\n\n### 🗃️ Database + Auto-Migrations\n```nyx\ntable posts {\n  title text required\n  body text\n  author [users]              # Foreign key → auto JOIN\n  created auto\n  category text default=\"general\"   # Add columns → auto-migrated\n}\n```\n\n### 🔗 Pipe — Declarative Logic Chains\n```nyx\npipe 'new-order' {\n  on api POST /api/orders auth\n  validate $body.email is email\n  query \"INSERT INTO orders (email, total) VALUES ($body.email, $body.total)\" as result\n  notify email to=$body.email subject=\"Order #${result.id}\"\n  respond 201 { id: $result.id, status: created }\n}\n```\n\n### 🎯 Native Icons\n```nyx\ntheme { icons: lucide }\nicon \"heart\" size=24\nh1 \"icon:map-pin Our Location\"\n```\n\n### 🎬 Animations\n```nyx\nkeyframes fadeIn {\n  from { op 0 }\n  to { op 1 }\n}\n```\n\n---\n\n## CSS Shorthands\n\n100+ shorthands — write less, ship faster:\n\n| Short | CSS | Short | CSS |\n|-------|-----|-------|-----|\n| `bg` | background | `c` | color |\n| `m` / `p` | margin / padding | `mx` / `px` | margin-inline / padding-inline |\n| `w` / `h` | width / height | `mw` / `mh` | max-width / max-height |\n| `fs` | font-size | `fw` | font-weight |\n| `r` | border-radius | `shadow` | box-shadow |\n| `d` | display | `pos` | position |\n| `op` | opacity | `tr` | transition |\n| `tf` | transform | `ai` | align-items |\n\n[Full list →](NYXCODE.md)\n\n## Tailwind Compatibility\n\nAlready know Tailwind? Use those classes in NyxCode — compiled to native CSS at build time, zero runtime:\n\n```nyx\ndiv class=\"flex items-center gap-4 p-6 rounded-xl bg-white shadow-lg\" {\n  h2 class=\"text-2xl font-bold text-gray-900\" \"Hello\"\n}\n```\n\n## Architecture\n\n```\n.nyx → Lexer → Parser → AST → Compiler → HTML + CSS + JS\n                                        → Express + SQLite (if backend detected)\n```\n\nSingle pipeline. No webpack. No bundler config. No `node_modules` for frontend.\n\n## NyxStatus — The Proof\n\n**378 lines. One file. Full SaaS.**\n\n[nyxstatus.com](https://nyxstatus.com) — Uptime monitoring with JWT auth, SQLite DB, CRUD API, background health checks, email alerts, cascade deletes, responsive dark theme. 100% NyxCode.\n\n## Versions\n\n| Version | Highlights |\n|---------|------------|\n| **v0.51.0** | **Beautiful Defaults** — Professional typography, interactive elements, focus management, select fix, all zero-config |\n| **v0.50.0** | **Zero Patches** — SolidJS reactivity, custom API routes, query aliases, when-inside-each, stdlib |\n| v0.39.0 | **The Language Release II** — Arrays, objects, loops, mutable vars, reactivity |\n| v0.32.0 | `pipe` — Declarative logic chains, 16 step types |\n| v0.30.0 | **The Language Release** — `let`, `action`, `on`, `env`, `email`, `use` |\n| v0.25.x | Body styles, keyframes, selection, element defaults |\n| v0.24.x | Burger nav, multi-file imports, Figma import |\n\n## Created By\n\n**Fabian Budde** 🐻 — Creator \u0026 Language Design\n**Nyx** 🦞 — Lead Developer \u0026 Compiler Engineering — [@NyxTheLobster](https://x.com/NyxTheLobster)\n**Tyto** 🦉 — Architecture \u0026 Security Review — [@heyTyto](https://x.com/heyTyto)\n**Kiro** 🐺 — QA \u0026 Technical Documentation\n\nA human and three AIs building the language that bridges both worlds.\n\n## License\n\nMIT\n\n---\n\n*NyxCode v0.51.0 — 616 tests — [npm](https://www.npmjs.com/package/@fabudde/nyxcode) — [NYXCODE.md](NYXCODE.md) (full AI context) — [demo.nyxcode.io](https://demo.nyxcode.io)*\n\n🦞\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabudde%2Fnyxcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabudde%2Fnyxcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabudde%2Fnyxcode/lists"}