✦ AI-native · v0.9.8

A programming language
built for AI.

Axon transpiles to JavaScript with unambiguous grammar, intent-first declarations, constraint-enforced types, and explicit effect tracking. Designed to be written and reasoned about by language models.

Less boilerplate means more of your codebase fits in a context window.

Get Started Live Demo GitHub
Install npm install -g axon-lang
0→JS
No runtime
8
Annotations
20%
Fewer tokens vs TS
81
Passing tests
Context Efficiency

Less boilerplate.
More code in context.

Axon programs use fewer tokens than equivalent TypeScript or Python — meaning AI models can reason about more of your codebase in a single prompt.

Data Pipeline
Axon
296 tok
TypeScript
392 tok
Python
300 tok
Pattern Matching
Axon
267 tok
TypeScript
305 tok
Python
292 tok
Error Handling
Axon
261 tok
TypeScript
345 tok
Python
319 tok
20%
fewer tokens vs TypeScript
9%
fewer tokens vs Python
Measured across 3 equivalent programs using the GPT-4 tokenizer (cl100k_base). The gap grows with program size — fewer filler tokens means signal reaches the model faster.

Methodology: same task, three languages, token-counted with gpt-tokenizer (cl100k_base). Comments included — they consume context too. Source →

Why Axon

Built different, on purpose.

🎯
Intent is a first-class declaration
@intent is not a comment — it's a machine-readable description embedded in JS output as JSDoc metadata. A downstream model can query what a function is for without reading its body.
🔒
Constraints at the type level
Types carry where predicates. Guard clauses are injected automatically at function entry — they are never forgotten, never optional.
Explicit effects
@pure, @total, and @effects are compiler-checked contracts. A pure function that touches console gets a warning. No surprises.
🌿
No classes, no this, no mutation
OOP exists to manage human working memory. AI doesn't have that problem. Axon is records + pure functions. Flat, scannable, provably safe.
Exhaustive by default
Tagged union pattern matches warn when not exhaustive. @exhaustive makes it an error. Every variant is either handled or the compiler tells you which one isn't.
🧪
Tests live next to code
@test "description" { expr } registers inline assertions. Run them with axon --test file.axn. No test framework, no config, no boilerplate.
📦
Multi-file modules, single output
import { fn } from "./module" and export fn split projects across files. axon --bundle resolves imports, topo-sorts modules, and emits one clean JS file. Zero runtime overhead.
Demos

See it in action.

📊
Axon Dashboard New
Live sprint tracker showcasing v0.9.5 features: enum status/priority, numeric separators, multi-line lambdas, and reactive tick simulation.
v0.9.5 enum · numeric literals · multi-line lambdas
Axon Playground
Live in-browser IDE — type Axon, see transpiled JS and live output instantly. 13 preloaded examples covering all language features.
v0.9 browser compiler · live eval · formatter
📜
Chronicle
Reactive fantasy kingdom log. store holds state, async fn advances the simulation, on...change re-renders reactively.
v0.8 store · async fn · await · on...change
🏪
The Bazaar
RPG item shop with generics, interfaces, and let infer. Filter, sort, and cart — all typed.
v0.7 generics · interfaces · let infer
🗺️
Dungeon Toolkit
Multi-file module demo. 4 .axn files bundled with axon --bundle. Procedural map generation.
v0.5 import · export · bundler
⚔️
RPG Adventure
50-battle dungeon crawl. Party management, equipment, 5 chapters, 4 tiers of gear.
1576 lines Axon · fully self-contained
🗡️
Combat Engine
Turn-based combat system showcasing match expressions, @memo, and param validation.
All v0.1–v0.3 features
🎛️
Music Library
Synthwave track browser with filtering and dynamic UI — built entirely in Axon.
Pipelines · .field shorthand · @memo
🕹️
Web Controls
Interactive UI components demonstrating string interpolation and constrained types.
v0.3 feature showcase
Roadmap

Almost there.

3 milestones stand between Axon and v1.0.

v0.1 ───────────────────── v1.0 88% complete
11 milestones shipped · v0.1 through v0.9.8
Foundation Guards Modules Safety Generics Async Tooling Ergonomics Compound Ops Stdlib While Loops
★ Now
v0.9.8
Control Flow
while loops with break and continue — completing Axon's iteration model.
while break continue
Next
v0.9.9
Polish & Docs
Final ergonomic fixes, improved error messages, and a complete docs site.
error messages docs site bugfixes
🎯 Goal
v1.0
Stable Release
Stable API, full test suite, production-ready tooling. Axon ships.
stable API npm publish full coverage