CLI

The TuringPulse CLI lets you manage observability, rules, evaluations, governance, and agents from the terminal. Available in Python and TypeScript.

Installation

Python (PyPI)

pip install turingpulse-cli

Verify with tp --version or tp -v.

TypeScript (npm)

npm install -g @turingpulse/cli

Quick start

# Authenticate with your API key (get one at app.turingpulse.ai)
tp auth login --api-key sk_your_key_here

# Check status
tp auth status

# List recent runs
tp observe runs list

# List KPI rules
tp config kpi-rules list

# List governance policies
tp governance policies list

Authentication

The CLI uses API keys from the TuringPulse portal. Keys have scoped access levels:

Access levelDescriptionCLI capabilities
fullRead + writeAll commands
read_onlyRead-onlyList/get only
telemetry_onlySDK ingestion onlyNot suitable for CLI

Key precedence

  1. --api-key flag (highest)
  2. TP_API_KEY environment variable
  3. Config file (~/.turingpulse/config.yaml)

Profiles

Use named profiles for different environments (e.g. production vs development).

tp auth login --api-key sk_prod_... --profile production
tp auth login --api-key sk_dev_... --profile development
tp auth status --profile production

Command reference

tp auth — Authentication

  • tp auth login — Authenticate and save API key (optional --api-key, --base-url, --profile)
  • tp auth status — Show current auth status
  • tp auth logout — Clear saved credentials
  • tp auth set-output — Set default output format for a profile

tp observe — Observability (read-only)

  • Runs: tp observe runs list, runs get <run_id>, runs trace <run_id>, runs metrics <run_id>
  • Traces: tp observe traces list, traces get <trace_id>
  • KPIs: tp observe kpis list, kpis time-series, kpis alerts
  • Drift: tp observe drift events, drift rules
  • Anomalies: tp observe anomalies events, anomalies timeline, anomalies stats
  • tp observe summary — High-level summary

tp config — Rules (KPI, drift, anomaly)

  • KPI rules: tp config kpi-rules list, get, create, update, delete
  • Drift rules: tp config drift-rules list, get, create, update, delete
  • Anomaly rules: tp config anomaly-rules list, get, create, update, delete

Create/update accept --file <path> or --json '...'. Use --yes to skip delete confirmation.

tp alerts — Alert channels

  • tp alerts channels list, get, create, update, delete, test

tp evals — Evaluations & datasets

  • Configs: tp evals configs list, get, create, update, delete
  • Run: tp evals run, tp evals results
  • Datasets: tp evals datasets list, get, create, delete, import, export, items
  • Metrics: tp evals metrics list

tp governance — Policies & compliance

  • Policies: tp governance policies list, get, create, update, delete, evaluate, import
  • Packs: tp governance packs list, get, preview, apply, diff
  • tp governance enforcement-log — View enforcement log

tp agents — Agents & workflows (read-only)

  • tp agents list, tp agents get <agent_id>
  • tp agents workflows list, tp agents workflows get <workflow_id>

Output formats

Most commands support --output / -o:

  • table — Pretty table (default)
  • json — JSON (for piping to jq or scripts)
  • yaml — YAML
tp observe runs list
tp observe runs list -o json
tp auth set-output json --profile default

Configuration file

Credentials and defaults are stored in ~/.turingpulse/config.yaml (permissions 0600).

current_profile: default
profiles:
  default:
    api_key: sk_...
    base_url: https://api.turingpulse.ai
    output_format: table
    tenant_name: Acme Corp
    project_name: Chatbot-v2
    access_level: full

Environment variables

VariableDescription
TP_API_KEYAPI key (overrides config file)
TP_BASE_URLAPI base URL (overrides config file)

Next steps