Skip to main content

StateSet iCommerce CLI

AI-powered command-line interface for autonomous commerce operations.

Philosophy

The StateSet CLI is built on the premise that commerce infrastructure should be designed for AI agents, not just humans. Think of it as “The SQLite of Commerce” — an embedded, zero-dependency commerce engine that:
  • Runs locally without cloud dependencies
  • Deterministic operations for agent reliability
  • Agentic Commerce Protocol (ACP) for standardized agent interactions
  • Safety-first architecture — read-only by default, explicit --apply for writes

Features

Core

  • Natural Language Interface - Ask Claude to perform commerce operations
  • Multi-Agent System - 17 specialized agents auto-route to the best handler
  • 90+ MCP Tools - Full commerce API exposed to Claude
  • Hybrid Vector Search - Semantic + BM25 search for products, customers, orders, and inventory (requires OPENAI_API_KEY)
  • Multi-turn Sessions - Resume conversations for complex workflows
  • Preview Mode - See what would happen before making changes
  • Direct Commands - Fast, non-AI mode for scripting
  • Interactive Chat - REPL for exploratory work

Sync & Streaming

  • VES Protocol v1.0 - Verifiable Event Sync with Ed25519 signatures
  • gRPC Streaming - Real-time bidirectional sync with sequencer
  • Event Outbox - SQLite-backed event sourcing with conflict resolution
  • Optimistic Concurrency - Base version tracking for safe multi-agent updates

Payments

  • Multi-Chain Stablecoins - USDC on Solana, Base, Ethereum, Arbitrum
  • SET Chain ssUSD - Yield-bearing stablecoin on StateSet L2
  • Bitcoin & Zcash - Native BTC and ZEC support
  • VES Key Derivation - Deterministic wallet addresses per agent

Infrastructure

  • Batch Processing - Sequential or parallel request processing
  • Interactive Tutorials - Guided onboarding for new users
  • SQLite/PostgreSQL - Flexible storage backends
  • Rich Output - ASCII tables, progress bars, formatted displays
  • Telemetry - Distributed tracing with --verbose and --stats

Installation

Or run locally:

Quick Start

Tip: ss is a shorthand alias for stateset.

Run the Tutorial

New to StateSet CLI? Start with the interactive tutorial:

AI-Powered Mode

Interactive Chat

Direct Commands (No AI)

Batch Processing

Commands

Primary Commands

Specialized Agent Commands

Utility Commands

Architecture

Technology Stack

  • Rust Core - Pure domain logic with deterministic execution
  • @stateset/embedded - Native Node.js bindings via NAPI
  • Claude Agent SDK - AI agent framework with MCP tools
  • SQLite/PostgreSQL - Flexible database backends

Capabilities

Commerce Operations

Manufacturing Operations

Financial Operations

Promotions & Discounts

Subscriptions & Recurring Billing

Manufacturing

Tax Management

Analytics & Forecasting

Safety Architecture

Read-Only by Default

All write operations are blocked by default. The CLI shows what would happen without making changes.

Permission Controls

Observability

Workflows

E-commerce Workflow

Shopping Cart Checkout (ACP)

Cart Recovery

Inventory Management

Processing Returns

Multi-Currency Support

Stablecoin Payments

Send native cryptocurrency payments across multiple blockchains:
Supported Chains:

Supplier Management

B2B Invoicing

Storefront Creation

Available templates: nextjs, nextjs-minimal, vite-react, astro

Event Sync (VES Protocol)

Synchronize events between agents and the StateSet Sequencer using the Verifiable Event Sync protocol:
gRPC Streaming for real-time sync:
VES Protocol Features:
  • Ed25519 cryptographic signatures for event integrity
  • Domain-separated hashing (VES_PAYLOAD_PLAIN_V1)
  • Optimistic concurrency with base version tracking
  • Automatic conflict detection and resolution
  • Global sequence numbers for ordering

Agent System

17 specialized agents handle different commerce domains:

Auto-Routing

The main stateset command automatically routes requests to the best agent based on:
  • Request content analysis
  • Confidence scoring
  • Domain keyword matching
  • Ambiguity detection

MCP Tools (90+ Total)

Configuration

Environment Variables

Database

Flags Reference

Session Management

Sessions enable multi-turn conversations with context preservation:

Tutorials

Learn the CLI with interactive tutorials:

Shell Completions

Generate shell completion scripts:

Command Reference

stateset - AI Agent

stateset-chat - Interactive Mode

stateset-direct - Direct Commands

Error Handling

The CLI provides structured error handling with helpful suggestions:

Diagnostics

Run health checks:

Development

Programmatic Usage

The CLI modules can be used programmatically: