rcl/docs/index.md
Ruud van Asseldonk 287bde6f59 Update project status to reflect reality
It *is* pre-1.0 and it *does* occasionally have backwards-incompatible
changes, but they are well documented with clear upgrade paths, and not
happening at a breakneck pace. For example, with the introduction of
unpack, the |-operator is deprecated, but it still works. Or take the
assertion syntax: it changed, but the old syntax is still accepted, and
the autoformatter automatically upgrades documents. So I think that the
previous phrase was a bit too conservative. Other "mature" projects
cause me breakage headaches far more often than RCL. The readme should
reflect that.
2025-11-23 18:50:56 +01:00

2.5 KiB

The RCL Configuration Language

RCL is a domain-specific language for specifying human-written data with just enough abstraction features to avoid repetition. It is a superset of JSON that extends it into a simple functional programming language that resembles Python and Nix. Use cases include:

  • Querying JSON documents, like jq, but with a more familiar language.
  • Generating repetitive configuration files, such as GitHub Actions workflows or Terraform configuration.
  • Sharing configuration between tools that do not natively share data. For example, import the same user account definitions into Terraform, Tailscale, Kubernetes, and Ansible.

RCL can be used through the rcl command-line tool that can export documents to JSON, YAML, TOML, and other formats. It can also be used through a native Python module, with an interface similar to the json module.

Example

// Configuration that defines cloud storage buckets for storing backups of two
// databases, "alpha" and "bravo", at three different frequencies. This schema
// is for a hypothetical infrastructure-as-code tool. See the tutorial for more
// details.
{
  backup_buckets = [
    let retention_days = { hourly = 4, daily = 30, monthly = 365 };
    for database in ["alpha", "bravo"]:
    for period, days in retention_days:
    {
      name = f"{database}-{period}",
      region = "eu-west",
      lifecycle_policy = { delete_after_seconds = days * 24 * 3600 },
    }
  ],
}

For an interactive demo in your browser, see https://rcl-lang.org.

Status

RCL is usable and useful, well-tested, and well-documented. It is still pre-1.0, though backwards-incompatible changes have been rare in the past years. Syntax highlighting is available for major editors like Vim, Emacs, Helix, and Zed. RCL is a community project without commercial support.

License

RCL is free/libre software, licensed under the Apache 2.0 license. The project is developed in the open and the source code is available on GitHub and Codeberg.