One source. Emit every coding language. Exactness still runs Python, JavaScript, and Go — or the compiler refuses. Receipts name the program by source_hash, not by path.
CuNi is a small language with a hard exactness contract: a program either produces the same behavior on every supported target, or it does not compile. No approximate mode. --emit-all writes the catalog of coding languages. cuni check emit+runs every catalog language (native py/go/js/ts; other ids are a Python lowering). Free hosted CuNi Studio (Playground + Agent mode). Open source under AGPL-3.0-or-later, or a paid commercial grant (LICENSE), v0.1.10.
Exactness contract: a CuNi program with no
extblocks compiles to identical behavior on every supported target — or it refuses to compile.
Current focus: Studio → Rider publish/register loop is live; Agent-mode spend skill (speech → exactness → multi-runtime). Status: docs/STATUS.md.
- Open CuNi Studio — it loads
spend-control.cuniby default - Hit Run exactness
- See identical Python / Go / JavaScript output (or a clear refusal)
- Optional: Publish — exactness PASS → metadata + Studio-side Rider registration
That is the entire product promise in under 30 seconds.
Flagship source: examples/spend-control.cuni · Refusal examples: docs/EXACTNESS_REFUSAL_EXAMPLES.md
AI speech routes (stub or LLM); law is CuNi and must pass exactness before it runs on py/go/js:
python3 examples/agent/host/run_agent.py --check-all
python3 examples/agent/host/run_agent.py --message "spend 4 cap 5" --host go
python3 examples/agent/host/run_agent.py --loop --message "echo hi" --message "score 2 8"
python3 examples/agent/host/run_agent.py --replIn Studio Agent mode, try speech spend 4 cap 5 — it routes to the flagship CheckSpend law.
Design: docs/AI_IS_CUNI.md · pack: examples/agent/
CuNi provides the exact multi-runtime language and verification.
Agent-Rider provides the coordination layer (identity, messaging, multi-agent workflows).
| Project | Role |
|---|---|
| Agent-Rider | Multi-agent coordination · live |
| quikgater | Pay-per-fact fetch for agents (x402 / USDC) |
| SlidPhi | Omni-Dormant integer codecs (npm i slid-phi) |
| TEACHAiD | Interactive beginner school app |
Packaging: tap ceedot-rock/homebrew-cuni · draft notes docs/PACKAGING.md.
End-to-end path (live today):
- Write a policy in CuNi Studio (default: spend-control).
- Run exactness — refuse unless every catalog language matches.
- Publish — metadata is stored and auto-registered into the Studio-side Rider stub.
- Inspect:
GET /api/rider/registered· design for real Rider:docs/RIDER_V0_CONTRACTS.md
They fit together like this:
- Write critical agent policies and skills in CuNi (inside the Studio).
- Verify them with the exactness checker — the same logic produces the same results on every supported runtime.
- Deploy into Agent-Rider. Rider uses CuNi
linkcontracts as the standard interop mechanism and requires exactness before a policy can run.
Result: agents can be implemented in the language that is most convenient, while the parts that matter for consistency and trust remain portable and verified.
| Proof | How | What it shows |
|---|---|---|
| Exactness | Studio or cuni check examples/full.cuni |
One program → every catalog language → same stdout |
Interop (link) |
./examples/link/demo.sh |
One contract → Go server + Python + JS + Go clients over HTTP |
link Greet(name: str, times: int) -> str do
ret `hello ${name} x${times}`
end
cargo build --release
./examples/link/demo.sh
# Python / JS / Go clients all print: hello Cee x3Tutorial: docs/LINK_TUTORIAL.md · source: examples/link.cuni · Release notes
Full MP4 (30s) · HTML · live: ./examples/demo-30s.sh
One program → Python / Go / JavaScript / C / C++ / Rust — identical 42 / cuni. 119-language gate.
Requirements: Rust (stable), plus python3, go, and node if you want to run the conformance suite.
# Homebrew tap (build-from-source formula)
brew tap ceedot-rock/cuni
brew install cuni
# cargo from crates.io when the crate is published; until then use git:
cargo install --git https://github.com/ceedot-rock/cuni --tag v0.1.10
# or clone and build from source
git clone https://github.com/ceedot-rock/cuni.git
cd cuni
cargo build --release
# binary: target/release/cuniTap source: https://github.com/ceedot-rock/homebrew-cuni
# run in-process (same stdout as check, or check would have refused)
cuni run examples/compute/fib.cuni
# → 55
# optional: emit a native seat instead
cuni run examples/compute/fib.cuni --lang py
# exactness gate — 119 languages, emit+run, identical stdout or refuse
cuni check examples/full.cuni
# → exactness: PASS (119 langs) exit 0
cuni check examples/full.cuni --only py,go,js,c,cpp,rs # native seats
cuni check examples/compute --timeout 180
cuni ingest impl.py -o impl.cuni # reverse, or refuse
cuni bank paste impl.py --from py --to js # paste N, get X, prove or refuse
cuni prove examples/full.cuni --against impl.py # foreign code must match
# → exactness: FAIL — … exit 1
cuni check examples/ # all .cuni under a directory
cuni check examples/full.cuni --verbose --timeout 120
# type errors include file:line:col (platform step 2)
# → tests/typeck_invalid/undefined_var.cuni:1:9: type error: undefined variable `y`
# type-check + dump AST
cuni examples/full.cuni
# emit native quality backends (also covered by --emit-all / check)
cuni examples/full.cuni \
--emit-py /tmp/full.py \
--emit-go /tmp/full.go \
--emit-js /tmp/full.js
# emit every language in the catalog (exactness artifacts; check runs the same files)
cuni --list-langs
cuni examples/full.cuni --emit-all /tmp/cuni-all
python3 /tmp/full.py
go run /tmp/full.go
node /tmp/full.js
# from a clone: conformance (runs the full catalog) + typeck suite
cargo testWorkflows (run on every push/PR):
| Workflow | Badge | What it runs |
|---|---|---|
| Exactness | cuni check on portable examples |
|
| CI | cargo test + exactness |
Local:
cargo build --release
./target/release/cuni check --timeout 120 \
examples/full.cuni examples/structs.cuni examples/enums.cuniComposite action (this repo): .github/actions/cuni-exactness
Docs for other repos: docs/CI.md
(cuni check needs python3, go, and node on PATH.)
cargo build --release
python3 playground/server.py
# open http://127.0.0.1:8787 (binds 0.0.0.0 by default)Live: https://cuni-studio.fly.dev/
Emit · Check/Run · Publish (exactness → Rider stub) · Notelog · Critic Book.
Details: playground/README.md · freeze: docs/FREEZE.md.
Redeploy: flyctl deploy --config fly.toml --remote-only (repo root).
| Idea | Syntax |
|---|---|
| Blocks | do … end (no braces, no significant whitespace) |
| Bindings | let immutable / mut mutable |
| Functions | def name(x: int) -> int do … ret … end |
| Fallible | -> T ? + fail e + unwrap with ?? |
| Optionals | opt<T>, none, same ?? |
| Structs | typ Point do x: int y: int end → construct with Point(3, 4) |
| Interfaces | iface Shape do area() -> float end + typ Circle is Shape do … end |
| Enums | payload-free: enum Color do Red Green Blue end |
| Modules | use math → loads math.cuni beside the source file |
| Escape hatch | ext name(...) -> T do py: … go: … js: … end |
| Cross-program | link Greet(name: str) -> str do … end → handler + *_remote client |
Full prose: SPEC.md. Formal EBNF: GRAMMAR.md.
link interop tutorial: docs/LINK_TUTORIAL.md.
CI / badges: docs/CI.md.
src/
lexer.rs parser.rs token.rs ast.rs # frontend
typeck.rs checks.rs modules.rs # refuse logic + use resolution
codegen_{py,go,js}.rs # exactness backends
langs.rs / codegen_all.rs # emit catalog (every coding language)
main.rs # CLI
examples/ # runnable .cuni samples
examples/link/demo.sh # flagship Go server ← py/js/go clients
playground/ # hosted Studio: emit + check + Notelog + Critic Book
docs/LINK_TUTORIAL.md # interop walkthrough
docs/CI.md # badges + exactness CI
tests/
conformance.rs # byte-identical stdout + link interop
check_cmd.rs # cuni check CLI
typeck.rs + typeck_invalid/ # compile-or-refuse fixtures
assets/logo.png # brand mark
Shipped: lexer/parser, native seats Python/Go/JS/TS/C/C++/Rust, --emit-all language catalog (119), bounded type checker with line:col errors, named typ constructors, call-site generic binding checks, use, link interop, enums, fail/??, stdlib (say, .push, .len, range, abs, min, max, slice), cuni run (in-process seat; cuni check must match catalog gold), cuni check, hosted Studio (cuni-studio.fly.dev) with a language picker, Exactness CI + badge, flagship link demo, gold algorithms in examples/compute/.
Not in v0.1 (by design): tagged unions with payload, streaming link, full inference — see SPEC.md §19.
- Mnemonic over cryptic (
ret,mut,whl,els) - One concept, one keyword
- Small core over broad coverage
- Explicit over silently inferred (mutability, fallibility,
ext)
Dual license. Public tree is AGPL-3.0-or-later — see LICENSE. To ship CuNi inside a closed-source product, buy a written commercial exception: COMMERCIAL.md · corey@slidphilabs.com. Hosted Studio is $0 exactness, not a grant of Rider or PCC. SoT: https://www.slidphilabs.com/licensing.json
CuNi Studio: https://cuni-studio.fly.dev/ · Protocol https://cuni-studio.fly.dev/.well-known/cuni-protocol.json · Agent^Rider https://agentrider.fly.dev/.well-known/agent.json · Lab commerce https://www.slidphilabs.com/api/agent · Lab llms.txt https://www.slidphilabs.com/llms.txt
| Surface | URL |
|---|---|
| CuNi Protocol | https://cuni-studio.fly.dev/.well-known/cuni-protocol.json |
| Protocol (text) | https://cuni-studio.fly.dev/PROTOCOL.md |
| Studio | https://cuni-studio.fly.dev/ |
| agents.txt | https://cuni-studio.fly.dev/agents.txt |
| agents.json | https://cuni-studio.fly.dev/agents.json |
| llms.txt | https://cuni-studio.fly.dev/llms.txt |
| Lab llms.txt | https://www.slidphilabs.com/llms.txt |
| Agent^Rider manifest | https://agentrider.fly.dev/.well-known/agent.json |
| Agent^Rider MCP | https://agentrider.fly.dev/api/mcp |
| Lab x402 commerce | https://www.slidphilabs.com/api/agent |



