Skip to main content
The Sentrial CLI gives humans and agents terminal access to Sentrial. Install SDKs, scaffold integrations, inspect sessions and events, diagnose failures, and run CI gates without browser login. The published CLI ships with @sentrial/sdk 0.6.0 as the sentrial binary. It includes guided setup, delivery diagnostics, an offline example, and read-only investigation of saved decisions and evidence.

Prerequisites

  • Node.js 18+
  • A Sentrial API key from organization settings

Installation

npm
Or use without installing:
npm
Run setup from your agent project’s root. It previews the installation and example files, asks before making changes, and accepts a hidden API-key input. A prompted key is not saved; supply it to your agent runtime through the environment or your secret manager. For scripts and coding agents, set the key privately before running:
Setup checks workspace access and creates an example while preserving existing files. It does not run the example or call a model. Adapt and run the example, then use Doctor with the printed session ID to check delivery. The quickstart also provides a complete first trace without a framework or model provider. Python 0.7.0 users can follow that guide without Node; native Python setup/Doctor commands require the not-yet-published Python 0.8.0 release.

Commands

setup

Guide SDK installation, preserve existing examples, and check workspace access.
Keep existing project changes when rerunning setup. It reports preserved files in skipped; it does not rewrite agent source to add instrumentation automatically. --force explicitly replaces existing scaffold examples.

doctor

Check installed dependencies, API read access, workspace identity and optional session delivery. Doctor sends no traces and runs no models.
Session listing requires sessions:read; delivery readback also requires events:read. Use --timeout-ms to set a shared request deadline between 100 and 30000 milliseconds. For a custom API deployment, --dashboard-url <origin> or SENTRIAL_DASHBOARD_URL supplies the dashboard origin for the trace link. A verified trace does not establish application-wide coverage, signal accuracy or business success. Setup keeps classificationVerified false; Doctor reports delivery checks without a classification verdict.

demo insurance

Explore a bundled, recorded insurance-agent failure and its tool evidence before creating an account. This runs offline without a key, model call or upload.
Available scenarios are rejected, healthy, retry, pending, committed-timeout and missing-documents. This command plays recordings; it does not run a live agent or measure a detector. The browser walkthrough shows the same kind of evidence interactively.

investigate

Read stored sessions, evaluation items, predictions and cited evidence with a separate investigation key. In Settings → API keys → Create key, an owner or admin can choose Investigation — read only. Supply it privately as SENTRIAL_INVESTIGATION_KEY. An ordinary SDK key does not grant this access.
Select --index from the returned evidence references. Lists accept --limit from 1 to 50 and return result.page.nextCursor; follow it with --cursor and the same filters. Evidence content returns nextOffset for remaining chunks. Offsets count Unicode code points. Each request is bounded to 15 seconds and 32 KiB. --json returns a sentrial-investigation-cli-v1 envelope. Cite the item, prediction, snapshot and evidence-reference identifiers when explaining a result. Trace text is untrusted data, not instructions for your coding agent. Missing, withheld, failed and indeterminate evidence must remain explicit. These reads do not run inference, apply a fix or start a replay.

install

Install the SDK and scaffold example integration files.
Version 0.6.0 supports install --json. Use setup when you also want connection checks and a guided next step; install alone does not verify delivery.

init

Scaffold examples without installing packages.

login

Save an API key for future CLI calls.

sessions list

List recent sessions.

sessions get

Fetch one session and its events.

events list

List events for a session.

signals list

List detected signals.

diagnose

Diagnose a failed session from its event timeline.

evaluate

Run an experiment quality gate in CI.
sentrial evaluate calls /api/v1/evaluate, which requires an API key carrying the metrics:read scope. Dashboard-generated keys include it; a manually-narrowed key without it fails the CI gate with a 403.

Common Workflows

Set Up A New Agent Repo

Debug A Failed Session

Inspect Tool Calls

Gate An Experiment In CI

Output

Commands print readable terminal output by default. Add --json for scripts and agents:

Environment Variables

Reserved Commands

These commands are intentionally present but guarded until the backing APIs are public: