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-cliRequires Python 3.12+. Verify the installation:
rars versionAuthentication
Before using most commands, authenticate with your workspace:
rars auth loginThis 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 syncAPI Keys
Create a personal access token for CI/CD or programmatic access:
rars auth create-key "CI Deploy Token" --expires 90dExpiration options: 7d, 14d, 30d, 90d, or never.
List active keys:
rars auth list-keysRevoke 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-workspaceSet the default LLM model:
rars configure defaults --model anthropic/claude-sonnet-4-5-20250929Model format is provider/model where provider is anthropic, openai, or ollama.
Project Scaffolding
Initialize a new matrix project:
rars initThis 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-matrixBuild and Deploy
Build
Compile and validate your matrix spec:
rars buildThis 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.ymlInstall (Deploy)
Deploy a package to your workspace:
rars installOptions:
| Flag | Description |
|---|---|
--workspace, -w | Target workspace (uses default if not set) |
--config, -c | Path to poliglot.yml |
--release-notes | Release notes for this deployment |
--force | Force update even if validation fails |
Uninstall
Remove a package from your workspace:
rars uninstall my-matrix-packageOptions:
| Flag | Description |
|---|---|
--workspace, -w | Target workspace |
--yes, -y | Skip confirmation prompt |
Deployment History
List recent deployment commands for a package:
rars list-lifecycle-commands my-matrix-packageOptions:
| Flag | Description |
|---|---|
--workspace, -w | Target workspace |
--limit, -n | Max 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-packageOptions:
| Flag | Description |
|---|---|
--package, -p | Package name (required with --latest) |
--latest, -l | Get report for the most recent command |
--workspace, -w | Target workspace |
--formatted, -f | Display formatted report instead of raw Turtle |
Secrets
Manage secret values for your matrix's service integrations.
List Secrets
rars secrets listOptions:
| Flag | Description |
|---|---|
--workspace, -w | Target workspace |
--prefix, -p | Filter by URI prefix |
Get Secret
View secret metadata:
rars secrets get tasks:TaskAPIKeyRetrieve the decrypted value:
rars secrets get tasks:TaskAPIKey --valueSet Secret
Set a secret value interactively (masked input):
rars secrets set tasks:TaskAPIKeyPipe from stdin (useful for CI):
echo "sk-abc123" | rars secrets set tasks:TaskAPIKey --from-stdinAll 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.ttlOptions:
| Flag | Description |
|---|---|
--matrix, -m | Target matrix URI (required) |
--file, -f | Path to Turtle content file (required) |
--workspace, -w | Target workspace |
--label, -l | Label for the extension |
Creating an extension triggers a partial re-deployment of the target matrix.
List Extensions
rars extension listGet Extension
rars extension get <extension-id>Write the Turtle content to a file:
rars extension get <extension-id> --output extension.ttlUpdate Extension
rars extension update <extension-id> --file updated.ttlDelete 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 previewOptions:
| Flag | Description |
|---|---|
--port, -p | Server port (default: 3333) |
--dir, -d | Project directory |
--host | Server host (default: localhost) |
Build
Compile TSX components into a deployable bundle:
rars ui buildOptions:
| Flag | Description |
|---|---|
--dir, -d | Project directory |
--json | Output build result as JSON |
Global Options
All commands support:
| Flag | Description |
|---|---|
--debug | Enable debug logging |
--trace | Enable tracebacks in error messages |
--help | Show command help |