# Chelis

> A verified tensor programming language that checks shapes, precision, effects and ownership before code runs, built for agent-written numerical code.

Chelis is an open-source numerical computing language for code that agents write and people supervise. Tensors carry named dimensions and precision in their types, and a compiler and proof stack check shapes, precision, effects and ownership before the program runs. The project is hosted by the Chelis-Lang organization, and the site lists release 0.19.1 for Linux x86_64 and macOS arm64 under the MIT license.

## What It Is

Chelis is a programming language and toolchain for numerical work such as pricing, time series and statistics. Its aim is that an agent's mistake becomes a compiler error rather than a plausible wrong number. For example, a NumPy-style broadcast that silently stretches a 3 by 1 array against three weights is rejected by `chelis check` before anything executes.

The readable syntax is called Surf (`.ch`), and Deep (`.dp`) is the canonical form used by the compiler and agents. Programs build to native code through C.

## How the Agent Loop Works

The CLI is designed to sit inside an agent's write-check-fix loop. `chelis check` answers in JSON with the error kind and source span, and the same input always produces the same answer. The agent repairs the code until no errors remain, then `chelis prove` checks properties declared with `@property` using type checking, an SMT solver or seeded sampling. Each result names the method behind it. A person then reviews types and properties rather than every line.

`chelis tide mcp` exposes check, eval, prove and structural edit operations as MCP tools. A SKILL.md and llms.txt are published for coding agents.

## What the Compiler Enforces

- Shapes must match; nothing is broadcast implicitly.
- Named dimensions match by name, so `batch` is not `seq` even when both are the same size.
- `f32` and `f64` meet only through an explicit `cast`.
- Random operations require an explicit key.
- Borrowed values cannot be passed to owned parameters without a copy.
- Negative indices stop the program instead of wrapping around.
- I/O appears in a function's effects.

## Shells and Packages

Shells installed with Reef extend the core language: Nautilus for numerical methods, statistics and optimization, Coral for typed dataframes, Shoals for quantitative finance, and economoist for economic models with properties checked by an SMT solver. The research page mentions `chelis prove` with cvc5 and a first-order core calculus mechanized in Lean 4. Commercial support is listed from C Proof.

## Setup Path

The toolchain manager `chelisup` is installed from a script attached to each release, then downloads the compiler and keeps versions side by side. `chelis build` needs a native C compiler on the platform. Documentation includes the Chelis book, a first-program lesson, CLI workflow and agent workflow guides.

## Features
- Compile-time checking of tensor shapes, precision, effects and ownership
- Named tensor dimensions matched by name
- Explicit cast required between f32 and f64
- Explicit random keys required
- JSON diagnostics with error kind and source span
- chelis prove for @property declarations using type checking, SMT solver or seeded sampling
- MCP tools via chelis tide mcp for check, eval, prove and structural edits
- Builds programs to native code through C
- grad and vmap transforms
- Shells for numerics (Nautilus), dataframes (Coral), quantitative finance (Shoals) and economic models (economoist)
- SKILL.md and llms.txt for coding agents
- chelisup toolchain manager

## Integrations
MCP, cvc5, Lean 4, Reef packages

## Platforms
WINDOWS, MACOS, LINUX, API, CLI

## Pricing
Open Source

## Version
0.19.1

## Links
- Website: https://chelis.ch/
- Documentation: https://chelis.ch/docs/
- Repository: https://github.com/Chelis-Lang/chelis
- EveryDev.ai: https://www.everydev.ai/tools/chelis
