Quick Start

You can write KERN directly, but the fastest workflow is to tell an AI what you want, inspect the .kern it drafts, compile it, and review the generated output.

The workflow

1

Describe what you want

In plain English to any LLM (Claude, GPT, Gemini, etc.)

2

LLM writes .kern

The AI generates a compact, structured source file you can read before compiling

3

You compile

kern dev app.kern --target=nextjs and you have production code

4

Review & ship

kern review catches bugs. You deploy.

1. Install KERN

npm install -g @kernlang/cli

2. Prompt your LLM

Open Claude, ChatGPT, or any LLM. Give it the KERN spec and tell it what to build:

You are an expert in KERN, a compiled UI language.
Write a .kern file for a SaaS landing page with:
- Dark theme, orange accents
- Hero section with headline and two CTA buttons
- 3-column feature grid
- Pricing section with Free and Pro tiers
- Footer with links

Use the KERN spec from https://kernlang.dev/llm/spec.kern

The LLM generates a complete .kern file. You still review the source, because the compact format is meant to stay human-readable.

3. Save and compile

Paste the LLM output into a file and compile:

# Save the LLM output
pbpaste > landing.kern

# Compile to Next.js (watches for changes)
kern dev landing.kern --target=nextjs --outdir=app/

# Or compile to Vue
kern dev landing.kern --target=vue --outdir=src/

# Or compile to Express API
kern dev api.kern --target=express --outdir=src/

4. Review the output

Before shipping, run kern review on the generated code to catch bugs the AI might have introduced:

kern review app/ --recursive

5. Iterate with the LLM

Want changes? Just tell the AI:

"Add a testimonials section between features and pricing.
Make the hero headline bigger. Add a dark/light mode toggle."

The AI updates the .kern file. You recompile. That's it.

Why not just ask the AI to write React directly?

  • Smaller output target — KERN is compact and regular, so the model emits less framework boilerplate.
  • 15 targets from 1 source — Same .kern can compile to web, backend, terminal, MCP, Python, Go, and library targets.
  • Compiler diagnostics — The compiler catches structural errors before you run the generated app.
  • Review built in — 233 registry entries plus semantic analysis help catch security, dead logic, framework, and generated-code mistakes.

Try it now