CLI

Build, deploy, and manage matrices from the command line.

The Poliglot CLI (rars) is the primary tool for matrix development. It handles project scaffolding, building, deployment, secret management, extensions, and UI component development.

Installation

uv tool install rars-cli

Requires Python 3.12+. Verify the installation:

rars version

Authentication

Before using most commands, authenticate with your workspace:

rars auth login

This opens a browser-based OAuth flow. After login, your workspaces are synced automatically.

Sync Workspaces

If you've been added to new workspaces, sync them:

rars auth sync

API Keys

Create a personal access token for CI/CD or programmatic access:

rars auth create-key "CI Deploy Token" --expires 90d

Expiration options: 7d, 14d, 30d, 90d, or never.

List active keys:

rars auth list-keys

Revoke a key:

rars auth revoke-key <key-id>

Configuration

Set defaults so you don't have to pass --workspace on every command:

rars configure defaults --workspace my-workspace

Set the default LLM model:

rars configure defaults --model anthropic/claude-sonnet-4-5-20250929

Model format is provider/model where provider is anthropic, openai, or ollama.

Project Scaffolding

Initialize a new matrix project:

rars init

This runs an interactive wizard that creates:

  • poliglot.yml (build configuration)
  • spec/matrix.ttl (matrix declaration)
  • spec/ontology.ttl (domain model)
  • spec/shapes.ttl (constraints)
  • .gitignore
  • Optionally: UI component directory and configuration

Use --dir to specify a directory:

rars init --dir ./my-matrix

Build and Deploy

Build

Compile and validate your matrix spec:

rars build

This reads poliglot.yml from the current directory, compiles all spec files, runs SHACL validation, and produces a deployable package.

Use --config to point to a different config file:

rars build --config ./path/to/poliglot.yml

Install (Deploy)

Deploy a package to your workspace:

rars install

Options:

FlagDescription
--workspace, -wTarget workspace (uses default if not set)
--config, -cPath to poliglot.yml
--release-notesRelease notes for this deployment
--forceForce update even if validation fails

Uninstall

Remove a package from your workspace:

rars uninstall my-matrix-package

Options:

FlagDescription
--workspace, -wTarget workspace
--yes, -ySkip confirmation prompt

Deployment History

List recent deployment commands for a package:

rars list-lifecycle-commands my-matrix-package

Options:

FlagDescription
--workspace, -wTarget workspace
--limit, -nMax number of commands to show (default: 10)

Validation Report

Get the SHACL validation report for a deployment:

rars get-lifecycle-validation-report <command-id>

Or get the latest report for a package:

rars get-lifecycle-validation-report --latest --package my-matrix-package

Options:

FlagDescription
--package, -pPackage name (required with --latest)
--latest, -lGet report for the most recent command
--workspace, -wTarget workspace
--formatted, -fDisplay formatted report instead of raw Turtle

Secrets

Manage secret values for your matrix's service integrations.

List Secrets

rars secrets list

Options:

FlagDescription
--workspace, -wTarget workspace
--prefix, -pFilter by URI prefix

Get Secret

View secret metadata:

rars secrets get tasks:TaskAPIKey

Retrieve the decrypted value:

rars secrets get tasks:TaskAPIKey --value

Set Secret

Set a secret value interactively (masked input):

rars secrets set tasks:TaskAPIKey

Pipe from stdin (useful for CI):

echo "sk-abc123" | rars secrets set tasks:TaskAPIKey --from-stdin

All secret values are end-to-end encrypted. The CLI handles the key exchange automatically.

Extensions

Create runtime extensions that add triples to installed matrices without modifying the original package.

Create Extension

rars extension create --matrix "https://example.org/spec/tasks#" --file extension.ttl

Options:

FlagDescription
--matrix, -mTarget matrix URI (required)
--file, -fPath to Turtle content file (required)
--workspace, -wTarget workspace
--label, -lLabel for the extension

Creating an extension triggers a partial re-deployment of the target matrix.

List Extensions

rars extension list

Get Extension

rars extension get <extension-id>

Write the Turtle content to a file:

rars extension get <extension-id> --output extension.ttl

Update Extension

rars extension update <extension-id> --file updated.ttl

Delete Extension

rars extension delete <extension-id>

UI Components

Build and preview React components for matrix entity rendering.

Preview

Start a local dev server for component development:

rars ui preview

Options:

FlagDescription
--port, -pServer port (default: 3333)
--dir, -dProject directory
--hostServer host (default: localhost)

Build

Compile TSX components into a deployable bundle:

rars ui build

Options:

FlagDescription
--dir, -dProject directory
--jsonOutput build result as JSON

Global Options

All commands support:

FlagDescription
--debugEnable debug logging
--traceEnable tracebacks in error messages
--helpShow command help

On this page