Readable from wherever you started.
Mycel is named after mycelium, the fungal network that connects a forest. The idea is a language that connects programmers instead of splitting them: someone who began with Python, JavaScript, Java, Go, Rust or Swift should be able to open a Mycel program and understand what it does.
Easy to start
Plain words, no ceremony, and error messages that say what went wrong, where, why, and how to fix it.
Safe by default
A program with no permissions is pure. Files, network and processes are granted per run, never assumed.
Typed, without the typing
Static types are inferred, so most programs need no annotations, and mistakes are caught before the program runs.
Real programs, real output.
Each sample below was run with the current compiler, and the output shown is what it printed. Mycel is still in development, so details will change. Try it in your browser.
name = "world"
print(f"Hello, {name}!")outputHello, world!
scores = [90, 72, 85]
average = sum(scores) / len(scores)
print(f"average: {average:.1f}, best: {max(scores)}")outputaverage: 82.3, best: 90
numbers = [1, 2, 3, 4, 5]
evens = [x * 2 for x in numbers if x % 2 == 0]
print(f"evens doubled: {evens}, last: {numbers[-1]}")
counts = {"apples": 5, "oranges": 2}
status = "in stock" if "apples" in counts else "out of stock"
print(f"apples: {counts.get(\"apples\", 0)}, bananas: {counts.get(\"bananas\", 0)} ({status})")
tags = Set(["web", "fast"]) | Set(["fast", "safe"])
print(f"tags: {tags.sorted()}")outputevens doubled: [4, 8], last: 5 apples: 5, bananas: 0 (in stock) tags: ["fast", "safe", "web"]
enum Shape { Circle(r: Float), Rect(w: Float, h: Float) }
fn area(s: Shape) -> Float {
return match s {
.Circle(r) => 3.14159 * r * r
.Rect(w, h) => w * h
}
}
for s in [Shape.Circle(r: 1.0), Shape.Rect(w: 2.0, h: 3.0)] {
print(f"{area(s):.2f}")
}output3.14 6.00
fn find(names: [String], wanted: String) -> Int? {
for i, n in names {
if n == wanted { return i }
}
return nil
}
names = ["ana", "bo", "chen"]
print(find(names, "bo"))
print(find(names, "zed"))output1 nil
age = 15
if age >= 18 {
print("adult")
}
elif age >= 13 {
print("teen")
}compiler sayserror [E0101]: `elif` is Python — Mycel writes `else if`
--> habit.myc:5:1
|
5 | elif age >= 13 {
| ^^^^
why: this word comes from another language
fix: see `mycel help habits`
1 error, 0 warningsTry it in your browser → Every sample here runs in the playground.
A web app in a few lines.
Mycel includes std.web for web applications: routes with :params, HTML rendering, JSON APIs, form handling and static file serving — the way Express, Flask and Sinatra do it. A full guestbook app with a signed form, JSON API, and HTML escaping fits in 20 lines.
import std.web
var messages = ["Welcome to Mycel!"]
app = web.App()
app.get("/", req => {
items = [f"<li>{web.escape(m)}</li>" for m in messages].join("")
return web.html(f"<h1>Guestbook</h1><ul>{items}</ul>" +
"<form method=\"post\" action=\"/sign\"><input name=\"message\"><button>Sign</button></form>")
})
app.post("/sign", req => {
text = req.form.get("message", "").trim()
if text.isEmpty { return web.text("write something first", status: 422) }
messages.push(text)
return web.redirect("/")
})
app.get("/messages.json", req => web.json({"count": len(messages), "items": messages}))
app.run(8000) // serves on http://localhost:8000 (needs --allow-listen)
what it servesGET / -> 200 text/html (<h1>Guestbook</h1><ul><li>Welcome to Mycel!</li></ul>...)
POST /sign -> 303 redirect to /
GET /messages.json -> 200 application/json ({"count":1,"items":["Welcome to Mycel!"]})Learn Mycel, from the language you know.
Start with the Learn Mycel tour, eight small lessons with real output, or read the guide for your first language: what is the same, what is different, and the exact error each habit gets.
Teach local and cloud AI models Mycel.
Mycel was designed to be easy for both humans and AI models to read and write. We provide verified training datasets and full reference materials for models:
- Fine-Tuning Datasets — verified JSONL datasets (instruct, error-fix, translate) for local open-weights models and LoRA fine-tuning.
- Material for Cloud AI Models — complete self-contained reference, system prompts, habits table, and standard library signatures for ChatGPT, Claude, and Gemini.
One language, every ecosystem.
Starting out should not mean giving up the libraries you already know. The plan is a compatibility engine so a Mycel program can use packages from the languages people come from, and one command installs them. ply already understands the flags below; installing packages from other languages is marked as coming until Phase B lands.
Planned install syntax: the flag comes first, and it can be the language name, its file extension, or its package manager. Native Mycel packages take no flag.
| Ecosystem | Flags | Status |
|---|---|---|
| Python | --python--py--pip | Coming in Phase B |
| JavaScript | --javascript--js--npm | Coming in Phase B |
| TypeScript | --typescript--ts | Coming in Phase B |
| Java | --java--maven--mvn | Coming in Phase C |
| Rust | --rust--rs--cargo | Coming in Phase D |
| Go | --go--golang | Coming in Phase D |
| Swift | --swift | Coming in Phase D |
| Mycel packages | no flag | Native (ply install <pkg>) |
ply install --py requests # Coming in Phase B ply install --npm lodash # Coming in Phase B ply install --java com.google.code.gson:gson:2.11.0 # Coming in Phase C ply install some-mycel-package # Native Mycel package
Foreign packages will need an explicit permission to run, because they can do anything their own language can. Mycel's safety rule stays: nothing runs with access you did not grant.
What is being built next.
- Interop with Rust, Go and Swift packages, alongside Python, JavaScript, TypeScript and Java.
Not released yet.
Mycel is in active development. There is nothing to download or install today. This page will change when there is.
Questions people ask.
What is Mycel?
Mycel is a friendly, typed programming language in development, made so anyone can read it whatever language they learned first, and easy for people writing their first program. print("hi") is a whole Mycel program.
Can I try Mycel without installing anything?
Yes. The Mycel playground runs the real compiler in your browser, in a sandbox with no file, network or storage access. Nothing is sent to a server.
How is Mycel different from Python?
Mycel keeps what makes Python easy (f-strings, print(a, b), for i, x in items, files that are just statements, and/or/not, x = 1 without let, list comprehensions, x in items, d.get(), xs[-1], and Set) and adds static types that are inferred, so mistakes are reported before the program runs. Habits from Python, JavaScript, TypeScript, Java, Go, Rust and Swift that Mycel writes differently get an error naming the habit, for example "elif is Python — Mycel writes else if".
Can Mycel use Python or npm packages?
Not yet. A compatibility engine for Python, JavaScript/TypeScript, Java, Rust, Go and Swift packages is planned. The package manager ply already recognises the install syntax (ply install --py requests), but installing packages from other languages is coming in Phase B.
What file extension does Mycel use?
.myc. Files ending in .olx also work, permanently.
Is Mycel released?
Not yet. There is nothing to download today; the playground is the way to try it.