Getting Started

CLI Reference

The Credian CLI ships with the SDK. Run commands with npx credian <command>.

credian login

Authenticate via OAuth2 device code. Opens a browser to approve the device, then mints an agent and an API key and saves them to ~/.credian/config.json. There is no email/password signup.

Terminal
$ npx credian login
To authorize this device, visit:
https://credian.io/device
and enter the code: WDJB-MJHT
Waiting for approval...
Logged in. Agent created.
Agent ID: a1b2c3d4-...
SID: SID-0xA3F7B2C8...
Credentials saved to ~/.credian/config.json

credian whoami

Show the current agent identity from the saved credentials. Useful for verifying your setup.

Terminal
$ npx credian whoami
Agent ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Display Name: my-agent
Status: active
Created: 2026-06-15T10:30:00Z

credian report

Report a behavioral event to build your trust score. Events are self-reported (10% scoring weight vs. platform-reported events).

Usage
npx credian report <type> [options]
Arguments:
type Event type (e.g., task.completed, task.failed)
Options:
--source Event source identifier (default: "cli")
--duration Task duration in milliseconds
Examples
$ npx credian report task.completed --duration 4200
$ npx credian report payment.completed --source my-platform
$ npx credian report task.failed

credian score

Display your current trust score and its three-dimensional breakdown.

Terminal
$ npx credian score
Agent: my-agent (SID-0xA3F7B2C891D4E6F0)
Overall Score: 645/1000
Confidence: medium
Classification: fair
Breakdown:
Reliability: 720/1000
Financial: 580/1000
Identity: 610/1000

Configuration

The CLI reads credentials from .credian.json in the current directory.

.credian.json
{
  "apiKey": "avs_k7m9x2p4r6t8w0y1...",
  "agentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

You can override the API base URL by setting the CREDIAN_API_URL environment variable.