Test DSL
Make the code show its work
Tests live next to the code they check. A test block and an observe line read like normal Vary, so the proof is right where you need it.
READABLE CODE, CHECKABLE TESTS.
A readable, statically-typed programming
language that measures test strength.
Install the toolchain manager and latest compiler. Full install docs →
curl -fsSL https://github.com/ccollicutt/vary/releases/latest/download/install.sh | sh
Features
Tests can lie. Mutation testing exposes the ones that do. vary mutate shows which tests are weak, which mutations survived, and exactly what to fix.
Contracts (in / out) declare what a function expects and what it promises. observe assertions check behaviour at runtime. Both are part of the language, not annotations you bolt on.
Run, check, test, format, and mutate from a single binary. Everything ships with the compiler. No plugins or extra tools required. Get started in minutes.
Vary compiles to JVM bytecode and runs on any JVM. Mutation testing uses bytecode patching, so mutants run without recompiling.
See it in action
Test blocks and observe assertions are normal Vary code. Put the checks beside the functions they protect.
Vary keeps the plain shape developers like in Python and adds static typing plus compile-time checks. No semicolons, no ceremony.
Static typing, null safety, and compile-time analysis catch common errors before the program runs. The code stays compact.
Core ideas
Test DSL
Tests live next to the code they check. A test block and an observe line read like normal Vary, so the proof is right where you need it.
Mutation testing
A green suite can still miss the bug. Vary changes the compiled program on purpose, then checks whether your tests catch it.
Read mutation testing docsContracts
If a function has rules, put them in the function. Contracts keep promises out of comments and let tests enforce them.
Read contracts docsEcosystem
The compiler, runtime, tests, mutation runner, and app workflow ship together. You should not need a pile of side tools before the work feels real.
Read ecosystem docsVAST
VAST writes small valid programs and runs them more than one way. If the answers differ, there is a seed to replay and a compiler bug to chase.
Read about VASTTypes
Vary keeps the code compact. Static types and explicit optional values catch mistakes before they turn into runtime cleanup.
Read the types docsCheck engine
vary check points at weak tests, unclear code, and risky patterns. The message tells you what is wrong, not just which rule fired.
HTTP
HTTP contracts and public JSON types keep routes, inputs, and outputs in one place. Less framework glue, fewer mystery edges.
Read HTTP docsVAR
vary var reads the working tree and picks the next useful check. Agents get a command to run, not a hand-wavy "looks good".
Ecosystem
Generates valid Vary programs and runs each one through two independent execution paths. If the AST interpreter and JVM backend disagree, VAST fails the run.
Agent workflow VAR Vary Adaptive Reviewvary var reads the working tree, chooses the next validation stage, and emits the exact command a coding agent should run next.
Push source to a Via host. Via builds, verifies, and attaches public routes only after policy, certificate, and ownership checks pass.
From the blog
Learn
Start with a guided path instead of a blank file. Each course is made of short runnable lessons with commands to try, output to check, and a clear next step.
Vary: It's very good
Install the toolchain manager and the latest compiler.
Install Vary →