Skip to content

Tech preview Commands, packages, and APIs may change before 1.0.

riot

There are many OCaml stacks. This one is mine.

The OCaml stack that gets out of your way.

Riot is one CLI for building, testing, and shipping OCaml, with a multicore actor runtime, a new standard library, and the pkgs.ml registry. Opinionated by design, and built to be driven by you or your agents.

curl -sSL https://get.riot.ml | sh

macOS and Linux. Installs to ~/.riot/bin.

curl -sSL https://get.riot.ml | sh

One CLI

Build, test, format, lint, fuzz, benchmark, document, and publish with riot.

Actor runtime

A multicore actor runtime with supervision and message passing, built in.

New standard library

A modern, practical standard library designed for systems and services.

pkgs.ml registry

Search, add, and publish packages, with docs generated for every release.

riot --help

One tool for the whole loop

From a fresh workspace to a published package, every step is a riot command with the same flags, the same toolchain, and structured output when you need it.

riot initriot new

Start on the golden path

riot init creates a workspace and riot new adds packages to it, so you never assemble boilerplate by hand.

  • A new workspace comes with manifests, an OCaml toolchain config, and agent instructions in .agents.
  • riot new drops a package into the right place without you remembering the directory layout.
  • Your first project already has a package, a test loop, and an obvious next command.

Create a workspace

Start from the shape Riot expects.

$ riot init app
$ cd app

Add a package

Keep new packages on the same path.

$ riot new packages/api

What you get

Manifests, sources, tests, and toolchains all have an obvious home.

app/
  ocaml-toolchain.toml
  riot.toml
  packages/
    app/
      riot.toml
      src/
      tests/

.agents/skills/riot-ml

Agents are first-class users

Riot ships instructions for agents alongside the docs for people, so the tools you already use know how to build, test, and ship a Riot project from the first prompt.

  • Every riot init workspace ships with a .agents folder and the Riot skill already in place.
  • Commands support --json, so agents read build results, diagnostics, and test runs as data instead of scraping prose.
  • The skill links workflows for testing, fuzzing, benchmarking, and snapshots, so agents run the right loop instead of guessing.
  • /llms.txt gives agents on the web a map of Riot and pkgs.ml.
Agent-ready from the first command --json
$ riot init app && cd app
$ ls .agents/skills
riot-ml

$ riot build --json
$ riot test --json
$ riot search std --json

What you can build with Riot

Tools, services, databases, and experiments, built as one codebase that stays understandable as it grows.

Multicore applications

Spawn and supervise actors with std/actor and let the runtime in std/runtime use every core you have.

Networked services

Actors, supervision, and real IO. std/IO includes ioSlice for zero-copy work when bytes need to move fast.

Web applications

Build web apps with suri, including LiveView support in suri/liveview and typed domain logic.

Database-backed systems

Typed queries with sqlx, PostgreSQL through postgres, and sqlite when a file is all you need.

Command-line tools

Fast CLIs with structured output and clear errors that people and agents can both drive.

Terminal UIs

Keyboard-driven terminal interfaces with minttea and gooey, with structured state and native ergonomics.

Developer tooling

Formatters, linters, code generators, and release tools, written with the toolchain they plug into.

Agentic workflows

Workflows agents can run, inspect, and repair: JSON output, stable diagnostics, and recoverable failures.

Start a Riot project

Install the CLI, run riot init, and you're building.

curl -sSL https://get.riot.ml | sh