CLI Guide

Install and use the XASE command-line interface to authenticate, manage API keys, view metrics, and work with records.

Install

npm i -g xase
xase --help

# If command not found (nvm users):
echo 'export PATH="$PATH:$(npm prefix -g)/bin"' >> ~/.zprofile
source ~/.zprofile

Configure

xase config set baseUrl https://api.xase.ai/api/xase/v1
xase auth login   # email + password, or press Enter to paste an API key
xase auth status
Config is stored per-user. macOS: ~/Library/Preferences/xase-nodejs/config.json. Linux: ~/.config/xase-nodejs/config.json. Windows: %APPDATA%\xase-nodejs\config.json.

Quickstart

# Metrics
xase metrics summary --period week

# Keys
xase keys create --scopes records:read,metrics:read --ttl 24h --save
xase keys list
xase keys revoke <id>

# Records
xase records list --limit 5

Commands

# Authentication
xase auth login
xase auth status
xase auth whoami
xase auth logout

# Config
xase config set <key> <value>
xase config get <key>
xase config list

# Dashboard
xase dashboard

# Records
xase records list [--limit <n>] [--json]
xase records get <transaction_id>
xase records create   # interactive
xase records search --query <text> [--limit <n>] [--json]

# Interventions (HITL)
xase intervene list <record_id> [--json]
xase intervene create <record_id>   # interactive
xase intervene approve <record_id>

# Exports
xase export create <record_id>
xase export download <record_id> [-o ./evidence.zip] [--include-payloads]
xase export batch --input ./ids.txt [-o ./out/]

# Verify
xase verify bundle ./evidence.zip [--verbose]
xase verify record <transaction_id>
xase verify chain

# Models
xase models list [--json]
xase models get <model_id>
xase models register   # interactive

# Metrics & Alerts
xase metrics summary [--period day|week|month] [--json]
xase metrics alerts [--json]
xase metrics override-rate [--period day|week|month] [--json]

# API Keys
xase keys create --scopes <scopes> --ttl <duration> [--save]
xase keys list [--json]
xase keys revoke <id>

# Tenant
xase tenant list
xase tenant select

JSON Output

xase records list --json | jq '.data[0]'
xase metrics summary --json > metrics.json

Troubleshooting

  • Command not found: ensure npm global bin is in PATH (see Install).
  • 401 Unauthorized: check xase auth status and API key scopes.
  • 404 Not Found: verify baseUrl is https://api.xase.ai/api/xase/v1.