Skip to content

tensflare/truss-cli

Repository files navigation

Banner

@tensflare/cli

Truss CLI — the official command-line tool for the Truss trust infrastructure API. Modeled after gh (GitHub CLI).

npm version License CI


What is Truss?

Truss is an accountability layer for AI agents — it records every agent action as a cryptographically signed, tamper-evident audit trail. Learn more →

Installation

npm install -g @tensflare/cli

Or run directly via npx:

npx @tensflare/cli

Quick start

# 1. Authenticate
truss auth login

# 2. List agents
truss agent list

# 3. Create a mandate
truss mandate create --agent-id agt_001 --scope '{"permitted_actions":["read"]}'

# 4. Record an action
truss action record --mandate-id mnd_001 --action-type read

# 5. Generate evidence
truss evidence generate --mandate-id mnd_001

Command reference

Command Description
truss auth login Authenticate with the Truss API
truss org list List organizations
truss agent list List registered agents
truss agent create Register a new agent
truss mandate list List mandates
truss mandate create Create a new mandate
truss action record Record an action
truss action list List action records
truss delegation create Create a delegation hop
truss evidence generate Generate evidence package
truss verify package Verify evidence integrity
truss alert list List alerts
truss integration list List integrations
truss jurisdiction evaluate Evaluate regulatory obligations
truss template list List mandate templates
truss api <method> <path> Raw API access (like gh api)
truss config list Show current configuration
truss completion Generate shell completion script

Run truss --help for global options or truss <command> --help for per-command flags.

Configuration

Config is stored at ~/.config/truss/config.json. Environment variables override:

export TRUSS_API_URL="https://api.truss.tensflare.com"
export TRUSS_API_KEY="tr_abc123"

Features

  • 15 command groups covering the full Truss API
  • --json output for piping to jq and other tools
  • Pagination via --limit and --page
  • Shell completions for bash, zsh, and fish
  • Raw API access with truss api GET /agents
  • Auth via config file or environment variables

Related packages

Package Description
@tensflare/tap Core Zod schemas for mandates, actions, and delegations
@tensflare/truss-sdk TypeScript SDK for programmatic access

Development

npm install
npm run build
# Run locally:
node dist/index.js

Contributing

Pull requests are welcome. Please see the contribution guidelines.

License

Apache 2.0 — see LICENSE.

About

Truss CLI — command-line tool for Truss

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors