MikuLang v1.0.0

Speak directly
to the machine.

A terminal-native language for MikuOS. Lexical scoping, closures, async/await, pattern matching, and 60+ stdlib functions — built for mesh networks and local inference. Zero dependencies. Zero config.

Not another scripting language.

MikuLang is purpose-built for the ICQ console — auto-detected, no prefix needed. It talks to your mesh, queries your models, and manages your infra without leaving the terminal.

Zero Config

Type and run

No imports, no package managers, no build step. Type MikuLang directly into the ICQ console. Auto-detected — just start typing.

Mesh Native

Built-in network primitives

Query mesh nodes, route inference, fetch releases — all from the language. Functions like mesh.status(), mesh.peers(), and release.list() are built in.

Lexical Scoping

Closures that close

Functions capture their enclosing scope. Nested functions, closures, first-class functions — the semantics you expect from a real language.

Async/Await

Non-blocking by default

Network calls, model inference, file I/O — all async-capable. Use await to block only when you need to.

60+ Stdlib

Strings, math, crypto, HTTP

JSON parsing, base64, crypto hashing, HTTP requests, array manipulation, regex, datetime — all available without imports.

Pattern Matching

Match expressions

Multi-case pattern matching with guards and destructuring. Clean control flow for complex branching logic.

Looks like pseudocode. Runs like code.

C-style syntax with a few MikuLang-isms. String interpolation with braces, pipe operator, and clean function declarations.

# Variables & string interpolation
let name = "SysOp"
let releases = release.list()
print "{name} has {len(releases)} releases"

# Functions with lexical scoping
fn filterLive(items) {
  return items | filter(fn(r) { r.status == "live" })
}

# Async mesh query
let status = await mesh.status()
print "Nodes online: {status.online}"

# Pattern matching
match status.role {
  "operator" → print "Running inference"
  "relay"   → print "Forwarding traffic"
  _          → print "Idle"
}

# Pipelines
let top = releases | filter(fn(r) { r.plays > 1000 })
                   | sortBy("plays")
                   | take(5)

60+ functions. No imports.

Arrays & Objects

len(arr) — length push(arr, item) — append filter(arr, fn) — keep matches map(arr, fn) — transform reduce(arr, fn, acc) — fold sortBy(arr, key) — sort uniq(arr) — deduplicate keys(obj) — object keys values(obj) — object values merge(a, b) — shallow merge has(obj, key) — key exists

Strings & Crypto

upper(s) — uppercase lower(s) — lowercase trim(s) — strip whitespace split(s, delim) — to array join(arr, delim) — to string replace(s, a, b) — substitution md5(s) — hash sha256(s) — hash base64(s) — encode base64dec(s) — decode uuid() — random UUID

Network & Mesh

mesh.status() — node status mesh.peers() — list peers mesh.ping(host) — latency check http.get(url) — GET request http.post(url, d) — POST release.list() — all releases release.get(id) — single release infer(model, prompt) — local LLM ollama.list() — available models

Math & Logic

abs(n) — absolute min(a, b) — minimum max(a, b) — maximum floor(n) — round down ceil(n) — round up random() — 0 to 1 range(a, b) — sequence json.parse(s) — parse JSON json.stringify(o) — to JSON typeof(v) — type name now() — epoch ms

Terminal-native. Mesh-aware. Zero dependencies.