v0.3.2 now on npm
Kyser

A language built from
scratch, in TypeScript.

Kyser is a dynamically typed, interpreted language written entirely in TypeScript. Turing-complete, zero setup write and run Kyser code right here.

$ npm install -g kyser-lang

sudo required on macOS/Linux

Lexer → Parser → Interpreter Block-scoped variables Recursive functions Arrays & OOP Pipe Operator |> Native for loops 43 stdlib functions AST Visualizer Runs in-browser
What's new in v0.3.2
43-function Standard Library
Arrays, strings, maps, sets, math, time, fetch, and JSON — all native, no AST overhead.
Native Function Architecture
stdlib calls bypass the AST sandbox and execute raw V8 logic directly — faster and memory-safe.
Lexer Comment Fix
// line comments now correctly parsed. Previously treated as two division operators and crashed the Parser.
Time & Web
time.now(), time.sleep(), and fetch() — system and network access built right in.

Try it now

Edit the code and hit Run to see it execute live.

main.ky
Output
Press Run to execute your code.
Kyser Studio

See how your code
thinks.

Kyser Studio is an interactive, browser-based Abstract Syntax Tree visualizer built directly into the Kyser CLI. It intercepts the compiler's parsing phase and renders an educational, clickable dashboard instead of executing your code.

$ kyser map yourfile.ky
Split-Screen Architecture Source code on the left. Compiler tree on the right. A local HTML file opens instantly no server, no setup.
Emoji-Driven Node Coloring Mermaid.js renders soft, rounded boxes. Functions, variables, loops, and expressions each get a distinct color and label no jargon, just clear visual logic.
Interactive Line Tracing Click any node in the flowchart. The code panel scrolls to that exact line and highlights it in bright blue live, in real time.
Kyser Studio AST Visualizer
main.ky
1function double(x) {
2  return x * 2
3},
4
5let result = 5 |> double,
6say(result)
AST Tree
~ Program
fn FunctionDecl
double
op BinaryExpr
x * 2
var VarDecl
result
→ PipeExpr
5 |> double
← click any node to highlight source
VS Code Extension

Write Kyser the
right way.

The official Kyser extension brings first-class language support to VS Code syntax highlighting, smart autocomplete, hover docs, and a missing-comma linter that catches Kyser's unique syntax quirks before you even run your code.

Syntax Highlighting Keywords, strings, functions, classes, the |> pipe operator, and say() all in distinct colors.
Autocomplete & Snippets Press Ctrl+Space for smart completions. Tab through for, function, class and more.
Hover Docs Hover over any keyword to see a description and a real code example inline.
Missing Comma Linter Yellow squiggle warnings on any statement missing its trailing comma fires on every save.
Install from Marketplace v0.3.1 · free · MIT
game.ky Kyser
EXPLORER
kyser-project
K
game.ky
K
math.ky
K
player.ky
1 class Player {
2   let health = 100,
3   function heal() {
4     health = health + 20
5   }
Kyser: statement should end with a comma (,)
6 },
7
8 let p1 = new Player(),
9 say("HP:", p1.health),
10 5 |> double,
Kyser Completions
f for for (let i = 0, ...)
k function function name() { }
b say built-in output
K
Kyser
Ln 10, Col 8 1 warning

How it works

Kyser follows a classic interpreter pipeline, all written from scratch in TypeScript.

1

Lexer

Source code is scanned character by character and converted into a flat stream of typed tokens.

2

Parser

Tokens are consumed by a recursive descent parser that produces an Abstract Syntax Tree.

3

Interpreter

The AST is walked node-by-node. Environments handle scoping; function calls create new frames.

4

Studio kyser map

Optionally, the AST is fed to Kyser Studio instead rendered as a live, interactive flowchart.