Skip to content

Cargo (Build from Source)

The Tenor CLI is a Rust crate. Requires Rust 1.75+ with the stable toolchain.

bash
# Install Rust if you don't have it
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Verify Rust version
rustc --version  # must be 1.75.0 or later

# Install Tenor CLI
cargo install tenor-cli

This compiles the tenor binary from source and places it in ~/.cargo/bin/. The build takes about 90 seconds on a modern machine.

To update to the latest version:

bash
cargo install tenor-cli --force

Homebrew

Install via the Riverline tap on macOS or Linux:

bash
brew tap riverline-labs/tap
brew install tenor

To update:

bash
brew upgrade tenor

Binary Downloads

Pre-built binaries are available from GitHub Releases. Download the archive for your platform, extract it, and move the binary to a directory on your PATH.

macOS (Apple Silicon):

bash
curl -L https://github.com/riverline-labs/tenor/releases/latest/download/tenor-aarch64-apple-darwin.tar.gz -o tenor.tar.gz
tar xzf tenor.tar.gz
sudo mv tenor /usr/local/bin/

macOS (Intel):

bash
curl -L https://github.com/riverline-labs/tenor/releases/latest/download/tenor-x86_64-apple-darwin.tar.gz -o tenor.tar.gz
tar xzf tenor.tar.gz
sudo mv tenor /usr/local/bin/

Linux (x86_64):

bash
curl -L https://github.com/riverline-labs/tenor/releases/latest/download/tenor-x86_64-unknown-linux-gnu.tar.gz -o tenor.tar.gz
tar xzf tenor.tar.gz
sudo mv tenor /usr/local/bin/

Linux (aarch64):

bash
curl -L https://github.com/riverline-labs/tenor/releases/latest/download/tenor-aarch64-unknown-linux-gnu.tar.gz -o tenor.tar.gz
tar xzf tenor.tar.gz
sudo mv tenor /usr/local/bin/

Docker

Run the Tenor CLI from the official container image without installing anything locally:

bash
docker run ghcr.io/riverline-labs/tenor:latest --version

Run static analysis on a local contract file by mounting the current directory:

bash
docker run -v $(pwd):/contracts ghcr.io/riverline-labs/tenor:latest check /contracts/my-contract.tenor

Start the HTTP evaluator server, exposing port 8080:

bash
docker run -v $(pwd):/contracts -p 8080:8080 ghcr.io/riverline-labs/tenor:latest serve /contracts/my-contract.tenor

The image is based on debian:bookworm-slim and contains only the tenor binary. It runs as a non-root user by default.

Verify Installation

Confirm Tenor is installed and available on your PATH:

bash
tenor --version

You should see output like:

tenor-cli 0.1.0

Run the built-in help to see all available commands:

bash
tenor --help
Usage: tenor <COMMAND>

Commands:
  check       Elaborate and run static analysis
  elaborate   Produce interchange JSON
  evaluate    Evaluate facts against a contract
  serve       Start HTTP evaluator server
  simulate    Simulate flow execution
  actions     Compute action space for a persona
  explain     Natural language contract explanation
  deploy      Deploy contract to platform
  generate    Code generation (typescript)
  ui          Generate React UI from contract
  agent       Interactive agent shell
  connect     Source wiring and adapter config
  diff        Compare contract versions
  migrate     Generate and execute migration plan
  keygen      Generate Ed25519 signing keypair
  sign        Sign interchange bundle
  verify      Verify bundle signature
  lsp         Start Language Server Protocol server
  help        Print this message or the help of subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Editor Support

A VS Code extension is available for .tenor files. Install from the command line:

bash
code --install-extension riverline-labs.tenor

Or search for "Tenor" in the VS Code marketplace.

The extension provides:

  • Syntax highlighting for .tenor files
  • Real-time diagnostics via the Tenor Language Server (tenor lsp)
  • Hover documentation for all constructs
  • Go-to-definition for entities, facts, rules, operations, and flows
  • Autocomplete for construct names and keywords

The extension requires the tenor binary on your PATH to power the language server. If you installed via any of the methods above, the extension will find it automatically.

Next Steps

With Tenor installed, write your first contract.