Vary ships as a single CLI, but it connects to a broader set of tools. This page lists what exists and where to find it.
| Component | What it does |
|---|---|
| Compiler CLI | Run, check, test, format, mutate, build, docs, explain |
| VS Code extension | Syntax highlighting, diagnostics, go-to-definition, hover |
| Language server (LSP) | Real-time editor feedback via vary lsp with code actions |
| Check engine | 30 lint rules with auto-fix, SARIF output, suppression directives |
| Mutation testing | Built-in vary mutate with AST and bytecode-level mutation |
| VAST differential testing | Random program generation with multi-path comparison |
| Web framework | HTTP services via Quarkus (expose ... via http) |
| Docs generation | vary docs generates diagnostic and rule reference pages |
| LLM skill | Language reference context for AI coding assistants |
Syntax highlighting, diagnostics, go-to-definition, hover, and find-references for .vary files. The extension connects to the Vary language server for real-time feedback as you type.
Install from the .vsix file bundled in the Docker image at /opt/vary/vscode-vary/.
| Feature | Description |
|---|---|
| TextMate grammar | Syntax highlighting for .vary files |
| LSP client | Launches vary lsp automatically |
| Bracket matching | Auto-indentation and bracket pairing |
The compiler includes a built-in LSP server. Any editor that supports the Language Server Protocol can use it.
vary lsp # stdio mode (default, used by VS Code)
vary lsp --port 9257 # socket mode (for other editors)
| LSP feature | Description |
|---|---|
| Diagnostics | Type errors, warnings, and check rule violations |
| Go to definition | Jump to symbol source |
| Find references | List all usages of a symbol |
| Hover | Type information on mouseover |
| Document symbols | Outline view of functions and classes |
| Code actions | Quick-fixes for check rule violations |
| Semantic tokens | Context-aware syntax highlighting |
The language server runs the same type checker and check engine as vary check, so diagnostics in your editor match what the CLI reports.
The vary check command includes a rule-based diagnostic engine with 30 lint rules across 6 categories: idioms, contracts, testing, mutation, safety, and API. Rules are identified by stable IDs (e.g., VCI001, VCS001).
| Feature | Description |
|---|---|
Auto-fix (--fix) | Safe automatic fixes for common issues |
SARIF output (--json) | Machine-readable diagnostics for CI integration |
| Suppression | # vary-ignore-next-line VCI001: reason comments to suppress specific diagnostics |
| Explain | vary explain VCI001 shows rationale, examples, and fix guidance |
| Incremental cache | Caches check results to speed up repeated runs |
See Check rules and CLI reference for details.
Vary uses Quarkus as its HTTP runtime. There is no custom web server in Vary. When you write expose MyService via http, the compiler generates JAX-RS resource classes and Quarkus handles the rest: routing, request parsing, JSON serialization, hot reload, and production deployment.
vary new my-api # scaffold a Quarkus project
vary dev # start with hot reload
Quarkus was chosen because it is a production-grade framework that handles the parts a new language should not try to reimplement: HTTP/2, TLS, connection pooling, health checks, OpenAPI documentation. The Swagger UI is available at /q/swagger-ui by default.
See HTTP services for the full expose syntax.
Vary compiles to JVM bytecode. The Docker image ships Eclipse Temurin 25, which is the only runtime we test against.
The compiler and all tools (run, test, mutate, format, check, lsp) are packaged into a single fat JAR. The Docker image wraps this JAR in a shell script so vary works as a standalone command.
Mutation testing is built into the compiler, not bolted on as a plugin. vary mutate applies small changes to your source code and bytecode, runs your tests against each mutant, and reports which changes your tests failed to catch.
This works because the compiler has direct access to the AST and bytecode. External mutation tools have to parse and instrument code independently; Vary reuses the same pipeline it already has.
See Testing for details.
The recommended way to run Vary. No local Java installation required.
docker pull ghcr.io/ccollicutt/vary:latest
alias vary='docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workspace" -w /workspace ghcr.io/ccollicutt/vary:latest'
The image includes the compiler, runtime, stdlib, examples, VS Code extension source, and the LLM skill for AI-assisted development.
The Docker image bundles an LLM skill at /opt/vary/llm-skill/. This gives AI coding assistants context about Vary syntax, the type system, the stdlib, and the compiler toolchain so they can write, debug, and explain Vary code. The skill files are plain markdown and work with any LLM that supports system prompts or context files.
| Missing | Notes |
|---|---|
| Package manager or registry | No dependency resolution |
| Debugger (step-through) | No breakpoint or step support |
| Profiler | Phase timing via --profile-phases; no call-level profiler |
| Self-hosting | Compiler is written in Kotlin, not Vary |
| REPL history and tab completion | Basic REPL only |